-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Backpropagate Cargo.lock updates to all lock files #9180
Conversation
Yeah, but I researched this a bit and no better solution came up for weeks while pondering when waiting builds... I think the For the dependabot fiddling path, I could register each
Yeah, that's true. But that doesn't solve all problems I'd like to fix as described above. Can do as a separate PR for the format change. |
Ok so I think my main concern about this PR is that how it adds a ton of stuff into I think the ideal end state is a new build step in https://github.com/solana-labs/solana/blob/master/ci/buildkite.yml, that: To get there will be a multi-step process:
I can look at adding (1) if this approach sounds good to you. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This stale pull request has been automatically closed. Thank you for your contributions. |
Yeah, that looks great way to accomplish what I want to achieve. :) |
7d0a648
to
933aa1d
Compare
Codecov Report
@@ Coverage Diff @@
## master #9180 +/- ##
========================================
- Coverage 80.6% 80.6% -0.1%
========================================
Files 279 279
Lines 63375 63375
========================================
- Hits 51110 51105 -5
- Misses 12265 12270 +5 |
3c0c76f
to
c7fe413
Compare
@mvines I think this pr is ready for review again! I'm playing with this dependabot's PR this time: https://github.com/solana-labs/solana/pull/9508/commits test builds: this pr (for normal users): https://buildkite.com/solana-labs/solana/builds/22845 |
@@ -13,6 +13,15 @@ export RUSTFLAGS="-D warnings" | |||
# Look for failed mergify.io backports | |||
_ git show HEAD --check --oneline | |||
|
|||
if _ scripts/cargo-for-all-lock-files.sh check --locked; then |
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 is what I really want to do before any our depending crates are compromised. :)
ci/dependabot-updater.sh
Outdated
package=$(echo "$parsed_update_args" | awk '{print $2}') | ||
if [[ -n $parsed_update_args ]]; then | ||
# shellcheck disable=SC2086 | ||
_TARGET_LOCK_FILES=$(git grep --files-with-matches "$package" :**/Cargo.lock) \ |
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.
Using _TARGET_LOCK_FILES
to pass a list into scripts/cargo-for-all-lock-files.sh
feels a little too sneaky to me. It would be nice to fit this on the scripts/cargo-for-all-lock-files.sh
command line.
$ scripts/cargo-for-all-lock-files.sh $(_TARGET_LOCK_FILES) -- update $parsed_update_args
perhaps? And if there's no --
argument then we use $(git ls-files :**/Cargo.lock)
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.
Yeah, I've been concerned a bit too... I followed an easier path considering these script's intended usage frequency. Thanks for accurately pin-pointing this while reviewing! I've changed my mind and give this some love. :)
54f155f
to
a092c3f
Compare
I'll wait a week or so before I back-port this to all version branches (It should be almost no effort). Also, I'll do quick-post to the upstream's dependabot/feedback#5 to share this for the rust+dependabot community. |
Problem
Non-default Cargo lock files tend to be forgot to update. this causes many problems:
git diff
on CI shows some difference.This is a problem which I noticed at #8882. Since then, I've been always bothered with our trust-chain in the build/CI system a bit... Let's fortify it step by step before we get pray of third-party crate publisher's credential hack :)
Summary of Changes
live example: https://github.com/solana-labs/solana/pull/9159/commits
partly related to this: #8587 (comment)
upstream (dependabot)'s related issue: https://github.com/dependabot/feedback/issues/5