-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Do not set empty environment variables #4193
Conversation
and refactor
Not sure, but I think there's a difference between "end var is empty" and "an env var is not set". |
Before #1913, default values (empty string, zero, false) are filtered. It caused confusing, when I run pipeline manually. So, I removed it entirely. Now, there are a lot of empty string vars. This PR should not break manual trigger, because manual envs is a different map, and this PR filters only empty strings in transition from model to envs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see arguments for both sides. I am not against a merge if this change gets properly documented, so that users can adjust their potential checks against empty/non-empty vars to now check for the existence.
While writing this, I realized that removing vars entirely makes checking a bit more cumbersome as one first needs to check for existence and then chain a check for a possible matching value.
@zc-devs We're currently curating issues for 3.0. If you want to get this into 3.0, please rebase and address the review in the next days.
I don't care, TBH. |
You opened this PR, so I guess you care at least a little. Nobody objects and I am also fine with it, so it is (still) up to you to rebase and get it in :) |
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
# Conflicts: # pipeline/frontend/metadata/environment.go # server/pipeline/stepbuilder/metadata_test.go
Deployment of preview was torn down |
@zc-devs test failures |
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Related #1911, #1913.
While #1913 fixes manual trigger and numbers/booleans for automatic triggers, it pollutes Pod's environment with empty strings: