fix(cypress): scope failure media uploads to screenshots#9154
Conversation
Keep this branch focused on Cypress failure screenshots by removing the video upload flag, upload path, and related tests. Move DD_TEST_FAILURE_SCREENSHOTS_ENABLED into the Test Optimization config namespace, make EVP proxy unsupported behavior explicit in tests and warnings, and use DD_API_KEY for screenshot media uploads. Tests: ./node_modules/.bin/mocha packages/dd-trace/test/config/generated-config-types.spec.js packages/dd-trace/test/config/index.spec.js --grep "internalPropertyName|test failure screenshots|generated config types|unsupported config|property surface" Tests: ./node_modules/.bin/mocha packages/dd-trace/test/ci-visibility/exporters/ci-visibility-exporter.spec.js --grep "canUploadTestScreenshots" Tests: ./node_modules/.bin/mocha packages/dd-trace/test/ci-visibility/requests/upload-test-screenshot.spec.js Tests: ./node_modules/.bin/eslint integration-tests/cypress-esm-config.mjs integration-tests/cypress.config.js integration-tests/cypress/cypress-reporting.spec.js integration-tests/cypress/e2e/manual-screenshot-before-fail.js packages/datadog-plugin-cypress/src/cypress-plugin.js packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js packages/dd-trace/test/ci-visibility/exporters/ci-visibility-exporter.spec.js packages/dd-trace/test/ci-visibility/requests/upload-test-screenshot.spec.js packages/dd-trace/test/config/index.spec.js Tests: env -u OTEL_TRACES_EXPORTER -u OTEL_LOGS_EXPORTER -u OTEL_METRICS_EXPORTER CYPRESS_VERSION=12.0.0 CYPRESS_MODULE_TYPE=commonJS ./node_modules/.bin/mocha --timeout 180000 integration-tests/cypress/cypress-reporting.spec.js --grep "reporting with"
a2c1103 to
4c31138
Compare
Overall package sizeSelf size: 6.44 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
a4c8ca7
into
xinye.ji/cypress-failure-media-v2
BenchmarksBenchmark execution time: 2026-06-30 15:27:22 Comparing candidate commit 4c31138 in PR branch Found 3 performance improvements and 0 performance regressions! Performance is the same for 2247 metrics, 36 unstable metrics.
|
There was a problem hiding this comment.
More details
The PR fixes a real latent bug: getConfig().apiKey is always undefined (confirmed by running the actual config module), so every screenshot upload in the base branch would have failed with "DD_API_KEY is required". The fix — using getConfig().DD_API_KEY — is consistent with all other CI visibility upload paths. All other changes (video removal, config namespace migration, EVP-proxy warning) are clean and pass the full unit test suite.
📊 Validated against 9 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 4c31138 · What is Autotest? · Any feedback? Reach out in #autotest
Summary
DD_TEST_FAILURE_SCREENSHOTS_ENABLEDunder the Test Optimization supported config namespaceDD_API_KEYfor screenshot media uploadsTesting
./node_modules/.bin/mocha packages/dd-trace/test/config/generated-config-types.spec.js packages/dd-trace/test/config/index.spec.js --grep "internalPropertyName|test failure screenshots|generated config types|unsupported config|property surface"./node_modules/.bin/mocha packages/dd-trace/test/ci-visibility/exporters/ci-visibility-exporter.spec.js --grep "canUploadTestScreenshots"./node_modules/.bin/mocha packages/dd-trace/test/ci-visibility/requests/upload-test-screenshot.spec.js./node_modules/.bin/eslint integration-tests/cypress-esm-config.mjs integration-tests/cypress.config.js integration-tests/cypress/cypress-reporting.spec.js integration-tests/cypress/e2e/manual-screenshot-before-fail.js packages/datadog-plugin-cypress/src/cypress-plugin.js packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js packages/dd-trace/test/ci-visibility/exporters/ci-visibility-exporter.spec.js packages/dd-trace/test/ci-visibility/requests/upload-test-screenshot.spec.js packages/dd-trace/test/config/index.spec.jsenv -u OTEL_TRACES_EXPORTER -u OTEL_LOGS_EXPORTER -u OTEL_METRICS_EXPORTER CYPRESS_VERSION=12.0.0 CYPRESS_MODULE_TYPE=commonJS ./node_modules/.bin/mocha --timeout 180000 integration-tests/cypress/cypress-reporting.spec.js --grep "reporting with"