Skip to content

feat: Add listener for inject audit context in jobs#101

Merged
smarcet merged 4 commits intomainfrom
feature/replicate-context-in-job-v2
Feb 4, 2026
Merged

feat: Add listener for inject audit context in jobs#101
smarcet merged 4 commits intomainfrom
feature/replicate-context-in-job-v2

Conversation

@andrestejerina97
Copy link
Contributor

@andrestejerina97 andrestejerina97 commented Jan 27, 2026

This is an improvement to obtain the audit context in a worker's job. The idea is to attack the listener just before the job is sent, inject the context of the request into the payload, and then, just before starting processing, pass the context to the app container.
ref: https://app.clickup.com/t/86b892wkn

@andrestejerina97 andrestejerina97 marked this pull request as ready for review January 27, 2026 18:50
@andrestejerina97 andrestejerina97 force-pushed the feature/replicate-context-in-job-v2 branch 4 times, most recently from f32ffd5 to 57e515e Compare January 27, 2026 21:01
@andrestejerina97 andrestejerina97 force-pushed the feature/replicate-context-in-job-v2 branch from 57e515e to 8b96c9b Compare January 27, 2026 21:34
@matiasperrone-exo matiasperrone-exo changed the title feat: Add listener for inyect audit context in jobs feat: Add listener for inject audit context in jobs Jan 28, 2026
@smarcet smarcet self-requested a review February 2, 2026 19:03
Copy link
Contributor

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

In CleanupJobAuditContextListener is only attached to the JobProcessed event. If a job fails before completion, the context may persist and pollute the next job data. Add a cleanup on failure as well: JobFailed and JobExceptionOccurred.

@smarcet
Copy link
Collaborator

smarcet commented Feb 3, 2026

@andrestejerina97 any update on #101 (review) ?

@andrestejerina97
Copy link
Contributor Author

Thanks @caseylocker i have updated with new changes

Copy link
Collaborator

@smarcet smarcet left a comment

Choose a reason for hiding this comment

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

@andrestejerina97 please review comments

@andrestejerina97
Copy link
Contributor Author

@smarcet new changes to review

Copy link
Collaborator

@smarcet smarcet left a comment

Choose a reason for hiding this comment

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

LGTM

@dariobressanExo
Copy link

Please can you review this @caseylocker @romanetar

Copy link
Contributor

@romanetar romanetar left a comment

Choose a reason for hiding this comment

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

LGTM

@smarcet smarcet merged commit 13cff1e into main Feb 4, 2026
2 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.

5 participants