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

Fixed bug when cron_jobs is set to None in arq integration #4115

Merged
merged 3 commits into from
Mar 4, 2025

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Mar 3, 2025

Handle None values in arq configuration gracefully.

Fixes #3827

Unfortunately our test setup for arq does not allow for testing None values in the configuration because they are changed to [] in the arq init code in the test suite here and here.

This is why I have not added additional tests for this bug fix.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
antonpirker Anton Pirker
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.57%. Comparing base (0d23b72) to head (ba99d03).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4115      +/-   ##
==========================================
- Coverage   79.60%   79.57%   -0.04%     
==========================================
  Files         140      140              
  Lines       15581    15581              
  Branches     2643     2643              
==========================================
- Hits        12404    12399       -5     
- Misses       2338     2343       +5     
  Partials      839      839              
Files with missing lines Coverage Δ
sentry_sdk/integrations/arq.py 89.84% <ø> (ø)

... and 5 files with indirect coverage changes

Verified

This commit was signed with the committer’s verified signature. The key has expired.
antonpirker Anton Pirker

Verified

This commit was signed with the committer’s verified signature. The key has expired.
antonpirker Anton Pirker
@antonpirker antonpirker changed the title Fixed bug when cron_jobs is set to None Fixed bug when cron_jobs is set to None in arq integration Mar 3, 2025
@antonpirker antonpirker marked this pull request as ready for review March 3, 2025 14:41
Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

Maybe we could make a test, which does not use the init_arq test fixture, to test this? But if it is too complicated, let's not block the bug fix on a lack of a test.

@antonpirker antonpirker merged commit 8672dc1 into master Mar 4, 2025
142 checks passed
@antonpirker antonpirker deleted the antonpirker/arq/cron_jobs branch March 4, 2025 08:10
sentrivana pushed a commit that referenced this pull request Mar 10, 2025

Partially verified

This commit is signed with the committer’s verified signature.
sentrivana’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
Handle `None` values in arq configuration gracefully. 
Fixes #3827
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.

ARQ Integration can create an TypeError with cron_jobs
2 participants