-
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
[Question] Should events for Started and Succesfull be emitted twice? #3549
Comments
Hi @Bl4d3s , thank for reporting this. We do not strictly guarantee uniqueness and order of events, however usually you should be getting events once. Do you see this on a regular basis or was it a one off? @mattmoor fyi |
Hi, thanks for the fast feedback. I see it happen more often then not unfortunately. Do you need any more input from my end ? Specific logs etc? |
If you still have the pipeline around, could you post the output of:
Any special reason for running a pipeline in the |
Output Output
Attached Pipeline is not that simple unfortunately.
Nope, just havent changed it yet. Will do so next week. Thanks for pointing it out. |
I have updated my application to save if an event was already handled. So my issue is solved. |
Thanks for the update on this issue, I'm glad you found a solution. @GregDritschler found out that a change to the taskrun / pipelinerun, for instance adding a label, will trigger another reconcile. If the timing is right the informer cache may be stale, thus making it more likely to have duplicate start events - see #3558. I don't see any extra label or annotation in your pipeline, so perhaps your issue is a different one, but I wanted to let you know anyways. Even without updates with labels, there is a slight chance that the informer cache may be out of sync when a new reconcile start, so @GregDritschler is also working on fixing the case where this could lead to duplicate taskrun creation. It will not solve the case of duplicate start events, so it's good that you handle that on your side. It would be interesting to understand why this happens so often for you. Could you perhaps share more information about what is your process for creating a pipelinerun? |
I did try to add some additional information via a patch on the pipelinerun (either annotation or label). Probably this triggered the additional reconcile run. Use case was the following:
I solved it for me by caching it in the sink and not adding it to the pipelinerun as it's not needed there specifically |
Hello,
Im not sure wether this is supposed behavior or not:
I get certain events twice, when executing a pipeline. Especially for the Started or Succeeded states.
My problem with this is, I want to use the events (CloudEvents) for triggering certain tasks in an sink.
One example would be sending an email on pipeline finish.
My setup:
OpenShift (v4.6.3) with CodeReadyContainers on Windows (1.19.0)
Tekton Pipelines Version: v0.18.1
Tekton Triggers Version: v0.9.1
See this controller log: (first and last line are the events).
The text was updated successfully, but these errors were encountered: