Skip to content

feat(cache): put the S3 origin and the AWS SDK behind an s3 feature - #2884

Merged
alpergundogdu merged 2 commits into
mainfrom
cache-s3-feature
Nov 12, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
cache-s3-feature

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

First step of moving the decdn gateway cache onto decdn-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

  • s3 feature on decdn-cache, on by default. S3Origin, S3OriginConfig, S3Credentials and the six aws-* dependencies build only with it. The node keeps the default, so its build is unchanged.
  • default-features = false is a store-only build. It links no AWS SDK and no aws-lc.
  • Unused chacha20poly1305 dropped from decdn-cache and from the workspace.
  • iroh-blobs' default rpc feature turned off in the workspace. Nothing here serves the store over RPC; the feature pulled in irpc's remote transport and rcgen.
  • CI lints decdn-cache --no-default-features --all-targets and fails if that tree contains an AWS crate.

The lockfile loses 19 packages and gains none.

Footprint

Crates that decdn-cache would add to today's decdn closure (cargo tree, deduplicated):

Build New crates AWS SDK / aws-lc
default (s3 on) 68 yes
default-features = false, before the chacha20poly1305 and rpc removals 28 no

Tests

  • 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-items and check_crate_edges.py: pass.
  • cargo deny check advisories fails on crypto-bigint (RUSTSEC-2026-0387) and pin-utils (RUSTSEC-2026-0441). This PR does not touch either crate, and main fails the same way.

🤖 Generated with Claude Code

`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]>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 23:25
@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-code-quality

github-code-quality Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Rust, Solidity

Rust / code-coverage/cargo-llvm-cov

main 6fe9583 cache-s3-feature e5f9033 +/-
77% 77% 0%
View coverage of the 3 most impacted files.
File main 6fe9583 cache-s3-feature e5f9033 +/-
crates/node/src...gin/pull_leg.rs 84% 84% 0%
crates/node/src...s/client/mod.rs 95% 95% 0%
crates/protocol/src/framing.rs 92% 93% +1%

Solidity / code-coverage/forge

main 6fe9583 cache-s3-feature e5f9033 +/-
92% 92% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 11, 2026 23:44 UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 s3 feature (default-on) to gate S3Origin and all AWS SDK-related dependencies and exports.
  • Gate S3-specific tests so decdn-cache --no-default-features --all-targets builds cleanly.
  • Reduce workspace dependency footprint by dropping unused chacha20poly1305 and disabling iroh-blobs default rpc feature.
  • Update CI to lint and validate the decdn-cache --no-default-features dependency 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

Comment thread .github/workflows/ci.yml Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants