-
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
Pipelinerun controller creates duplicate events #2857
Comments
/kind bug /cc @afrittoli |
Because the time stamps are identical, my impression is that something goes wrong in the fake recorder. I don't see how the controller could send the event twice with the same timestamps otherwise. I've started looking into this, I'll try to see if this is something we can address in the test code. |
never mind, I didn't read the issue properly - thank you for catching this! |
When finishReconcileUpdateEmitEvents was introduced in PR tektoncd#2805, I forgot to remove one of the original event.Emit, so one event was sent twice. The fake recorder sometimes probably recognised the duplicate and filtered it out, causing flackiness in tests, as unit tests expect a fixed number of events. Thanks @GregDritschler for troubleshooting this! Fixes: tektoncd#2857
When finishReconcileUpdateEmitEvents was introduced in PR tektoncd#2805, I forgot to remove one of the original event.Emit, so one event was sent twice. The fake recorder sometimes probably recognised the duplicate and filtered it out, causing flackiness in tests, as unit tests expect a fixed number of events. Thanks @GregDritschler for troubleshooting this! Fixes: tektoncd#2857
When finishReconcileUpdateEmitEvents was introduced in PR #2805, I forgot to remove one of the original event.Emit, so one event was sent twice. The fake recorder sometimes probably recognised the duplicate and filtered it out, causing flackiness in tests, as unit tests expect a fixed number of events. Thanks @GregDritschler for troubleshooting this! Fixes: #2857
Expected Behavior
When an event occurs a single time, the event count is 1.
Actual Behavior
The event count is 2.
We have e2e tests that verify event counts. This bug causes them to fail. Here is one example:
https://tekton-releases.appspot.com/build/tekton-prow/pr-logs/pull/tektoncd_pipeline/2850/pull-tekton-pipeline-integration-tests/1275691939903049728/
Steps to Reproduce the Problem
The problem can be seen with any PipelineRun but it is intermittent (perhaps because the event broadcaster is catching the duplicate?).
Additional Info
There are 2 calls to events.Emit, one at the end of the inner reconcile function (line 455) and another at the end of the outer reconcile function (line 210). This produces the same event twice. This bug may have been introduced in PR #2805.
Kubernetes version: 1.16
Tekton Pipeline version: Unreleased (master)
The text was updated successfully, but these errors were encountered: