Skip to content

Reset all registered CurrentAttributes after each job, not just prese…#1034

Draft
mensfeld wants to merge 1 commit into
mainfrom
fix/b13-current-attributes-reset-all
Draft

Reset all registered CurrentAttributes after each job, not just prese…#1034
mensfeld wants to merge 1 commit into
mainfrom
fix/b13-current-attributes-reset-all

Conversation

@mensfeld

Copy link
Copy Markdown
Collaborator

…nt keys

Loading#perform only reset the CurrentAttributes classes whose key was present in the message. A message without a cattr key - enqueued before persist was configured, by a different producer, or with an empty context

  • left the registered class unreset, so a value set during one job could leak into the next job on a reused worker thread (CurrentAttributes are thread-local and Shoryuken reuses pool threads).

Reset every registered class in the ensure regardless of which keys the message carried. Covered by an integration spec (process-isolated, where the CurrentAttributes adapter is loaded) that enqueues two keyless jobs and asserts the second doesn't observe the first's context.

…nt keys

Loading#perform only reset the CurrentAttributes classes whose key was
present in the message. A message without a cattr key - enqueued before
persist was configured, by a different producer, or with an empty context
- left the registered class unreset, so a value set during one job could
leak into the next job on a reused worker thread (CurrentAttributes are
thread-local and Shoryuken reuses pool threads).

Reset every registered class in the ensure regardless of which keys the
message carried. Covered by an integration spec (process-isolated, where
the CurrentAttributes adapter is loaded) that enqueues two keyless jobs and
asserts the second doesn't observe the first's context.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3d0a4bad-1d3c-411d-8a3b-e131cc05d230

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/b13-current-attributes-reset-all

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant