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

Clone objects types when getting env values #4519

Merged
merged 1 commit into from Jan 16, 2024

Conversation

knolleary
Copy link
Member

Fixes #4479

With the work to pre-evaluate env values on start, we no longer re-evaluate JSON each time it is retrieved. The problem this has caused for the linked issue is that we are now returning the same object each time - an object that can be mutated by a flow.

Env values are intended to be immutable.

This PR fixes it by cloning the env value if needed. It only does this for object types (inc Arrays) - but not for string/number/boolean types that don't need it.

@knolleary knolleary merged commit 1bef0c3 into master Jan 16, 2024
4 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.

Subflow issue when deleting part of a payload after its seconds use
1 participant