-
Notifications
You must be signed in to change notification settings - Fork 23
ci: Add cargo to dependabot so openjd-rs releases open their own PR #336
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
base: mainline
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,6 +25,25 @@ updates: | |||||||||||||||||||||||||||||||||||||
| update-types: | ||||||||||||||||||||||||||||||||||||||
| - "minor" | ||||||||||||||||||||||||||||||||||||||
| - "patch" | ||||||||||||||||||||||||||||||||||||||
| - package-ecosystem: "cargo" | ||||||||||||||||||||||||||||||||||||||
| directory: "/" # Workspace root; rust-bindings is discovered as a member | ||||||||||||||||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||||||||||||||||
| interval: "weekly" | ||||||||||||||||||||||||||||||||||||||
| day: "monday" | ||||||||||||||||||||||||||||||||||||||
| commit-message: | ||||||||||||||||||||||||||||||||||||||
| prefix: "chore(deps):" | ||||||||||||||||||||||||||||||||||||||
| # Patch bumps are combined into a single PR. Minor bumps do not match this | ||||||||||||||||||||||||||||||||||||||
| # group and so each get their own individual PR, because every crate this | ||||||||||||||||||||||||||||||||||||||
| # package depends on is pre-1.0: for a 0.x crate cargo treats a minor bump | ||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "every crate this package depends on is pre-1.0" is not accurate, and it is the premise the grouping choice rests on. Per
For the three 1.x crates a minor bump is explicitly non-breaking under cargo's semver rules, so the "0.x minor == breaking, so isolate it" rationale does not apply to them — yet they are excluded from If the intent is "isolate only the genuinely-breaking 0.x minors", consider adding a second group that sweeps up the 1.x minors, e.g.: groups:
cargo-patch:
patterns: ["*"]
update-types: ["patch"]
cargo-stable-minor:
patterns: ["tokio", "uuid", "serde_json"]
update-types: ["minor"]Otherwise the comment should just be corrected to say most deps are pre-1.0 and the per-PR split is being accepted for all minors for simplicity. |
||||||||||||||||||||||||||||||||||||||
| # as breaking, so openjd-expr 0.3 -> 0.4 deserves its own review rather | ||||||||||||||||||||||||||||||||||||||
| # than riding along with a patch. | ||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The stated goal — "openjd-expr 0.3 -> 0.4 deserves its own review rather than riding along with a patch" — is defeated by if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: dependabot/fetch-metadata@v3
id: metadata
- run: gh pr review --approve "$PR_URL"So the isolated-PR-per-minor-bump split buys separation but not review: a
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'(That is a change to |
||||||||||||||||||||||||||||||||||||||
| groups: | ||||||||||||||||||||||||||||||||||||||
| cargo-patch: | ||||||||||||||||||||||||||||||||||||||
| patterns: | ||||||||||||||||||||||||||||||||||||||
| - "*" | ||||||||||||||||||||||||||||||||||||||
| update-types: | ||||||||||||||||||||||||||||||||||||||
| - "patch" | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - package-ecosystem: "github-actions" | ||||||||||||||||||||||||||||||||||||||
| directory: "/" # Location of package manifests | ||||||||||||||||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
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.
Enabling the
cargoecosystem will make every Dependabot Rust PR fail CI, because Dependabot updatesCargo.lockbut cannot regenerateTHIRD-PARTY-LICENSES.txt.The
third_party_licensesjob in.github/workflows/rust_quality.ymlrunsscripts/check_third_party_licenses.sh, which renders the Rust section fromCargo.lockviacargo about generateand then hard-fails on any diff:The committed file embeds exact crate versions (
** tokio; version 1.53.1,** memchr; version 2.8.3, ...), so a bump of any crate — including a transitive patch bump inside thecargo-patchgroup — changes the rendered output and trips the check. There is no path for a bot-authored PR to fix this on its own, so cargo Dependabot PRs will land permanently red and need a manualscripts/check_third_party_licenses.sh --updatecommit pushed onto each one.Worth deciding up front which way to go, e.g.:
contents: write) that runs--updateand commits back to the Dependabot branch, ordependabot[bot]-authored PRs, orNote this is specific to cargo: the existing
pipgroup only bumpsrequirements-*.txt(dev/test), which the script does not include since it resolves Python deps from the installed wheel's runtime closure.