Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1372
Add Sidekiq 8 to the CI
Make sure we test against both versions of Sidekiq by adding specific gemfiles for both versions.
Includes rails so that we can test the activejob and actionmailer integration for Sidekiq too.
Fix Sidekiq 8 queue time reporting
Sidekiq 8 reports queue time as epoch milliseconds, so we don't need to do the conversion anymore. Check if Sidekiq is version 8 and if so, do not do any conversion.
https://github.com/sidekiq/sidekiq/blob/main/docs/8.0-Upgrade.md
Only run Sidekiq specs when Sidekiq is in bundle
The CI fails on these specs because we now reference the Sidekiq constant and before we didn't. These specs should now only be run when Sidekiq is in the bundle.
Fix Sidekiq ActiveJob specs
Enable Timecop's mock_process_clock behavior. This is disabled by default but needed for Sidekiq 8 because it changed how it fetches the values for
enqueued_at
andcreated_at
.Remove Sidekiq ActiveJob case for job arguments
This case statement is never checked. The ActiveJob instrumentation is wrapped around the Sidekiq middleware. This sets the job arguments before Sidekiq can.
It's set with
add_params_if_nil
helper. Then when the Sidekiq middleware wants to set parameters, they're already set, and the check is skipped.Remove it to avoid confusion about it. Sidekiq 8 renamed this class to
Sidekiq::ActiveJob::Wrapper
, but we don't need to check it.