Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) crons: require sidekiq-cron early #2173

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

natikgadzhi
Copy link
Contributor

#skip-changelog
(am I doing this right?)

Summary

Addressing this review by @st0012 on sidekiq-cron integration — the corresponsing fix for sidekiq-scheduler is in #2172.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #2173 (4bd493a) into master (c7c8e5b) will decrease coverage by 0.06%.
Report is 1 commits behind head on master.
The diff coverage is 50.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2173      +/-   ##
==========================================
- Coverage   97.40%   97.34%   -0.06%     
==========================================
  Files          98       98              
  Lines        3655     3656       +1     
==========================================
- Hits         3560     3559       -1     
- Misses         95       97       +2     
Components Coverage Δ
sentry-ruby 98.02% <ø> (ø)
sentry-rails 94.98% <ø> (ø)
sentry-sidekiq 94.93% <50.00%> (-0.61%) ⬇️
sentry-resque 92.06% <ø> (-1.59%) ⬇️
sentry-delayed_job 94.36% <ø> (ø)
sentry-opentelemetry 100.00% <ø> (ø)
Files Coverage Δ
sentry-sidekiq/lib/sentry/sidekiq/cron/job.rb 92.85% <50.00%> (-7.15%) ⬇️

... and 1 file with indirect coverage changes

@@ -1,6 +1,12 @@
# frozen_string_literal: true

return unless defined?(::Sidekiq::Cron::Job)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, but perhaps it's worth keeping the defined? check in case sidekiq-cron decides to change their API? Would be good to fail gracefully instead of erroring out.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case they'll need to rename the constant in a way that doesn't fit the convention anymore, which I think is relatively unlikely. And if that do happen, which will be a breaking change to us, we probably don't want it to always fail silently? 🤔

@st0012
Copy link
Collaborator

st0012 commented Nov 22, 2023

In the case of Ruby 2.6, it'll install an older version of sidekiq-cron (1.9.1), which will not be compatible with our current tests due to the change in load_from_hash!. I think we should make job_spec compatible with old sidekiq-cron too. Could you also update it for us too? If not, I'll open a separate PR for it later.

@natikgadzhi
Copy link
Contributor Author

natikgadzhi commented Nov 22, 2023 via email

@natikgadzhi
Copy link
Contributor Author

@st0012 should be good to go now.

@sl0thentr0py sl0thentr0py merged commit bc3de42 into getsentry:master Nov 23, 2023
95 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants