Comments (12)
I like it!
Might be a noob questions, but would we need to explicitly list all fields in outputs
? It seems like it would be great if we could treat the output of the step similar to the event
in TriggerTemplates.
e.g. for the examples you gave above, being able to reference the ParamBinding in the TriggerBinding:
spec:
params: # side note - are these outputs? i think thats the intention...
- name: version
value: $(event.head_commit.id)
- name: version
value: $(nightly-version-binding.versionTag)
For filtering, this may not solve all problems since we might want to make some bindings conditional (e.g. don't call out to GitHub to check membership if we don't even care about the repo).
from triggers.
@bobcatfish Do you feel that this has been "solved" by adding interceptors as well as static parameters in the EventListener
?
from triggers.
I agree. Interceptors (both CEL overlays + Webhooks) can modify the event body and add extra "dynamic" parameters
from triggers.
In the case of creating a release, there is no event to process? A "manual" TaskRun
/Pipeline
could use whatever parameters necessary to do this. Alternatively, if a tag was added to the repository, a "tag trigger" (or some such event that contains the necessary params) could take this event information and work as current to upload a release?
from triggers.
I think having additional parameters exterior to the event might be unavoidable though and we wouldn't want to ruin re-usability. To this point, the initial thought is to push more into the EventListener
since it isn't reusable.
from triggers.
Also, this gets at the discussion of reusability in general and how much there really is. Spoke with @ncskier about this yesterday and a TriggerTemplate
can only be as reusable as the resources it is templating (e.g. a Pipeline
). I can easily be swayed to the pursuit of reusability, but I don't believe the case is as strong as with core Tekton. If tools like tkn
or the skylark approach pick up steam, maybe a catalog is unnecessary and reusability becomes less important? Just a thought.
from triggers.
The way I implemented this for now is an initContainer
in the CronJob
that triggers the EventListener
: https://github.com/tektoncd/plumbing/blob/master/tekton/config/nightly-release-cron-base/trigger-with-uuid.yaml#L35.
I could do the same with an interceptor, but it's not clear for me yet how to best use them.
Since interceptors are services, if I have to create a new service for every time I need to inject an extra parameter, I will end up with a lot of services that do nothing most of the time.
I could use one interceptor to handle different pipelines, but then I would lose the separation of concerns, and my interceptor would become more complex and hard to maintain.
from triggers.
In PR #438, a discussion started about the use-case of chaining Interceptors: #438 (comment)
@ncskier A use case for chained interceptors - validate using a Github interceptors, add a webhook interceptor to call out to GH for adding additional info, and then perhaps a CEL filter. I think these would be fairly common.
The use-case described made me think about this issue, and whether it should be the job of an Interceptor to "call out" for additional information, or if we need a separate mechanism in Triggers for this.
Interceptors were initially built as a way to validate events. However, their role has now grown to include calling out for additional information (the feature called "dynamic params" in this issue).
If we're happy with Interceptors taking on this dual-role, then we can close this issue. However, I think that it would be helpful to revisit this issue, because @afrittoli raised some good points about why we might not want to use Interceptors to get "dynamic params" :
Since interceptors are services, if I have to create a new service for every time I need to inject an extra parameter, I will end up with a lot of services that do nothing most of the time.
I could use one interceptor to handle different pipelines, but then I would lose the separation of concerns, and my interceptor would become more complex and hard to maintain.
I'm interested to know if anything about this issue has changed since it was last discussed in October 😅
from triggers.
I think with the inclusion of WebhookInterceptors we can close this out.
Since interceptors are services, if I have to create a new service for every time I need to inject an extra parameter, I will end up with a lot of services that do nothing most of the time.
I could use one interceptor to handle different pipelines, but then I would lose the separation of concerns, and my interceptor would become more complex and hard to maintain.
I think #270 will help this. You can either provide a Service, or a URL (where you could host multiple interceptor endpoints). I suspect possibly adding a URL path to Services may also help this out this particular case, this way you could deploy a single Service and route accordingly.
I suspect this is an area we can learn from Knative Addressables (e.g. https://github.com/knative/pkg/blob/d9a38f13e8b9aa736f714b793ee28788de1b30e0/apis/duck/v1beta1/destination.go#L26-L47)
from triggers.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Send feedback to tektoncd/plumbing.
from triggers.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Send feedback to tektoncd/plumbing.
from triggers.
I feel like interceptors are the answer to this these days 🤔 , do you agree @dibyom @wlynch ?
from triggers.
Related Issues (20)
- webhook触发成功。没有生成流水线运行 HOT 4
- Unable to run pipeline after webhook is triggered HOT 4
- TriggerTemplate `.spec.resourcetemplates` capitalization breaks Terraform `kubernetes_manifest` HOT 3
- `namespaceSelector` under `tiggerGroups` will not set `--is-multi-ns=true` on `EventListener` `Pod`. HOT 4
- EventListener loglevel would be more specific HOT 1
- Move Event version to metadata instead of having hard coded version on event type HOT 1
- Support for Default Values in Tekton TriggerBinding Parameters HOT 2
- flaky presence of tekton-generated labels in pipelineRun and taskRun 'Started' cloud events
- Cannot create EventListener with “Timed out waiting on CaBundle to available for Interceptor: empty caBundle in clusterInterceptor spec“
- Required Kubernetes Version HOT 1
- Starting the multiple triggers with Github interceptor is limited by the client rate limiter HOT 2
- Can't install tekton triggers
- Triggers do not include TriggerTemplate labels when creating resources HOT 2
- Functionality is not working after upgrading Triggers from 0.25.x to 0.26.0
- Ability of pipelines eventlistener to handle preflight options request sent for CORS verification HOT 1
- Enable Triggers to create custom non-Tekton resources HOT 4
- EventListener cannot see Triggers in other than deployment namespace HOT 2
- Incorrect swagger.json
- How to give affinity and toleration to Tekton Eventlistner HOT 4
- eventlistener_event_count metric without not status label HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from triggers.