Commit aa89dcd
authored
Detect tools changes in smithy-rs since the last update to config.json (#1382)
## Motivation and Context
When modifying the
[tools](https://github.com/smithy-lang/smithy-rs/tree/main/tools)
directory in `smithy-rs`, we must update our production release
infrastructure with a new container image tag before updating
`smithyRsVersion` in `config.json`. Failing to do so causes production
build failures.
For instance, during MSRV updates, we modify the
[Dockerfile](https://github.com/smithy-lang/smithy-rs/blob/main/tools/ci-build/Dockerfile)
in the `tools` directory. If we update `smithyRsVersion` in
`config.json` without first updating the container image tag in
production release environment, builds will fail because the code
generator emits Rust code compliant with the new MSRV, but the container
still uses an older compiler for testing.
This PR adds a mechanism to prevent this operational error by:
1. Running git diff between release tags (current `smithyRsVersion` in
main vs. PR branch)
2. Checking for any changes under the tools directory
3. Failing the release check workflow if changes are detected
Once the image tag has been updated in the production release
environment, we can use the bot user to override and merge the PR to
main.
## Testing
- Tested detection by deliberately specifying an old release and
reversing the `git diff` argument order to confirm tools change
detection
([dry-run](https://github.com/awslabs/aws-sdk-rust/actions/runs/19442709471/job/55629667389#step:5:69))
---
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.1 parent 9b09965 commit aa89dcd
1 file changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | | - | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments