Repository navigation
feat(cache): put the S3 origin and the AWS SDK behind an s3 feature - #2884
Merged
Merged
Conversation
`decdn-cache` builds `S3Origin` and links the AWS SDK (and aws-lc) only with its `s3` feature, which is on by default, so the node is unchanged. With `default-features = false` the crate is a store-only build that a binary such as the `decdn gateway` can link without the SDK. Also drops the unused `chacha20poly1305` dependency and turns off iroh-blobs' default `rpc` feature, which nothing here uses. Together these remove 19 packages from the lockfile. CI lints the no-`s3` configuration and checks that its tree has no AWS crates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Gas snapshotNo gas changes vs base. |
Code coverage overviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-cov
View coverage of the 3 most impacted files.
Solidity / code-coverage/forge
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
The CI workflow’s tree-check for unintended AWS dependencies is incomplete and could miss some aws-* crates pulled by decdn-cache --no-default-features, leaving an unresolved verification gap in the build gate.
1 open issue
What changed in this PR
Feature-gates the S3 origin and AWS SDK dependencies in decdn-cache behind a default-on s3 feature, enabling a smaller store-only build with --no-default-features.
Changes:
- Add
s3feature (default-on) to gateS3Originand all AWS SDK-related dependencies and exports. - Gate S3-specific tests so
decdn-cache --no-default-features --all-targetsbuilds cleanly. - Reduce workspace dependency footprint by dropping unused
chacha20poly1305and disablingiroh-blobsdefaultrpcfeature. - Update CI to lint and validate the
decdn-cache --no-default-featuresdependency tree.
| File | Description |
|---|---|
| crates/cache/tests/s3_origin.rs | Updates the S3 origin integration tests to compile/run only when the s3 feature is enabled. |
| crates/cache/tests/s3_origin_http_roundtrip.rs | Guards the S3 HTTP roundtrip test code behind the s3 feature flag. |
| crates/cache/tests/origin_runtime_keepalive.rs | Adjusts origin runtime keepalive tests to conditionally include S3-specific code paths under feature = "s3". |
| crates/cache/src/origin/mod.rs | Feature-gates the S3 origin module and its exports and updates origin module documentation accordingly. |
| crates/cache/src/lib.rs | Updates crate-level exports/docs so S3-related items are only available when the s3 feature is enabled. |
| crates/cache/Cargo.toml | Introduces a default-on s3 feature and makes AWS SDK dependencies optional and wired to that feature. |
| CLAUDE.md | Updates project documentation to reflect the new s3 feature split and store-only build expectations. |
| Cargo.toml | Removes the unused chacha20poly1305 dependency and disables iroh-blobs default features in the workspace. |
| Cargo.lock | Updates the lockfile to reflect removed dependencies and the iroh-blobs feature configuration change. |
| .github/workflows/ci.yml | Adds CI checks for decdn-cache --no-default-features, including clippy and an AWS-dependency tree validation step. |
Review effort: Balanced
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

First step of moving the
decdn gatewaycache ontodecdn-cache(re-evaluation in #2881). The gateway will link the cache engine for its store, fill sharing and eviction, without the S3 origin.What changes
s3feature ondecdn-cache, on by default.S3Origin,S3OriginConfig,S3Credentialsand the sixaws-*dependencies build only with it. The node keeps the default, so its build is unchanged.default-features = falseis a store-only build. It links no AWS SDK and noaws-lc.chacha20poly1305dropped fromdecdn-cacheand from the workspace.rpcfeature turned off in the workspace. Nothing here serves the store over RPC; the feature pulled inirpc's remote transport andrcgen.decdn-cache --no-default-features --all-targetsand fails if that tree contains an AWS crate.The lockfile loses 19 packages and gains none.
Footprint
Crates that
decdn-cachewould add to today'sdecdnclosure (cargo tree, deduplicated):s3on)default-features = false, before thechacha20poly1305andrpcremovalsTests
cargo clippy --workspace --all-targets,--all-features, and-p decdn-cache --no-default-features --all-targets: clean, with warnings denied.cargo nextest run -p decdn-cache: 545 passed. With--no-default-features: 486 passed. The difference is the S3 suites, which are gated on the feature.cargo doc --workspace --no-deps --document-private-itemsandcheck_crate_edges.py: pass.cargo deny check advisoriesfails oncrypto-bigint(RUSTSEC-2026-0387) andpin-utils(RUSTSEC-2026-0441). This PR does not touch either crate, and main fails the same way.🤖 Generated with Claude Code