-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Feature: expression support in $() #2812
Comments
@bitsofinfo could you give some examples of the kinds of things you'd like to use CEL for? Before we add CEL support fullstop we'd want to make sure it's the best solution to meet your needs. note we are also exploring CEL and JSONPath for conditions: #2127 If you need CEL mostly for expression evaluation, we've talked before about adding JSONPath support, do you know if JSONPath could meet your needs or do you need functionality provided by CEL that isn't provided by JSONPath? |
( @imjasonh maybe another use case for the CEL custom task? :D) |
@bobcatfish here is an example:
Others? well I don't have specifics beyond mine above. But I can just imagine how much i'd use such a capability to do simple string mutations without having to echo the params into shells for further mutation, it gets awkward. Triggers uses CEL and the functions provided by it for string manipulation works for me. Would be consistent to use that, but if JSONPath provides the same + additional functionality + more functions... then use that. I really would just like more capability for expressions, it means I have to write less custom code to do things with these params and other variables. |
/kind feature |
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. |
/remove-lifecycle rotten |
@vdemeester: Reopened 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. |
@jerop has been planning to make an issue about having CEL custom task support (in the context of the conditions work she has been doing), maybe it makes sense to close this one in favor of that issue once it exists? |
if the new issue covers the feature I'm describing of making CEL expressions available anywhere in tekton where |
The new issue would be about supporting CEL with custom tasks, so it wouldn't quite do what you're describing. About adding CEL support in Using something like custom tasks to implement this means that supporting CEL can be optional and also that folks can use other custom tasks to express any expression language they want. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
CEL, JSONPath, whichever, whatever. Being able to do expressions anywhere |
Hey @bitsofinfo - we've been working on a set of "design principles" over in the community repo - some of the principles around flexibility apply here: https://github.com/tektoncd/community/blob/master/design-principles.md#flexibility
Even in triggers when we have support for CEL we try to make sure we can support other languages and tools as well - so I don't think it's likely we'd want to add CEL support directly in the I could see maybe jsonpath support? (also touched on in #3255 and #1393) But that would give you quite a bit less than CEL would. But if your use cases are mostly around indexing into maps and arrays, vs. being needing a full expression language, maybe we can pursue that instead? We also have #3149 which would allow for CEL support via custom tasks (i.e. no extra pod needed, values provided via results). |
I've removed CEL from the subject. The particular implementation I guess doesn't matter. But being able to do something like this, whatever the impl, would be great.
|
The I'm not sure how we'd be able to a provide functionality like that while: The only way I could imagine that working is maybe if you could provide something to your pipelines controller, like an interceptor, that knows how to parse the expression? But at that point that seems potentially more complicated than using a Custom Task to evaluate the expression. |
how is the triggers project currently handling this? |
In triggers this is being handled with "interceptors" which run as separate services, e.g. the CEL interceptor which is currently built into the eventlistener but won't be in the future (I'm hoping that one day our CEL custom task controller and the triggers cel interceptor can be the same thing, i.e. run the same code) |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
This is still an open issue. I agree with @bobcatfish that we should keep API changes to a minimum, so perhaps it would help us take a step back on this a look at concrete use cases that these would solve, so that we see if there is any alternative solution. I also feel like this is related to #1393. If we support something like One slightly related issue that I'm facing is when trying to use a task loop with a dynamically generated list of inputs. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
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. |
/reopen still valid |
I was looking to use expressions inline to modify some parts of my task. This sound like a solution that could work for me. Just commenting to keep the issue alive. |
@bitsofinfo @bremme Is there any support you could use from the CEL team to make this happen? |
Would be great to be able to do something like this in a Task (or anywhere
$()
variable syntax is supported)CEL is supported in triggers CEL interceptors, would be great if just globally available in all of tekton.
The text was updated successfully, but these errors were encountered: