-
Notifications
You must be signed in to change notification settings - Fork 195
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
Add CI step to release workflow to check for semver hazards #3383
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
10e1700
to
4c41dcc
Compare
4c41dcc
to
cfa45d6
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
Ran a dry-run against this branch to confirm the new check works: https://github.com/smithy-lang/smithy-rs/actions/runs/7645480204/job/20832185070 |
# | ||
|
||
# This script patches the new runtime crates into an old AWS SDK and runs tests | ||
# to check for semver hazards, such as a `Storable` being in an unstable runtime crate. |
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.
should note how to set this up (notably, $PWD/aws-sdk-rust, and smithy-rs need to exist)
for sdk in dynamodb s3; do | ||
echo -e "${C_YELLOW}# Testing ${sdk}...${C_RESET}" | ||
pushd "aws-sdk-rust/sdk/${sdk}" &>/dev/null | ||
cargo test --all-features | ||
popd &>/dev/null | ||
done |
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.
should we cargo check
a few more?
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.
I don't think cargo check will do a whole lot for us here since these breaks happen at runtime, unless you're thinking of having it detect backwards compatibility issues. These two services should compile enough runtime crates that I think it would catch most of those.
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.
have you tried creating an intentional semver break and then running release in preview mode?
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.
have you tried creating an intentional semver break and then running release in preview mode?
I verified that locally by invoking the script manually. I also confirmed the script is working correctly in GitHub Actions in https://github.com/smithy-lang/smithy-rs/actions/runs/7645370946/job/20831801559, where you can see it correctly picked up the patched crate version and then failed to compile due to deprecations and
|
This CI step will check for subtle semver hazards with the
ConfigBag
during release. Once all the runtime crates are independent, then this check can be moved into normal CI.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.