Skip to content

Add :none strategy for deduplicating Sidekiq jobs

Marius Bobin requested to merge duplicate-jobs-with-strategies-none into master

What does this MR do?

Related to gitlab-com/gl-infra/scalability#195 (closed) as suggested in !39464 (comment 409139398)

Allows a job not to be deduplicated even though it is idempotent:

  class DummyWorker
    include ApplicationWorker

    deduplicate :none
    idempotent!

    # ...
  end

The default behavior for idempotent workers is to remove duplicated jobs, but in !39464 (merged) we have a different use case, we can have duplicated jobs which do unrelated work. So we need a strategy to cancel deduplication.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability 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
Edited by Marius Bobin

Merge request reports