Skip to content

Fix worker context leak in CSV exports - #2397

Open
anvit wants to merge 2 commits into
qa/2.xfrom
dev/fix-export-worker-context
Open

Fix worker context leak in CSV exports#2397
anvit wants to merge 2 commits into
qa/2.xfrom
dev/fix-export-worker-context

Conversation

@anvit

@anvit anvit commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

CSV export jobs were creating a new qubit/prod Symfony context inside the long-running worker.

That leaked prod into later jobs and made arUpdateEsIoDocumentsJob enqueue descendant updates asynchronously instead of handling them inline.

Keep the worker context intact and scope only the export culture changes needed for translated CSV output.

CSV export jobs were creating a new qubit/prod Symfony context inside
the long-running worker.

That leaked prod into later jobs and made
arUpdateEsIoDocumentsJob enqueue descendant updates asynchronously
instead of handling them inline.

Keep the worker context intact and scope only the export culture changes
needed for translated CSV output.
@anvit anvit self-assigned this Jul 23, 2026
@anvit
anvit requested a review from a team July 23, 2026 16:52
@anvit anvit added this to the 2.11 milestone Jul 23, 2026
@anvit anvit added the Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result. label Jul 23, 2026

@sbreker sbreker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good @anvit 👍

A couple easy unit tests could exercise withUserCulture(): assert that withUserCulture() restores culture after success and after an exception

Add a unit test for the withUserCulture method for arExportJob
@anvit
anvit requested a review from sbreker July 24, 2026 19:43
@anvit

anvit commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Looks good @anvit 👍

A couple easy unit tests could exercise withUserCulture(): assert that withUserCulture() restores culture after success and after an exception

I just added a couple of test cases

@sbreker

sbreker commented Jul 24, 2026

Copy link
Copy Markdown
Member

Looks good @anvit 👍
A couple easy unit tests could exercise withUserCulture(): assert that withUserCulture() restores culture after success and after an exception

I just added a couple of test cases

Looks great @anvit! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: bug A flaw in the code that causes the software to produce an incorrect or unexpected result.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants