Skip to content

Always let Dependabot propose Cargo.lock updates #1967

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented Apr 25, 2025

This fixes a bug in the dependabot.yml configuration since #1948, where we intend Dependabot to include the effect of cargo update, but this does not happen because dependency-type: all was not explicitly allowed.

This does not make an analogous change to the Dependabot configuration for GitHub Actions, because all and direct currently have the same effect for them (and it is not obvious how it would work if that ever changes, or which we would prefer).

For details on why this is needed for Dependabot to update most locked dependencies in Cargo.lock aside from the case where the update is done as part of updating a Cargo.toml dependency, see:


This does not change the cadence, which is still set to monthly. Dependabot will perform a check after this is merged, because any change to dependabot.yml triggers new Dependabot version update checks for all configured ecosystems. It will open a PR because there will be updates, most but not all of which will be changes to Cargo.lock updating transitive dependencies that were not covered before due to the configuration shortcoming that this is fixing.

The fork-internal Dependabot test PR I used to verify these changes, formed by pushing this change to main in my fork and subsequently rewinding, was EliahKagan#22. This roughly reflects what the first Dependabot PR after this configuration change is merged will look like.

I will make a corresponding change to dependabot.yml in cargo-smart-release, where GitoxideLabs/cargo-smart-release#52 had the same bug as #1948. (Edit: This change is GitoxideLabs/cargo-smart-release#58.)

No such change in prodash is needed. This is because Dependabot version updates are only used for GitHub Actions, not for Rust/cargo dependencies, and also because we are not currently committing Cargo.lock in prodash.

The problem this is fixing does not affect the behavior of Dependabot security updates, which are already attempted for all types of dependencies.

This fixes a bug in the `dependabot.yml` configuration since GitoxideLabs#1948,
where we intend Dependabot to include the effect of `cargo update`,
but this does not happen because `dependency-type: all` was not
explicitly allowed.

This does not make an analogous change to the Dependabot
configuration for GitHub Actions, because `all` and `direct`
currently have the same effect for them (and it is not obvious how
it would work if that ever changes, or which we would prefer).

For details on why this is needed for Dependabot to update most
locked dependencies in `Cargo.lock` aside from the case where the
update is done as part of updating a `Cargo.toml` dependency, see:

- https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/controlling-dependencies-updated#allowing-specific-dependencies-to-be-updated
- https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#dependency-type-allow
@EliahKagan
Copy link
Member Author

The failure is due to #1816 and not related to any changes in this PR. I will rerun the workflow.

@EliahKagan EliahKagan merged commit 0e1867d into GitoxideLabs:main Apr 25, 2025
39 of 41 checks passed
@EliahKagan EliahKagan deleted the dependency-type branch April 25, 2025 14:25
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

Successfully merging this pull request may close these issues.

1 participant