-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Added the behavior of double dollar signs in env, command and args #101916
Added the behavior of double dollar signs in env, command and args #101916
Conversation
@MartinKanters: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @MartinKanters. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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.
There's a guide somewhere about the commands you need to run to generate related code, and then commit that (2 commits in total).
It's not all in one page and when I need to do this I often have to go hunting for the exact runes to use. If you have a working Golang development environment locally, make generated_files
should do what you need.
Alright thanks! That's only after this PR gets approved and merged, I'm guessing? |
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
Replying to #101916 (comment) You need to add that second commit to this PR before it'll pass tests, and it won't get “LGTM” review until tests are green. |
Please also see #101916 (comment) |
I just noticed I changed the file at |
/retest |
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.
Super minor nits but the repeat several times :)
pkg/apis/core/types.go
Outdated
@@ -1828,10 +1828,10 @@ type EnvVar struct { | |||
// Optional: Defaults to ""; variable references $(VAR_NAME) are expanded | |||
// using the previous defined environment variables in the container and |
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.
while we are editing - s/previous/previously/
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.
Nice find, I've took it with my doc changes
pkg/apis/core/types.go
Outdated
// exists or not. | ||
// the reference in the input string will be unchanged. Double $$ are | ||
// reduced to a single $, which allows for escaping the $(VAR_NAME) | ||
// syntax: i.e. $$(VAR_NAME). Escaped references will never be expanded, |
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.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded,
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.
Thanks, that makes it more clear indeed. I've processed it.
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.
Thanks!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MartinKanters, thockin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
The documentation currently mentions that only the$(VAR) syntax can be escaped with $ $(VAR). It's very confusing that every $$ will be reduced to one $. To me, this is a bug, which I delivered a fix for. While still open, it was softly declined since this is the current behavior for 5 years already, so we cannot break it for those users (which is fair). The final thing what we can do it to at least document it correctly.
Which issue(s) this PR fixes:
Fixes #101137
Special notes for your reviewer:
This bug was found and reported first in Tekton Pipelines issue 3871.
Please read the comments on the issue and original PR for more background.
Also, I'm not sure if this docs directly affect the reference documentation somehow. Please let me know if I need to change something else.
Release notes