Skip to content

Load gems from all groups in preflight server boot job

David Dieulivol requested to merge ddieulivol-load_all_gems_in_preflight into master

Context

In gitlab-org/quality/engineering-productivity/review-apps-broken-incidents#237 (comment 1405975923), we noticed that review-apps were failing because of a test gem, whereas the preflight checks didn't.

The root cause is because we only load production gems in the preflight jobs, and it doesn't seem to be the case in review-apps (i.e. we load gems from all groups by default).

What does this MR do and why?

Load gems from all groups in preflight server boot.

The purpose of the preflight checks are to catch as many errors as possible, as early as possible. Loading all gems by default when booting the application server is a pretty good strategy to catch errors related to gems.

It could be discussed whether the review-apps actually need to load non-production gems, as it's supposed to mirror production gitlab deployments.

Does it work?

Both preflight jobs for this MR (1, 2) passed, and both of them installed development/test gems (1, 2):

Using rspec 3.12.0

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by David Dieulivol

Merge request reports