pipeline
pipeline copied to clipboard
Flake: PipelineRun unittests (TestReconcile_InvalidPipelineRuns)
https://prow.tekton.dev/view/gs/tekton-prow/pr-logs/pull/tektoncd_pipeline/5466/pull-tekton-pipeline-unit-tests/1569343520609669120
TestReconcile_InvalidPipelineRuns/invalid-pipeline-run-resources-not-bound-shd-stop-reconciling:
{Failed }
}
pipelinerun_test.go:1320: error in test pipeline-resources-not-bound: received 2 events but 3 expected. Found events: []string{"Normal Started ", "Warning Failed PipelineRun foo/pipeline-resources-not-bound doesn't bind Pipeline foo/a-fine-pipeline's PipelineResources correctly: Pipeline's declared required resources are missing from the PipelineRun: [a-resource]"}}
While PipelineResources are deprecated and will be removed eventually, I think this is a more general issue with our PipelineRun unit tests that rely on events. We do have a FakeRecorded used in tests to record events, but we don't have an implementation of sending events for tests. (I think the issue is that the controller retries sending events, and the recorder may record duplicate events, which is what happened here.)
We could rewrite tests to filter out duplicate events, or we could provide a testing implementation of something that sends events and is allowed to block.
Yeah, the bulk of our flaky unit tests that I've seen are either in cmd/entrypoint
or event-based.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
with a justification.
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
with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen
with a justification.
/lifecycle stale
Send feedback to tektoncd/plumbing.
/assign
closed in #6063
Hope https://github.com/tektoncd/pipeline/pull/6063 can be a fix for this issue, we will continue to monitor the ci and see if it works