fix: TestGHEPullRequestGitopsCommentCancel race#2598
Open
chmouel wants to merge 1 commit intotektoncd:mainfrom
Open
fix: TestGHEPullRequestGitopsCommentCancel race#2598chmouel wants to merge 1 commit intotektoncd:mainfrom
chmouel wants to merge 1 commit intotektoncd:mainfrom
Conversation
The E2E test TestGithubGHEPullRequestGitopsCommentCancel in test/github_pullrequest_retest_test.go:64 fails intermittently because it uses the wrong wait strategy after issuing /cancel. The test uses UntilRepositoryUpdated with MinNumberStatus: 3, which passes immediately when there are already ≥3 repo statuses — before the cancel has taken effect. The last status is then ConditionTrue (succeeded) instead of the expected ConditionFalse (cancelled) Reuse the same robust pattern that we already do in test/github_push_retest_test.go:194-211, it does this: 1. Waits for the PipelineRun to have Cancelled reason via UntilPipelineRunHasReason 2. Then waits for the Repository status to have Cancelled reason via UntilRepositoryHasStatusReason 3. Falls back to checking controller logs if the cancel didn't propagate
Member
Author
|
/test linters |
Member
Author
|
/test go-testing |
Member
Author
|
/test all |
Member
Author
|
/retest all |
Member
Author
|
/test linters |
2 similar comments
Member
Author
|
/test linters |
Member
Author
|
/test linters |
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 E2E test TestGithubGHEPullRequestGitopsCommentCancel in test/github_pullrequest_retest_test.go fails intermittently because it uses the wrong wait strategy after issuing /cancel. The test uses UntilRepositoryUpdated with MinNumberStatus: 3, which passes immediately when there are already ≥3 repo statuses — before the cancel has taken effect. The last status is then ConditionTrue (succeeded) instead of the expected ConditionFalse (cancelled).
Reuse the same robust pattern that we already do in test/github_push_retest_test.go:194-211, it does this:
🔗 Linked GitHub Issue
Fixes #2599
🧪 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 any issues. For an efficient workflow, I have considered installing pre-commit and runningpre-commit installto automate these checks.