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.
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
Add more details for param variable replacement as a whole in TEP076 #707
Add more details for param variable replacement as a whole in TEP076 #707
Changes from 2 commits
ba0b133
ee70b4e
29d2d9d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 think the first two examples are overlapping. We don't need to distinguish whether the variable reference is quoted or not. It's just K8s default behaviour to treat any value as string if it's not array or dictionary no matter if it is quoted (doc). i.e.
is equivalent to
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 believe that the yaml and json conversions are through K8S API (OpenAPI) and it is generated through swagger.json
And the value field under params is marshaled and unmarshaled by the implemented
json.Unmarshaller interface
in params_types.goThere 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.
Is there a functional difference between how
value: foo
andvalue: "foo"
is interpreted though? (e.g. they would come in as a string, but we'd recognize the [*] syntax and treat it like an array)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 another benefit of supporting this in array is that we can append several results. But for Object it may not be so helpful? @chuangw6 thinks we shouldn't add support for this
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.
For array, this variable replacement makes sense to me.
For object, it's different. I'll discuss with you offline.
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.
Yes. I should've be more clear about this, but since 0076 is all around arrays, so I will only focus on examples for arrays. I will open another PR for 0075 if necessary, once we finalize our discussions in tektoncd/pipeline#4879
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.
to be clear, this is an alternative approach right?
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.
FWIW, I'd interpret this syntax as "an array element that holds an array", which is different than the previous 2 examples. Nested arrays are a non-goal for this PR, so perhaps we should omit this?