Enhance gradle tasks for managing lockfiles #3829
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces and updates gradle tasks for managing lockfiles. Here are the highlights:
smithy-rs
repository without theaws-sdk-rust
repository.New/updated gradle tasks are intended for automation:
-Paws-sdk-rust-path
. We plan to incorporate it into a weekly GitHub Action to automate lockfile updates:In addition, this PR has updated the SDK lockfile by executing
./gradlew aws:sdk:syncAwsSdkLockfile
. The updated lockfile no longer includes many SDK crates that are unused in CI/CD processes. The new SDK lockfile is in sync with the runtime lockfiles:Testing
I have verified the change against basic use cases:
When running
cargoUpdateAllLockfiles
, dependencies will be updated to their latest versions, while broken crates will be pinned to the last known good versions.Expand for more details...
When we execute
all lockfiles include the latest versions of dependencies, except for those that are pinned due to being broken. Currently, minicbor is pinned to 0.24.2:
Finally, the
sdk-lockfiles audit
command should run successfully after updating all lockfiles:I also specified multiple broken dependencies and verified they were all downgraded to the specified versions.
When a new dependency is added to a runtime crate, running
syncAwsSdkLockfile
will ensure that this new dependency is included in the SDK lockfile.Expand for more details...
For instance, with this hypothetical new dependency:
If we then execute
the SDK lockfile will be updated to reflect only the change from
rust-runtime/Cargo.lock
:The updated SDK lockfile should now be in sync with runtime crates:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.