-
Notifications
You must be signed in to change notification settings - Fork 23
ci: Watch cargo deps with dependabot #355
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,36 @@ 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):" | ||
| # openjd-* minor bumps get a PR each: they are 0.x, where cargo treats a | ||
| # minor as breaking, and they carry the API surface these bindings wrap. | ||
| # Everything else is grouped — tokio, uuid and serde_json are 1.x, where a | ||
| # minor is additive, and transitive Cargo.lock bumps are noise. | ||
| # | ||
| # Every cargo PR needs `scripts/check_third_party_licenses.sh --update` | ||
| # committed onto its branch: that check renders crate versions from | ||
| # Cargo.lock and dependabot cannot regenerate it. | ||
| groups: | ||
| # Matched first, so an openjd-* patch groups here and only minors reach | ||
| # the exclusion below. Majors match no group and so get a PR each. | ||
| cargo-patch: | ||
| patterns: | ||
| - "*" | ||
| update-types: | ||
| - "patch" | ||
| cargo-minor: | ||
| patterns: | ||
| - "*" | ||
| exclude-patterns: | ||
| - "openjd-*" | ||
|
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 "0.x minor = breaking" rationale used to exclude From
The comment above justifies grouping with "tokio, uuid and serde_json are 1.x, where a minor is additive", which is true for those three but silently mis-describes the four 0.x crates. As written, Consider either widening the exclusion, e.g. exclude-patterns:
- "openjd-*"
- "pyo3*"
- "windows"( |
||
| update-types: | ||
| - "minor" | ||
| - 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.
This comment documents a step Dependabot cannot perform, which means every cargo PM this config opens will land with a failing required check and, per
.github/workflows/auto_approve.yml, an automatic approval on top of it.The chain:
Cargo.lockbump) changesCargo.lock.third_party_licensesin.github/workflows/rust_quality.ymlrunsscripts/check_third_party_licenses.shin verify mode, which renders crate versions fromCargo.lockanddiffs against the committedTHIRD-PARTY-LICENSES.txt— exit 1 on any drift.auto_approve.ymltriggers on anypull_requestwheregithub.actor == dependabot[bot]with no gate on check status or update type, so the PR gets approved regardless.An approved PR sitting on a red check is a bad steady state for a repo where
THIRD-PARTY-LICENSES.txtships with every release: the failure becomes routine noise, and routine noise is what gets clicked past. Since the Pythonpipecosystem block above also feeds the same script (viapyproject.toml [project.dependencies]), this is pre-existing for pip bumps, but adding cargo makes it the common case rather than the rare one.Worth resolving before enabling this, rather than relying on the comment being read. Options:
pull_requestrestricted togithub.actor == dependabot[bot]that runsscripts/check_third_party_licenses.sh --updateand pushes the result onto the Dependabot branch, so the check goes green on its own.CONTRIBUTING.md/DEVELOPMENT.mdwhere a maintainer will actually see it, and consider gatingauto_approve.ymlso it does not approve PRs whose checks have not passed.