Skip to content
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

Flaky test TestMergeRequiredContextsCommitStatus #29661

Closed
silverwind opened this issue Mar 8, 2024 · 2 comments · Fixed by #29672
Closed

Flaky test TestMergeRequiredContextsCommitStatus #29661

silverwind opened this issue Mar 8, 2024 · 2 comments · Fixed by #29672

Comments

@silverwind
Copy link
Member

silverwind commented Mar 8, 2024

https://github.com/go-gitea/gitea/actions/runs/8199270074/job/22424432087

--- FAIL: TestMergeRequiredContextsCommitStatus (0.00s)
    commit_status_test.go:62: 
        	Error Trace:	/home/runner/work/gitea/gitea/services/pull/commit_status_test.go:62
        	Error:      	Test case failed
        	Test:       	TestMergeRequiredContextsCommitStatus
        	Messages:   	Test case 4 failed
FAIL
@yp05327
Copy link
Contributor

yp05327 commented Mar 8, 2024

This test is added in #29631
for case 4, CommitStatus are

{
    {Context: "Build 1", State: structs.CommitStatusSuccess},
    {Context: "Build 2", State: structs.CommitStatusSuccess},
    {Context: "Build 2t", State: structs.CommitStatusSuccess},
},

the rule is

{"Build*", "Build 2t*", "Build 3*"},

and why expected result is structs.CommitStatusPending, all of them are success 🤔

@charles7668
Copy link
Contributor

This test is added in #29631 for case 4, CommitStatus are

{
    {Context: "Build 1", State: structs.CommitStatusSuccess},
    {Context: "Build 2", State: structs.CommitStatusSuccess},
    {Context: "Build 2t", State: structs.CommitStatusSuccess},
},

the rule is

{"Build*", "Build 2t*", "Build 3*"},

and why expected result is structs.CommitStatusPending, all of them are success 🤔

This is related to #29143. If a rule is added, then at least one matching action needs to exist.

discussion in #29631

silverwind pushed a commit that referenced this issue Mar 8, 2024
Close #29661

fix #29656

Co-authored-by: Giteabot <teabot@gitea.io>
GiteaBot added a commit to GiteaBot/gitea that referenced this issue Mar 8, 2024
6543 pushed a commit that referenced this issue Mar 8, 2024
Backport #29672 by @charles7668

Close #29661

fix #29656

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants