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

FilterTest Handler: filter pipeline deepcopy #495

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Theodlz
Copy link
Collaborator

@Theodlz Theodlz commented Jan 6, 2025

We faced some concurrency issues in prod, where the object returned by pymongo in one call, after being edited (though not in the DB, and just temporarily) showed the edits in another API call. It meant that the pipeline of the filter being tested would be edited again and again in the scope of the API (and thankfully, not in the DB), making the filter incorrect.

This PR fixes that with a good old deepcopy of the JSON before editing anything

@Theodlz Theodlz self-assigned this Jan 6, 2025
@Theodlz Theodlz requested a review from mcoughlin January 6, 2025 19:38
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