Change Sidekiq testing mode to `fake` instead of `inline`
What does this MR do?
This changes the Sidekiq mode from inline
to fake
in the test
environment.
This should hopefully make RSpec jobs run faster.
Documentation has been updated:
Sidekiq jobs are typically not run in specs, but this behaviour can be altered in each spec through the use of
perform_enqueued_jobs
blocks. Any spec that causes Sidekiq jobs to be pushed to Redis should use the:sidekiq_inline
trait, to ensure that they are removed once the spec completes.The
:sidekiq_might_not_need_inline
trait was added when Sidekiq inline mode was changed to fake mode to all the examples that needed Sidekiq to actually process jobs. Examples with this trait should be either fixed to not rely on Sidekiq processing jobs, or their:sidekiq_might_not_need_inline
trait should be updated to:sidekiq_inline
if the processing of background jobs is needed/expected.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios.
-
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/16098.
Merge request reports
Activity
changed milestone to %12.3
added Quality bugperformance ci-build test labels
3 Warnings This merge request is quite big (more than 939 lines changed), please consider splitting it into multiple merge requests. a59d10e3: This commit’s subject line is acceptable, but please try to reduce it to 50 characters. 1cfc54a2: This commit’s subject line is acceptable, but please try to reduce it to 50 characters. Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has randomly picked a candidate for each review slot. Feel free to override this selection if you think someone else would be better-suited, or the chosen person is unavailable.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not (yet?) automatically notify them for you.
Category Reviewer Maintainer backend Tetiana Chupryna ( @brytannia
)Sean McGivern ( @smcgivern
)test for spec/features/*
No reviewer available No maintainer available frontend Scott Hampton ( @shampton
)Filipa Lacerda ( @filipa
)Generated by
DangerEdited by 🤖 GitLab Bot 🤖added 94 commits
-
821a4971...2369e488 - 91 commits from branch
master
- fe22073a - Make 'Sidekiq::Testing.fake!' mode as default
- a23244de - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 8a753852 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
821a4971...2369e488 - 91 commits from branch
added Enterprise Edition label
added 507 commits
-
8a753852...5e97743f - 504 commits from branch
master
- 6e36d2e9 - Make 'Sidekiq::Testing.fake!' mode as default
- e1c7865b - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 3c9ce493 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
8a753852...5e97743f - 504 commits from branch
added 28 commits
-
3c9ce493...aaed3f5e - 25 commits from branch
master
- 2097d9bd - Make 'Sidekiq::Testing.fake!' mode as default
- 7701424f - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- f52943fd - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
3c9ce493...aaed3f5e - 25 commits from branch
added 127 commits
-
2beabf69...6160611b - 124 commits from branch
master
- 69c01b66 - Make 'Sidekiq::Testing.fake!' mode as default
- d133f6f8 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 60de6ac3 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
2beabf69...6160611b - 124 commits from branch
added 1034 commits
-
60de6ac3...b920d5b1 - 1031 commits from branch
master
- 2456ea99 - Make 'Sidekiq::Testing.fake!' mode as default
- 9df68d7b - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- ae939de0 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
60de6ac3...b920d5b1 - 1031 commits from branch
added 44 commits
-
ae939de0...34980e3d - 41 commits from branch
master
- 7f1158c1 - Make 'Sidekiq::Testing.fake!' mode as default
- 7ac24e93 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 33845387 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
ae939de0...34980e3d - 41 commits from branch
marked the checklist item Documentation created/updated or follow-up review issue created as completed
added 104 commits
-
33845387...5b304f01 - 101 commits from branch
master
- 89271615 - Make 'Sidekiq::Testing.fake!' mode as default
- 96595c2a - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 1f757ba3 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
33845387...5b304f01 - 101 commits from branch
added 14 commits
-
1f757ba3...4d0875c0 - 11 commits from branch
master
- 26e3fe9e - Make 'Sidekiq::Testing.fake!' mode as default
- ff9018cc - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- d45fb118 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
Toggle commit list-
1f757ba3...4d0875c0 - 11 commits from branch
added 14 commits
-
d45fb118...c499724b - 10 commits from branch
master
- 48fc6c8f - Make 'Sidekiq::Testing.fake!' mode as default
- 8ada9ab1 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 7e723402 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- f66efe59 - Document the new :sidekiq_inline trait
Toggle commit list-
d45fb118...c499724b - 10 commits from branch
added backstage [DEPRECATED] label
assigned to @vzagorodny and unassigned @rymai
added 382 commits
-
f66efe59...3eb9dcb4 - 378 commits from branch
master
- 0e5bdff2 - Make 'Sidekiq::Testing.fake!' mode as default
- 49087dfd - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 105ad8d1 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 81e6e4c4 - Document the new :sidekiq_inline trait
Toggle commit list-
f66efe59...3eb9dcb4 - 378 commits from branch
added 252 commits
-
81e6e4c4...4be2c940 - 248 commits from branch
master
- c731f5bd - Make 'Sidekiq::Testing.fake!' mode as default
- 36d1c798 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 7b8feb95 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 33e0a23a - Document the new :sidekiq_inline trait
Toggle commit list-
81e6e4c4...4be2c940 - 248 commits from branch
@rymai LGTM, feel free to pass for the maintainer's review
assigned to @rymai and unassigned @vzagorodny
@jprovaznik Could you please review as a maintainer? Thanks!
assigned to @jprovaznik and unassigned @rymai
- Resolved by Jan Provaznik
- Resolved by Jan Provaznik
This should make RSpec jobs run faster.
last pipeline on this MR took 109 minutes (https://gitlab.com/gitlab-org/gitlab-ee/pipelines/81383337/?project_id=278964&hide_dismissed=true&page=1&days=90) in compare to 42 minutes on the last master merge (https://gitlab.com/gitlab-org/gitlab-ee/pipelines/81562948/?project_id=278964&hide_dismissed=true&page=1&days=90).
It might be just wrong coincidence (or I used wrong "baseline" pipeline to compare with), but any idea why there is such a big difference?
added 174 commits
-
14ec9af3...27c8205d - 170 commits from branch
master
- 93739434 - Make 'Sidekiq::Testing.fake!' mode as default
- a956ba4e - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- f5e71588 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 96765347 - Document the new :sidekiq_inline trait
Toggle commit list-
14ec9af3...27c8205d - 170 commits from branch
- Resolved by Jan Provaznik
Thanks @rymai, overall LGTM, only very minor naming comment (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15479#note_215443294) and one loud thinking (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15479#note_215597683) - but I don't have better suggestion for it so not asked for changing this unless you have some idea :)
assigned to @rymai and unassigned @jprovaznik
added 219 commits
-
96765347...94c2b462 - 215 commits from branch
master
- f4dc13af - Make 'Sidekiq::Testing.fake!' mode as default
- f718bf98 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 713724b6 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 4c39d0e7 - Document the new :sidekiq_inline trait
Toggle commit list-
96765347...94c2b462 - 215 commits from branch
mentioned in issue #32526 (closed)
added missed:12.3 label
mentioned in issue #32730 (closed)
changed milestone to %12.4
added Engineering Productivity label
added 1331 commits
-
4c39d0e7...56286f28 - 1327 commits from branch
master
- 826e2aeb - Make 'Sidekiq::Testing.fake!' mode as default
- f0848ba6 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- fb4f783a - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- c81deac4 - Document the new :sidekiq_inline trait
Toggle commit list-
4c39d0e7...56286f28 - 1327 commits from branch
added 832 commits
-
c81deac4...8aa18860 - 828 commits from branch
master
- e0799118 - Make 'Sidekiq::Testing.fake!' mode as default
- d2616d5c - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 6cc823d9 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- d6fdc31e - Document the new :sidekiq_inline trait
Toggle commit list-
c81deac4...8aa18860 - 828 commits from branch
added 118 commits
-
d6fdc31e...b385dc26 - 114 commits from branch
master
- 40aa7006 - Make 'Sidekiq::Testing.fake!' mode as default
- eeb90c5d - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 840574c6 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 3f8a937e - Document the new :sidekiq_inline trait
Toggle commit list-
d6fdc31e...b385dc26 - 114 commits from branch
added 187 commits
-
3f8a937e...cffeadd4 - 183 commits from branch
master
- ca833d13 - Make 'Sidekiq::Testing.fake!' mode as default
- d87658a9 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 717697ba - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 5b1d7c69 - Document the new :sidekiq_inline trait
Toggle commit list-
3f8a937e...cffeadd4 - 183 commits from branch
added 275 commits
-
5b1d7c69...e5752f0b - 271 commits from branch
master
- b2e5c244 - Make 'Sidekiq::Testing.fake!' mode as default
- 48e089e3 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 3e367f20 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 923db881 - Document the new :sidekiq_inline trait
Toggle commit list-
5b1d7c69...e5752f0b - 271 commits from branch
added 29 commits
Toggle commit listadded 27 commits
-
08542d52...e28acada - 23 commits from branch
master
- 7c570cbe - Make 'Sidekiq::Testing.fake!' mode as default
- bc31a957 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 6bb7c329 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- c5aa8e1c - Document the new :sidekiq_inline trait
Toggle commit list-
08542d52...e28acada - 23 commits from branch
added 82 commits
-
c5aa8e1c...d51133ad - 78 commits from branch
master
- 2577861b - Make 'Sidekiq::Testing.fake!' mode as default
- e05125a2 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- fb5dc9d6 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- ecc04f10 - Document the new :sidekiq_inline trait
Toggle commit list-
c5aa8e1c...d51133ad - 78 commits from branch
added 25 commits
-
ecc04f10...b70abe63 - 21 commits from branch
master
- 0762c27d - Make 'Sidekiq::Testing.fake!' mode as default
- d0a25428 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 6f51f287 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 24e1c2b5 - Document the new :sidekiq_inline trait
Toggle commit list-
ecc04f10...b70abe63 - 21 commits from branch
added 125 commits
-
24e1c2b5...28fd62f4 - 121 commits from branch
master
- 2920f1c4 - Make 'Sidekiq::Testing.fake!' mode as default
- c792b23c - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 5d25f8a6 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 7ddb54bf - Document the new :sidekiq_inline trait
Toggle commit list-
24e1c2b5...28fd62f4 - 121 commits from branch
added 227 commits
-
7ddb54bf...72e21af5 - 223 commits from branch
master
- 9ed8d7f1 - Make 'Sidekiq::Testing.fake!' mode as default
- 41f7e4e4 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 96c6dd29 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 834feffe - Document the new :sidekiq_inline trait
Toggle commit list-
7ddb54bf...72e21af5 - 223 commits from branch
mentioned in issue #34388 (closed)
added missed:12.4 label
changed milestone to %12.5
removed missed:12.3 missed:12.4 labels
added 279 commits
-
834feffe...1799fc14 - 275 commits from branch
master
- b3736ed4 - Make 'Sidekiq::Testing.fake!' mode as default
- cc802295 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- 1dbd0233 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- df47210f - Document the new :sidekiq_inline trait
Toggle commit list-
834feffe...1799fc14 - 275 commits from branch
added 72 commits
-
df47210f...7754808a - 68 commits from branch
master
- 64a2badf - Make 'Sidekiq::Testing.fake!' mode as default
- 1cfc54a2 - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
- a59d10e3 - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
- 6309f06b - Document the new :sidekiq_inline trait
Toggle commit list-
df47210f...7754808a - 68 commits from branch
@jprovaznik I finally managed to get this MR green.
Could you please review/approve/merge if that looks good to you? I will announce this change once it's merged. Thanks!assigned to @jprovaznik and unassigned @rymai
Thanks @rymai, LGTM
mentioned in commit 58a1f0f9
mentioned in issue #34758 (closed)
mentioned in issue #16098 (closed)
mentioned in merge request !18213 (closed)
mentioned in commit Dalahro/gitlab@4d1a3d31
mentioned in merge request !20863 (merged)
mentioned in merge request !28662 (merged)