Skip to content

Conversation

@nc9
Copy link
Contributor

@nc9 nc9 commented Jan 29, 2026

The _sentry_create_worker patch assumed settings_cls is always passed as positional arg (args[0]), causing IndexError when users call create_worker(settings_cls=WorkerSettings).

Now checks both args[0] and kwargs.get("settings_cls").

Test added in tests/integrations/arq/test_arq.py as init_arq_with_kwarg_settings

Description

settings_cls is now checked from kwargs if no args

settings_cls = args[0] if args else kwargs.get("settings_cls")

Issues

  • None

The `_sentry_create_worker` patch assumed `settings_cls` is always
passed as positional arg (`args[0]`), causing IndexError when users
call `create_worker(settings_cls=WorkerSettings)`.

Now checks both `args[0]` and `kwargs.get("settings_cls")`.
@nc9 nc9 requested a review from a team as a code owner January 29, 2026 23:41
@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • fix(arq): handle settings_cls passed as keyword argument by nc9 in #5393
  • fix(dramatiq): cleanup isolated scope and transaction when message is skipped by frankie567 in #5346
  • fix(google-genai): deactivate google genai when langchain is used by shellmayr in #5389

Internal Changes 🔧

  • ci: migration to the new codecov action by MathurAditya724 in #5392

🤖 This preview updates automatically when you update the PR.

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

Thank you @nc9!

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.99%. Comparing base (2ce4379) to head (f11454d).
⚠️ Report is 119 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5393      +/-   ##
==========================================
- Coverage   84.25%   83.99%   -0.27%     
==========================================
  Files         181      185       +4     
  Lines       18463    19501    +1038     
  Branches     3288     3544     +256     
==========================================
+ Hits        15556    16379     +823     
- Misses       1894     2051     +157     
- Partials     1013     1071      +58     
Files with missing lines Coverage Δ
sentry_sdk/integrations/arq.py 95.04% <100.00%> (ø)

... and 46 files with indirect coverage changes

@sentrivana sentrivana enabled auto-merge (squash) January 30, 2026 08:12
@nc9
Copy link
Contributor Author

nc9 commented Jan 30, 2026

thanks was about to apply it :)

@sentrivana sentrivana merged commit e061eb1 into getsentry:master Jan 30, 2026
165 of 167 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.

2 participants