Add e2e test to cover TaskRun retries #1975
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This test creates a PipelineRun with a single always-failing TaskRun
configured to retry N times. It checks that the PipelineRun fails (due
to retry exhaustion), that the single TaskRun created fails, and that it
reports the correct number of retry statuses. It also checks that there
are the correct number of Pods created, and it turns out there isn't! :o
We should fix the retry pod count bug, but for now having a test that
covers it is an improvement, and gives us an easy repro case to fix the
retry bug.
After writing this test, I realized TestPipelineRunFailedAndRetry
intended to test the same thing, but was (I think) harder to read, and
ended up only testing aspects of retries that happen to work (namely,
that there are as many retriesStatuses as there should be, not that
there are the correct number of Pods). So I've also deleted that test.
When the retry bug is fixed this test should help us avoid future instances of #1944.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
/assign @vdemeester