Skip to content

chore: strip dd-trace Test Optimization validation runbook from layer#800

Open
joeyzhao2018 wants to merge 1 commit into
mainfrom
joey/strip-test-optimization-validation
Open

chore: strip dd-trace Test Optimization validation runbook from layer#800
joeyzhao2018 wants to merge 1 commit into
mainfrom
joey/strip-test-optimization-validation

Conversation

@joeyzhao2018

Copy link
Copy Markdown
Contributor

What

Adds two rm -rf lines to the layer Dockerfile to remove dd-trace's Test Optimization validation runbook from the published Lambda layer:

  • /nodejs/node_modules/dd-trace/ci
  • /nodejs/node_modules/dd-trace/packages/dd-trace/src/ci-visibility/exporters/ci-validation

Why

DataDog/dd-trace-js#9323 ships an agent-guided Test Optimization debug runbook (ci/runbook.md + scripts under ci/test-optimization-validation/, ~150KB / ~17k lines) inside the npm package, and ci/**/* is in dd-trace's files list, so it lands in our layer on the next dd-trace bump.

The code is fully gated behind private env vars (_DD_TEST_OPTIMIZATION_VALIDATION_MODE etc.) and is never loaded in a Lambda environment — it's dead weight for us. Since we already strip unused files to keep the layer small, strip this too. Removing the whole dd-trace/ci directory also reclaims the pre-existing ci/init.js CI-visibility entrypoint, which Lambda never loads either.

packages/dd-trace/src/ci-visibility/test-optimization-http-cache.js is intentionally kept: ci-visibility-exporter.js now requires it at module load, and it's only ~300 lines.

dd-trace-js#9323 ships an agent-guided Test Optimization debug runbook
under the ci/ namespace of the npm package (~150KB). It is gated behind
private env vars and never loaded in a lambda environment, so remove it
(and the pre-existing ci/init.js entrypoint) from the layer.
@joeyzhao2018
joeyzhao2018 requested review from a team as code owners July 24, 2026 03:28
@joeyzhao2018
joeyzhao2018 requested a review from duncanista July 24, 2026 03:28
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jul 24, 2026

Copy link
Copy Markdown

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/datadog-lambda-js | e2e-test-status   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 687ac05 | Docs | Datadog PR Page | Give us feedback!

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