This repository was archived by the owner on Mar 26, 2025. It is now read-only.
fix: removes in-place modification of options in _prepare_workflow_request#311
Merged
mrkaye97 merged 2 commits intohatchet-dev:mainfrom Feb 5, 2025
Merged
fix: removes in-place modification of options in _prepare_workflow_request#311mrkaye97 merged 2 commits intohatchet-dev:mainfrom
options in _prepare_workflow_request#311mrkaye97 merged 2 commits intohatchet-dev:mainfrom
Conversation
mrkaye97
approved these changes
Feb 5, 2025
Contributor
mrkaye97
left a comment
There was a problem hiding this comment.
Nice catch, and thanks for the fix! Would you mind bumping the patch version number in the pyproject.toml? Once that's done, happy to ship this 😄
Contributor
Author
That's great @mrkaye97 . Thanks for your fast support! |
Contributor
|
just released! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The inplace modification of
optionobject in_prepare_workflow_requestis causing a bug.If an error occurrs after
_prepare_workflow_requestreturns but before new workflows are spawned, then tenacity retries will happen with options dict modified. This is a huge problem when you have anyadditional_metadataset, because it is going to be a binary in any of the retries (instead of a string).(I am having some problems in production beacause of it, so it would be very nice to have this resolved asap)
FYI @mmacvicar @banduk @ArthurMor4is @vncsna @cezarguimaraes
To reproduce
Modify
AdminClientAioImpl.run_workflowsto raise an error after calling_prepare_workflow_request.Trigger a workflow that uses
spawn_workflowsand receives some additional_metadata.In the first attempt, your new error will be raised. In the next attempts the code will fail in
_prepare_workflow_requestwith aTypeError: Object of type bytes is not JSON serializable.Trace
Exception trace