-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
CI: cancel in-progress workflow runs after a push #112955
Conversation
Looks like it works. https://github.com/rust-lang/rust/actions/runs/5354873599/jobs/9712454947?pr=112955 was cancelled after the push of c579865. |
c579865
to
3c2b8b0
Compare
rust-lang/simpleinfra#303 shouldn't cancel-outdated-build work similarly? |
Oh, thanks, I didn't notice. Well, it doesn't seem to work currently. |
Except that currently there idea that failling mingw-check-tidy should't fail other PR jobs. |
@bors try |
⌛ Trying commit fcfa036ad401722f60a1e6178d186a1ca988a32d with merge fa12c2abed4b7027ba6136d4208bf010f02a9913... |
This comment has been minimized.
This comment has been minimized.
fcfa036
to
1f6e054
Compare
1f6e054
to
e8973ea
Compare
@bors r+ rollup |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#111326 (Add support for NetBSD/aarch64-be (big-endian arm64).) - rust-lang#112559 (Add esp-idf missing targets) - rust-lang#112840 (doc: loongarch: Update maintainers) - rust-lang#112955 (CI: cancel in-progress workflow runs after a push) - rust-lang#112979 (Rewrite most diagnostics as translatable within resolve/imports) - rust-lang#113034 (Switch some more Steps to `builder.msg`) r? `@ghost` `@rustbot` modify labels: rollup
@@ -30,10 +30,11 @@ permissions: | |||
defaults: | |||
run: | |||
shell: bash | |||
concurrency: | |||
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this cancel parallel try builds? Right now we allow infinite concurrent try builds, and IMO we should continue to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already discussed here. I hope it shouldn't cancel try builds, because they should have different SHAs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github.ref
is not the commit SHA, it's refs/heads/trying
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then that's bad, I will investigate and fix. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it cancels parallel try builds, dammit. Sorry for that, I will send a PR with a fix soon.
…lbini CI: do not cancel concurrent builds on the same branch Do not cancel concurrent builds on the same branch (outside of PRs). Instead, only cancel them if the builds have the same commit SHA. From the [documentation](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context): > The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)." For example, ffac537e6cbbf934b08745a378932722df287a53. Fixes: rust-lang#112955 (comment) r? `@pietroalbini`
CI: do not cancel concurrent builds on the same branch Do not cancel concurrent builds on the same branch (outside of PRs). Instead, only cancel them if the builds have the same commit SHA. From the [documentation](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context): > The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)." For example, ffac537e6cbbf934b08745a378932722df287a53. Fixes: rust-lang/rust#112955 (comment) r? `@pietroalbini`
CI: replace `cancel-outdated-builds` with `concurrency` group This is the last remaining [usage](https://github.com/search?q=org%3Arust-lang%20cancel-outdated-builds&type=code) of the [cancel-outdated-builds](https://github.com/rust-lang/simpleinfra/tree/master/github-actions/cancel-outdated-builds) CI action. Which means that if we remove its usage, we can remove the code of the action :) This action was replaced in `rust-lang/rust` with the native Github Actions `concurrency` group [last year](rust-lang/rust#112955). Note that unlike `rust-lang/rust`, which explicitly allows parallel try builds, `clippy` did not allow them, as all steps of the `clippy_bors.yaml` workflow used the `cancel-outdated-builds` action, regardless of the branch. So the new `concurrency` group mirrors that, which makes it a bit simpler than on `rust-lang/rust`. r? `@Mark-Simulacrum`
CI: replace `cancel-outdated-builds` with `concurrency` group This is the last remaining [usage](https://github.com/search?q=org%3Arust-lang%20cancel-outdated-builds&type=code) of the [cancel-outdated-builds](https://github.com/rust-lang/simpleinfra/tree/master/github-actions/cancel-outdated-builds) CI action. Which means that if we remove its usage, we can remove the code of the action :) This action was replaced in `rust-lang/rust` with the native Github Actions `concurrency` group [last year](rust-lang/rust#112955). Note that unlike `rust-lang/rust`, which explicitly allows parallel try builds, `clippy` did not allow them, as all steps of the `clippy_bors.yaml` workflow used the `cancel-outdated-builds` action, regardless of the branch. So the new `concurrency` group mirrors that, which makes it a bit simpler than on `rust-lang/rust`. changelog: none r? `@Mark-Simulacrum`
CI: do not cancel concurrent builds on the same branch Do not cancel concurrent builds on the same branch (outside of PRs). Instead, only cancel them if the builds have the same commit SHA. From the [documentation](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context): > The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)." For example, ffac537e6cbbf934b08745a378932722df287a53. Fixes: rust-lang/rust#112955 (comment) r? `@pietroalbini`
CI: do not cancel concurrent builds on the same branch Do not cancel concurrent builds on the same branch (outside of PRs). Instead, only cancel them if the builds have the same commit SHA. From the [documentation](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context): > The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)." For example, ffac537e6cbbf934b08745a378932722df287a53. Fixes: rust-lang/rust#112955 (comment) r? `@pietroalbini`
Experimenting with the
concurrency
attribute.r? @Mark-Simulacrum