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

[ci] Permit skipping cargo-semver-checks for a particular PR #2083

Open
joshlf opened this issue Nov 20, 2024 · 0 comments
Open

[ci] Permit skipping cargo-semver-checks for a particular PR #2083

joshlf opened this issue Nov 20, 2024 · 0 comments
Assignees

Comments

@joshlf
Copy link
Member

joshlf commented Nov 20, 2024

Sometimes cargo-semver-checks has false positives. It's not desirable, in these cases, to simply use the GitHub web UI "Merge without waiting for requirements to be met" option:

Image

The reason is that this option also bypasses the merge queue, which we use to perform a number of checks which are disabled during a normal PR CI run.

Instead, we should teach the cargo-semver-checks CI step to check for an explicit directive in a PR's last commit message which instructs it to skip performing its checks. Something like:

SKIP_CARGO_SEMVER_CHECKS=1

Commit message

One important detail is that this directive should go in the last (ie most recent) commit message in the PR. Most of our PRs contain a single commit, but sometimes they contain multiple commits (e.g. when we use the web UI to merge recent changes from the target branch), and third-party contributors often don't use our development flow, and include multiple commits. The reason to use the commit message (as opposed to, for example, the PR message) is that:

  • It's easier to check for in a GitHub Action
  • It will be trivially available when the PR is running through the merge queue - by that time, multiple commits have been squashed, and their commit messages have been merged
  • It's a minor inconvenience to users who get this wrong - CI will fail, and so they'll know that they need to fix something
  • It will not admit false positives (ie, we'll never incorrectly skip cargo-semver-checks)
@joshlf joshlf self-assigned this Nov 20, 2024
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 20, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
joshlf added a commit that referenced this issue Nov 21, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
github-merge-queue bot pushed a commit that referenced this issue Nov 21, 2024
This is triggered when the most recent commit in a PR has a commit
message which contains the string `SKIP_CARGO_SEMVER_CHECKS=1` on its
own line.

SKIP_CARGO_SEMVER_CHECKS=1

Closes #2083

gherrit-pr-id: Iffcecec3b7abfd48a67011d5979aa075b68da0ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant