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

Group Dependabot version updates #202

Merged
merged 1 commit into from
Aug 10, 2024
Merged

Group Dependabot version updates #202

merged 1 commit into from
Aug 10, 2024

Conversation

EliahKagan
Copy link
Contributor

@EliahKagan EliahKagan commented Aug 10, 2024

This project uses the upload-artifact and download-artifact actions which, when updated with breaking changes, must be advanced together. But currently Dependabot attempts to update them separately. Each of the pull requests #184 and #186 were created separately, so they both fail for the checks that use cross (since the cross binary is cached as an artifact). If they were both merged in the hope that, together, they would work, then that would run the risk of missing some other problem, and it would also create a situation where, after one has been merged and the other has not, CI would be broken.

This modifies dependabot.yml so that Dependabot version updates are grouped. This should always solve that kind of problem, and do so without sacrificing automation. I have confirmed that it solves the current case of it, by enabling Dependabot version updates in my fork, observing that EliahKagan#1 and EliahKagan#3 fail the CI checks that use those actions, then making the change proposed here and observing that all checks pass in EliahKagan#4.

Furthermore, the current maximum of 3 Dependabot version update PRs suggests a preference for a small volume of them. Grouping them will almost always make it so there is at most one such PR, which is in line with that preference, while still allowing all available updates to be offered no matter how many or few of them there are. (It is only "almost always" due to conditions involving when a new PR causes an old PR to become obsolete, which happens only after the new PR is created, as well as situations involving Dependabot security updates.)

If this PR is merged, then Dependabot will create a grouped version update PR including the changes in #184 and #186 (and possibly others, if there are other versions that can be bumped). It should then immediately thereafter automatically close those two PRs (even if the new PR has not been merged).

So related actions, such as upload-artifact and download-artifact,
get updates together. This should allow the PRs to pass CI, and
also avoid a situation (if the check failures were disregarded)
where an intermediate state where some updates have been accepted
and others have not would break CI on main.
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's such a great find, thanks so much!

@Byron Byron merged commit 76a27c7 into rust-lang:main Aug 10, 2024
45 checks passed
@EliahKagan EliahKagan deleted the ci branch August 11, 2024 18:55
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.

2 participants