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

All the fixes introduced while testing the production deployments #93

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

nitrosx
Copy link
Contributor

@nitrosx nitrosx commented Nov 7, 2024

This PR includes all the changes introduced while testing the manual deployment in production

@nitrosx nitrosx requested a review from YooSunYoung November 7, 2024 15:06
Comment on lines +164 to +166
output_value = (
output_value if isinstance(var_value, str) else json.loads(output_value)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about the intention here. Can you elaborate more? @nitrosx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In some cases, the variable value (aka var_value) is a list or a dict.
When that is the case, the variable value is converted to a json string, the substitution is executed and converted back to the original type.
Basically it is a trick to perform nested substitutions without traversing the whole nested structure.

Check also line 149.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah it's making the string dumped output_value back to a dictionary/list. I see...
It sounds like a bit of hack but it won't be a problem since > and < are not easy to be mistaken with other symbols used in list or dictionary but we'd better document it.
I'll do it in another PR with some unit tests.

@YooSunYoung YooSunYoung changed the base branch from main to lint November 8, 2024 12:36
@YooSunYoung YooSunYoung changed the base branch from lint to main November 8, 2024 12:39
@YooSunYoung YooSunYoung changed the base branch from main to lint November 8, 2024 12:45
Base automatically changed from lint to main November 8, 2024 12:46
@YooSunYoung YooSunYoung merged commit b569fc1 into main Dec 4, 2024
3 checks passed
@YooSunYoung YooSunYoung deleted the fixes-for-deployment branch December 4, 2024 13:22
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.

2 participants