Skip to content
Snippets Groups Projects

Change Sidekiq testing mode to `fake` instead of `inline`

Merged Rémy Coutable requested to merge ee-22992-default-sidekiq-to-fake-mode-in-test-env into master
All threads resolved!

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

Performance and testing

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.

Edited by Rémy Coutable

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Rémy Coutable changed the description

    changed the description

  • Rémy Coutable added 174 commits

    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

    Compare with previous version

  • 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 :)

  • Jan Provaznik assigned to @rymai and unassigned @jprovaznik

    assigned to @rymai and unassigned @jprovaznik

  • Rémy Coutable changed the description

    changed the description

  • Rémy Coutable added 219 commits

    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

    Compare with previous version

  • mentioned in issue #32526 (closed)

  • mentioned in issue #32730 (closed)

  • 🤖 GitLab Bot 🤖 changed milestone to %12.4

    changed milestone to %12.4

  • Rémy Coutable changed title from [EE] Change Sidekiq testing mode to fake instead of inline to Change Sidekiq testing mode to fake instead of inline

    changed title from [EE] Change Sidekiq testing mode to fake instead of inline to Change Sidekiq testing mode to fake instead of inline

  • Rémy Coutable added 1331 commits

    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

    Compare with previous version

  • Rémy Coutable added 832 commits

    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

    Compare with previous version

  • Rémy Coutable added 118 commits

    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

    Compare with previous version

  • Rémy Coutable changed the description

    changed the description

  • Rémy Coutable added 187 commits

    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

    Compare with previous version

  • Rémy Coutable added 275 commits

    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

    Compare with previous version

  • Rémy Coutable added 29 commits

    added 29 commits

    • 923db881...b19248c3 - 25 commits from branch master
    • 074ecc5b - Make 'Sidekiq::Testing.fake!' mode as default
    • 0b07363e - Introduce new :sidekiq_inline{,_tech_debt} RSpec tags
    • 8d4b5b7e - Add the :sidekiq_inline_tech_debt to specs that needs Sidekiq
    • 08542d52 - Document the new :sidekiq_inline trait

    Compare with previous version

  • Rémy Coutable added 27 commits

    added 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

    Compare with previous version

  • Rémy Coutable added 82 commits

    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

    Compare with previous version

  • Rémy Coutable added 25 commits

    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

    Compare with previous version

  • Rémy Coutable added 125 commits

    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

    Compare with previous version

  • Rémy Coutable added 227 commits

    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

    Compare with previous version

  • mentioned in issue #34388 (closed)

  • Rémy Coutable changed milestone to %12.5

    changed milestone to %12.5

  • Rémy Coutable added 279 commits

    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

    Compare with previous version

  • Rémy Coutable added 72 commits

    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

    Compare with previous version

  • Author Maintainer

    @jprovaznik I finally managed to get this MR green. :stuck_out_tongue: Could you please review/approve/merge if that looks good to you? I will announce this change once it's merged. Thanks! :pray:

  • Rémy Coutable assigned to @jprovaznik and unassigned @rymai

    assigned to @jprovaznik and unassigned @rymai

  • Jan Provaznik resolved all threads

    resolved all threads

  • Jan Provaznik approved this merge request

    approved this merge request

  • Thanks @rymai, LGTM :thumbsup:

  • merged

  • Jan Provaznik mentioned in commit 58a1f0f9

    mentioned in commit 58a1f0f9

  • mentioned in issue #34758 (closed)

  • mentioned in issue #16098 (closed)

  • Bob Van Landuyt mentioned in merge request !18213 (closed)

    mentioned in merge request !18213 (closed)

  • Jan Provaznik mentioned in merge request !20863 (merged)

    mentioned in merge request !20863 (merged)

  • Alper Akgun mentioned in merge request !28662 (merged)

    mentioned in merge request !28662 (merged)

  • Please register or sign in to reply
    Loading