Repository navigation
Never auto-merge a -major group, whatever the version numbers say - #8
Merged
Merged
Conversation
The first Dependabot run found the hole on day one. indicatif 0.17.9 -> 0.18.6 arrived in the `cargo-major` group and reported `version-update:semver-minor`, because fetch-metadata reads the version components and 0.17 -> 0.18 moves the minor one. Cargo treats that component as the breaking one below 1.0, so Dependabot grouped it correctly; the two clauses in the rule are ORed, so the minor reading overrode the major group and the pull request queued itself for merge. It did not merge, but only because auto-merge happens to be switched off for the repository. That is luck, not the design working, and every 0.x dependency would walk through the same gate. The group name is the reading that knows about 0.x semantics, so it now overrules rather than merely failing to grant: a `-major` group is a veto, applied last. Checked against the case that got through and against the routine and ungrouped cases, which are unaffected. Also makes the missing repository setting legible. `gh pr merge --auto` against a repository with auto-merge disabled fails with a bare GraphQL error that reads like a broken workflow; it now names the setting and where to turn it on.
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.
Found by the automation on its first run rather than by reading it.
#4bumped indicatif 0.17.9 to 0.18.6. It arrived in thecargo-majorgroup, and
fetch-metadatareported it asversion-update:semver-minor:Cargo treats the minor component as the breaking one below 1.0, so Dependabot
grouped it correctly, and fetch-metadata, reading the version numbers alone,
called it a minor. The rule ORs the two clauses, so the minor reading overrode
the major group and the pull request queued itself for merge.
It did not actually merge, but only because auto-merge is switched off for this
repository. That is luck rather than the design working, and every 0.x
dependency would walk through the same gate.
get_MNVhas the same rule and sopresumably the same hole.
The fix
The group name is the reading that knows about 0.x semantics, so it overrules
rather than merely failing to grant. A
-majorgroup is now a veto, appliedlast.
Decision matrix, checked against the case that got through:
cargo-majorsemver-minorcargo-majorsemver-majorcargo-routinesemver-patchcargo-routinesemver-minordocs-routinesemver-patchAlso makes the missing repository setting legible:
gh pr merge --autoagainsta repository with auto-merge disabled fails with a bare GraphQL error that reads
like a broken workflow. It now names the setting and where to turn it on.
Note
Allow auto-merge is still off under Settings → General. Until it is on, no
routine update can merge itself and this job will fail on each one, now with a
message saying why.