-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Workflow] Commits with "[skip ci]" should inherit build and test status from the previous build #1809
Comments
I spent some time looking into this, given how many times we've been burnt by this false positive ✅ .. I think we can have a python script that does some crawling & JSON parsing using the GitHub API:
A few catches:
|
From the CI experience so far, now I think it's better to add a step to cancel the previous workflow, if there is any, when a new commit arrives. This even includes the commits from @taichi-gardener. Right now we've made "Build and Test (CPU)" a required job to pass before merging. However, for @taichi-gardener's commits, this is skipped to save CI resources. This led to a situation where, while the previous run state is inherited by the "Checks the Workflow Run of the Previous Commit" job, we still cannot merge and have to re-trigger CI eventually... If we choose to cancel the previous CI jobs, we can afford @taichi-gardener 's commits to go through the CIs, too. This is also how most of the CI pipelines work. I'll play with this idea a bit. Meanwhile, let me know if you have any other thought on this, thanks! |
Concisely describe the proposed feature
To save CI resources the format server always commits with the prefix "[skip ci]". This means the buildbots will not test the latest commit.
If the previous commit actually fails to pass tests, build bots working on the latest commit will not detect it. Then GitHub will show a misleading tick.
For example, a recent PR was accidentally merged and then the master branch fails to pass the tests. This is likely because the PR author considered the build status of the latest commit as the PR build status:
Describe the solution you'd like (if any)
Somehow modify the GitHub workflow so that for commits with "[skip ci]", query the last commit without "[skip ci]" and inherit the build status? @archibate is the expert in related topics.
The text was updated successfully, but these errors were encountered: