-
Notifications
You must be signed in to change notification settings - Fork 420
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
Proposal: Typed Values for TriggerBindings #253
Comments
Neat idea! However, one thing to note is that this will restrict users so they can no longer mix static & json values:
Here's an example TriggerBinding that my team uses that mixes static strings and json values (source here):
With this issue's proposed change, it would be easy to "fix" the TriggerBinding by passing the json values as separate params and joining them together in the TriggerTemplate. However, it's worth thinking about whether this will cost us flexibility and readability of the TriggerBindings + TriggerTemplates. |
Yeah, I noticed some of the tests had that but none of the examples so I wasn't sure if anyone was using the concat behavior in Bindings. I don't have too strong of a feeling about this but having strong types does allow some nicer separation i.e. all of the string/template concatenation happens only in the templates and not in the binding. Though this will be a breaking change and can make the templates a bit more verbose. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
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. |
Current Behavior
Currently, TriggerBindings are a lot like
Params
in pipelines i.e. they have aname
and avalue
field. The value field can either contain an expression - GJson/JSONPath which are wrapped in$()
or it can be static string i.e. not wrapped in$()
.Proposal
Instead of reusing the same
value
filed and using$()
to differentiate between expressions and strings we could use separate fields instead. This will allow us to get rid of the enclosing$()
in front of the expressionse.g.
Another alternative would be to get rid of the top level
params
as well:cc @wlynch
The text was updated successfully, but these errors were encountered: