Skip to content

Commit e7f1031

Browse files
Run cargo update on the runtime lockfiles and the SDK lockfile (#3856)
If CI fails, commit the necessary fixes to this PR until all checks pass. If required, update entries in [crateNameToLastKnownWorkingVersions](https://github.com/smithy-lang/smithy-rs/blob/6b42eb5ca00a2dc9c46562452e495a2ec2e43d0f/aws/sdk/build.gradle.kts#L503-L504). --------- Co-authored-by: ysaito1001 <[email protected]>
1 parent 2c0274c commit e7f1031

File tree

9 files changed

+1001
-744
lines changed

9 files changed

+1001
-744
lines changed

aws/rust-runtime/Cargo.lock

Lines changed: 99 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/rust-runtime/aws-config/Cargo.lock

Lines changed: 88 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/sdk/Cargo.lock

Lines changed: 248 additions & 301 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust-runtime/Cargo.lock

Lines changed: 202 additions & 230 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/ci-build/sdk-lockfiles/Cargo.lock

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/ci-build/sdk-lockfiles/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sdk-lockfiles"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
authors = ["AWS Rust SDK Team <[email protected]>"]
55
description = """
66
A CLI tool to audit lockfiles for Smithy runtime crates, AWS runtime crates, `aws-config`, and the workspace containing
@@ -14,10 +14,12 @@ publish = false
1414
anyhow = "1.0.87"
1515
cargo-lock = { version = "9.0.0", features = ["dependency-tree"] }
1616
clap = { version = "4.4.11", features = ["derive", "env"] }
17+
once_cell = "1.15.0"
1718
petgraph = "0.6.5"
1819
smithy-rs-tool-common = { path = "../smithy-rs-tool-common" }
1920
tracing = "0.1.40"
2021
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
2122

2223
[dev-dependencies]
2324
itertools = "0.13.0"
25+
tracing-test = "0.2.4"

tools/ci-build/sdk-lockfiles/README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,35 @@ Error: there are lockfile audit failures
3131

3232
This tool is intended for automated use.
3333

34-
## Limitation
34+
## Limitations
35+
### Unable to audit dependencies in `CargoDependency.kt`
3536
The `sdk-lockfiles` tool does not verify whether new dependencies introduced in [CargoDependency.kt](https://github.com/smithy-lang/smithy-rs/blob/main/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt)
3637
are included in the SDK lockfile. This is because dependencies in `CargoDependency.kt` are represented as a Kotlin data
3738
class. Consequently, dependencies added via the code generator, `inlineable`, or `aws-inlineable` are not considered by
3839
`sdk-lockfiles`.
3940

40-
This limitation is acceptable for our operational purposes. Our release script always executes
41-
`./gradlew aws:sdk:syncAwsSdkLockfile`, which ensures that any dependencies added in `CargoDependency.kt` are properly
41+
This limitation is acceptable for our operational purposes. Our release script [always executes
42+
`./gradlew aws:sdk:syncAwsSdkLockfile`](https://github.com/smithy-lang/smithy-rs/blob/b62000e4d733ca06bc98fd9b57c91468718b8f9f/tools/ci-scripts/generate-smithy-rs-release#L36), which ensures that any dependencies added in `CargoDependency.kt` are properly
4243
reflected in the SDK lockfile.
44+
45+
### False positives
46+
The `sdk-lockfiles` tool may report false positives based on the contents of a lockfile. For example, if a section of
47+
the lockfile appears as follows
48+
```
49+
pin-project v1.1.5
50+
├── tower v0.4.13
51+
│ ├── aws-smithy-experimental v0.1.4
52+
│ ├── aws-smithy-http-server v0.63.3
53+
│ │ └── aws-smithy-http-server-python v0.63.2
54+
│ ├── aws-smithy-http-server-python v0.63.2
55+
...
56+
```
57+
the tool cannot identify which dependent crate of `tower` enables `tower`'s Cargo feature to include `pin-project`.
58+
In the case above, `aws-smithy-experimental` does not enable this feature, while `aws-smithy-http-server` does.
59+
Among the Smithy runtime crates above, only `aws-smithy-experimental` is used by SDKs. When `aws-smithy-experimental`
60+
is compiled for a generated SDK without server-related Smithy runtime crates, `pin-project` will not appear in the
61+
SDK lockfile. Therefore, while it may appear that `aws-smithy-experimental` depends on `pin-project`, it is a false
62+
positive for the audit.
63+
64+
To address this limitation, we maintain a list of known false positives in `false-positives.txt`. Any dependency
65+
included in this file will not be flagged as an audit error.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
aws-smithy-experimental -> pin-project
2+
aws-smithy-experimental -> pin-project-internal

0 commit comments

Comments
 (0)