Skip to content

Improve sidekiq-cron patch#2387

Merged
sl0thentr0py merged 2 commits intogetsentry:masterfrom
adamzapasnik:sidekiq-cron-patches
Aug 27, 2024
Merged

Improve sidekiq-cron patch#2387
sl0thentr0py merged 2 commits intogetsentry:masterfrom
adamzapasnik:sidekiq-cron-patches

Conversation

@adamzapasnik
Copy link
Copy Markdown
Contributor

@adamzapasnik adamzapasnik commented Aug 22, 2024

Description

Describe your changes:

I've added two changes:

1st name.to_s cause one may provide hash with symbols to load_from_hash and name ends up being a symbol, and then it ends up raising an error in sentry-ruby/lib/sentry/hub.rb cause it expects a string...

    def capture_check_in(slug, status, **options)
      check_argument_type!(slug, ::String)

2nd change is much more important though, it's required to support natural-language-format, because the current version doesn't create a monitor successfully. natural language format is something like every 5 minutes which gets translated to '*/5 * * * *' as you can see it in the tests

https://github.com/sidekiq-cron/sidekiq-cron?tab=readme-ov-file#natural-language-formats

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.68%. Comparing base (22f2a3a) to head (aef17cf).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2387      +/-   ##
==========================================
- Coverage   98.70%   98.68%   -0.02%     
==========================================
  Files         210      210              
  Lines       13904    13923      +19     
==========================================
+ Hits        13724    13740      +16     
- Misses        180      183       +3     
Components Coverage Δ
sentry-ruby 99.05% <ø> (-0.02%) ⬇️
sentry-rails 97.34% <ø> (-0.09%) ⬇️
sentry-sidekiq 97.07% <100.00%> (+0.06%) ⬆️
sentry-resque 97.11% <ø> (+0.32%) ⬆️
sentry-delayed_job 98.92% <ø> (ø)
sentry-opentelemetry 100.00% <ø> (ø)
Files Coverage Δ
sentry-sidekiq/lib/sentry/sidekiq/cron/job.rb 93.33% <ø> (ø)
...entry-sidekiq/spec/sentry/sidekiq/cron/job_spec.rb 100.00% <100.00%> (ø)

... and 9 files with indirect coverage changes

Copy link
Copy Markdown
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

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

@sl0thentr0py sl0thentr0py merged commit 4db5f74 into getsentry:master Aug 27, 2024
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.

2 participants