Skip to content

chore(deps): remove 6 unused dependencies - #1470

Merged
duncanista merged 8 commits into
mainfrom
jordan.gonzalez/remove-unused-deps/feature
Nov 2, 2026
Merged

duncanista merged 8 commits into
mainfrom
jordan.gonzalez/remove-unused-deps/feature

Conversation

@duncanista

@duncanista duncanista commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: Removes 6 dependencies that no code uses: indexmap, serde-aux, lazy_static, log, ddsketch-agent and proptest.

Why: Less to compile, audit and keep up to date. The next PR (#1471) adds a CI check so that unused dependencies do not come back.

Overview

Jira: SVLS-9975

Based on main (#1469 is merged).

  • Remove 6 dependencies that no code uses: indexmap, serde-aux, lazy_static, log,
    ddsketch-agent and the dev-dependency proptest. The lock drops the 4 packages that only
    proptest pulled in: bit-set 0.8, bit-vec 0.8, rusty-fork and wait-timeout.
    Older bit-set (0.5) and bit-vec (0.6) stay in the lock, through the httpmock dev
    dependency. LICENSE-3rdparty.csv drops the same 4 rows, so the required
    "Valid LICENSE-3rdparty.csv" check passes.
  • [package.metadata.cargo-machete] ignored lists the 5 crates that stay on purpose, with the
    reason in a comment: version bounds on transitive crates, aws-lc-rs reached through
    rustls::crypto, serde_bytes used in a #[serde(with)] string, and libddwaf-sys, which
    is listed only to enable its aws-lc-rs feature ([SVLS-9963] chore(bottlecap): upgrade libddwaf, zstd, and serverless-components #1467). The next PR (ci: add a cargo-machete gate for unused dependencies #1471) adds the CI
    job that reads it.

Size: about 16 core lines; the rest is Cargo.lock and LICENSE-3rdparty.csv.

Testing

  • applies on the previous PR of the stack: pass
  • cargo metadata --locked: pass
  • cargo deny --locked check: pass
  • cargo machete: pass
  • dd-rust-license-tool check: pass
  • cargo clippy --workspace --all-targets --features default -- -D warnings: pass
  • cargo clippy --workspace --all-targets --features default,test-mode -- -D warnings: pass
  • Before this stack, the FIPS flavor compiled in Docker with the removal (compile_bottlecap.sh, arm64, FIPS=1).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T20:56:04.646331Z b3cd5a0 New commits
🔒 Security Review ✅ Completed 2026-11-02T20:57:20.475231Z b3cd5a0 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b3cd5a0 | Docs | Give us feedback!

@duncanista duncanista changed the title [SVLS-9975] chore(deps): remove 6 unused dependencies chore(deps): remove 6 unused dependencies Oct 28, 2026
Base automatically changed from jordan.gonzalez/cargo-deny/feature to main October 29, 2026 18:49
Copilot AI balanced review requested due to automatic review settings October 29, 2026 23:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues with the unused-dependency cleanup.

No open issues 🎉

What changed in this PR

Removes six unused direct dependencies from the Rust Lambda extension and prepares dependency metadata for the cargo-machete CI check planned in #1471.

Changes:

  • Removes five regular dependencies and the proptest dev-dependency.
  • Adds cargo-machete exclusions with comments explaining intentionally retained dependencies.
  • Updates the lockfile and removes four third-party license entries.
File Description
bottlecap/​LICENSE-3rdparty.csv Removes license entries for bit-set, bit-vec, rusty-fork, and wait-timeout.
bottlecap/​Cargo.toml Removes six unused dependencies and documents cargo-machete exclusions.
bottlecap/​Cargo.lock Updates dependency references and removes unused package versions and dependency edges.

Review effort: Balanced

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f36a2d7e5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bottlecap/Cargo.lock Resolved
Keep the #1467 dependency pins without ddsketch-agent, regenerate Cargo.lock
and LICENSE-3rdparty.csv, and list libddwaf-sys in the cargo-machete ignore
list: it is a dependency only to enable its aws-lc-rs feature.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d379ec88f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bottlecap/Cargo.toml Resolved
@duncanista
duncanista merged commit 3cf79c9 into main Nov 2, 2026
51 of 61 checks passed
@duncanista
duncanista deleted the jordan.gonzalez/remove-unused-deps/feature branch November 2, 2026 21:10
duncanista added a commit that referenced this pull request Nov 2, 2026
**TL;DR:** Adds a CI job (cargo-machete) that fails when `Cargo.toml`
lists a dependency that the code does not use.

**Why:** The 6 unused dependencies that #1470 removes built up over
time, because nothing caught them.

## Overview

Jira: [SVLS-9975](https://datadoghq.atlassian.net/browse/SVLS-9975)

Stacked on #1470 (`jordan.gonzalez/remove-unused-deps/feature`).

Add the `Unused Dependencies` job: `cargo-machete` 0.9.2 through
`taiki-e/install-action`
v2.87.28. It is static analysis, with no build, so it is fast and
deterministic. A crate used
only through a string path or kept as a version bound goes in
`[package.metadata.cargo-machete] ignored` (previous PR). It is not a
required check.

Size: 17 core lines, 17 lines in total.

## Testing

- applies on the previous PR of the stack: pass
- actionlint 1.7.12 with shellcheck 0.10.0 on the changed workflows:
pass
- `cargo machete`: pass



[SVLS-9975]:
https://datadoghq.atlassian.net/browse/SVLS-9975?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
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.

3 participants