test: use /test for TestGiteaReTestAll (and rename it)#2589
Open
chmouel wants to merge 3 commits intotektoncd:mainfrom
Open
test: use /test for TestGiteaReTestAll (and rename it)#2589chmouel wants to merge 3 commits intotektoncd:mainfrom
chmouel wants to merge 3 commits intotektoncd:mainfrom
Conversation
The TestGiteaRetestAll E2E test was flaky due to a race condition between the initial pull_request event and the /retest comment event. Here is what was happening: 1. The test creates a PR, which triggers a PipelineRun 2. The test then posts /retest to re-run all pipelines 3. Both events (pull_request and retest) are processed concurrently 4. The /retest handler calls filterSuccessfulTemplates to skip pipelines that already succeeded 5. Because the initial PipelineRun completes very fast (it just runs "echo HELLOMOTO"), the retest filter sometimes sees it as already successful and skips it 6. This means only 1 out of 2 expected statuses are created, causing a timeout The fix is to use /test instead of /retest. The /test command re-runs all pipelines unconditionally, without checking if they already succeeded. This eliminates the race condition entirely. The test is also renamed from TestGiteaRetestAll to TestGiteaTestAll to reflect the new behavior being tested, and a stale TODO comment is removed. Signed-off-by: Chmouel Boudjnah <chmouel@chmouel.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Member
Author
|
/retest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📝 Description of the Change
The TestGiteaRetestAll E2E test was flaky due to a race condition
between the initial pull_request event and the /retest comment event.
Here is what was happening:
pipelines that already succeeded
"echo HELLOMOTO"), the retest filter sometimes sees it as already
successful and skips it
a timeout
The fix is to use /test instead of /retest. The /test command
re-runs all pipelines unconditionally, without checking if they
already succeeded. This eliminates the race condition entirely.
The test is also renamed from TestGiteaRetestAll to TestGiteaTestAll
to reflect the new behavior being tested, and a stale TODO comment
is removed.
🔗 Linked GitHub Issue
Fixes #
🧪 Testing Strategy
🤖 AI Assistance
AI assistance can be used for various tasks, such as code generation,
documentation, or testing.
Please indicate whether you have used AI assistance
for this PR and provide details if applicable.
Important
Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Claude noreply@anthropic.com
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.