Skip to content

test(nodejs): reduce redundant weblog scenario coverage - #7689

Open
rochdev wants to merge 1 commit into
mainfrom
rochdev/nodejs-express-weblogs
Open

test(nodejs): reduce redundant weblog scenario coverage#7689
rochdev wants to merge 1 commit into
mainfrom
rochdev/nodejs-express-weblogs

Conversation

@rochdev

@rochdev rochdev commented Sep 10, 2026

Copy link
Copy Markdown
Member

Motivation

The Node.js end-to-end matrix runs most scenarios against express4,
express4-typescript, express5, fastify, nextjs, and uds-express4.
This repeats the same coverage across weblogs and creates excessive jobs when
dd-trace-js uses a 120-second shard target.

Across the six core weblogs, the change reduces scenario-weblog executions
from 595 to 170. At the 120-second target, uncapped demand drops from 302 to
83 jobs overall; the existing matrix hits the 256-job orchestrator ceiling.

Changes

  • Keep express5 as the primary weblog for full dd_trace scenario coverage.
  • Keep express4 for default and GraphQL-specific coverage.
  • Limit express4-typescript to debugger and IAST coverage relevant to that
    weblog.
  • Limit fastify and nextjs to representative AppSec and IAST scenarios.
  • Limit uds-express4 to UDS-relevant agent and telemetry scenarios.
  • Preserve all existing weblog names and Docker images.

Validation

  • venv/bin/ruff check tests/test_the_test/test_ci_orchestrator.py
  • venv/bin/yamllint utils/build/docker/nodejs/weblog_metadata.yml
  • venv/bin/python utils/manifest/validate.py
  • Focused CI orchestrator test functions
  • git diff --check

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on your PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from
      R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified? I have the approval
    from R&P team
  • A docker base image is modified?
    • The relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

Generated by Codex.

@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/test_the_test/test_ci_orchestrator.py                             @DataDog/system-tests-core
utils/build/docker/nodejs/weblog_metadata.yml                           @DataDog/system-tests-reviewers

@rochdev
rochdev force-pushed the rochdev/nodejs-express-weblogs branch from 73ce161 to 0087151 Compare September 10, 2026 03:35
@rochdev
rochdev marked this pull request as ready for review September 10, 2026 04:21
@rochdev
rochdev requested review from a team as code owners September 10, 2026 04:21
@rochdev
rochdev requested review from pierotibou and removed request for a team September 10, 2026 04:21

@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: 0087151ad0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +5 to +8
supported_scenarios:
- DEFAULT
- GRAPHQL_APPSEC
- GRAPHQL_ERROR_TRACKING

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep express4 in the AI Guard scenarios

When the Node.js AI_GUARD* scenarios run, AIGuardScenario selects dd_trace weblogs, but this change removes that category from express4 without explicitly listing any of the five AI Guard scenarios. The orchestrator therefore schedules them only on express5, while manifests/nodejs.yml:110-213 marks every non-express4 weblog irrelevant for these classes, so most Node.js AI Guard tests are skipped and their feature coverage disappears. Add the AI Guard scenarios here or retarget those manifest declarations to a scheduled weblog. .cursor/rules/pr-review.mdcL67-L69

Useful? React with 👍 / 👎.

Comment on lines +153 to +154
if library == "nodejs":
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore validation for future Node.js weblog metadata

When a future Node.js Dockerfile is added without explicit metadata, WeblogMetaData.load() synthesizes an entry with no categories or supported scenarios, so test_all_weblog_has_metadata still sees its name and passes even though the orchestrator silently removes it from every job. The repository documentation identifies this legacy parity test as the guard against exactly that failure, but this blanket branch disables it for all current and future Node.js weblogs; narrow the exception to the intentional matrix differences or add an explicit nonempty-selection assertion instead. .cursor/rules/pr-review.mdcL14-L18

Useful? React with 👍 / 👎.

Comment on lines +5 to +8
supported_scenarios:
- DEFAULT
- GRAPHQL_APPSEC
- GRAPHQL_ERROR_TRACKING

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep express4 in the feature-flagging scenario

When FEATURE_FLAGGING_AND_EXPERIMENTATION is selected for Node.js, its dd_trace category now schedules only express5, but the file-level declarations at manifests/nodejs.yml:1830-1854 mark every weblog except express4 as incomplete_test_app. As a result, the dynamic-evaluation, exposure, and metric suites are all skipped in the workflow step at .github/workflows/run-end-to-end.yml:315-317. Add this scenario to express4 or transfer the manifest support to the weblog that remains scheduled. .cursor/rules/pr-review.mdcL67-L69

Useful? React with 👍 / 👎.

Comment on lines +5 to +8
supported_scenarios:
- DEFAULT
- GRAPHQL_APPSEC
- GRAPHQL_ERROR_TRACKING

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep express4 in the supported OTLP semantics scenarios

The OTEL_SEMANTICS_OTLP and OTEL_SEMANTICS_OTLP_TRACE_METRICS scenarios also select dd_trace weblogs, so this list leaves only express5 in their Node.js jobs. However, manifests/nodejs.yml:2897-2916 marks all weblogs missing for the supported server, client, and trace-metric classes except express4; those validations are therefore skipped despite the dedicated workflow steps at .github/workflows/run-end-to-end.yml:539-550. Explicitly retain express4 for the supported OTLP semantics scenarios or update the manifest to a scheduled compatible weblog. .cursor/rules/pr-review.mdcL67-L69

Useful? React with 👍 / 👎.

Comment on lines +29 to +30
supported_scenarios: &framework_scenarios
- DEFAULT

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep fastify in TRACING_CONFIG_EMPTY

When the Node.js TRACING_CONFIG_EMPTY job runs, fastify no longer matches because its dd_trace category was replaced by this AppSec-only list, leaving only express5 scheduled. The manifest entry at manifests/nodejs.yml:2743-2746 marks every weblog except fastify as having an incomplete /otel_drop_in_baggage_api_datadog endpoint, so Test_Baggage_Headers_Api_Datadog is now skipped entirely. Add TRACING_CONFIG_EMPTY to fastify or move that endpoint's manifest support to a scheduled weblog. .cursor/rules/pr-review.mdcL67-L69

Useful? React with 👍 / 👎.

express4:
build_mode: local
categories: [dd_trace, dd_trace_graphql]
supported_scenarios:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you get the approval from all impacted team?

Another point, by using an inclusion list, it'll be easy to not activate a scenario by error, which is a QA issue. By using using excluded_scenarios, the tradeoff will be in favor of QA, as it'll be easy to include a scenario by error, which slows the CI, but at the benefit of never forgot a scenario by mistake.



@scenarios.test_the_test
def test_legacy_scenario_matrix():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This test is a leftoever, I'll remove it in another PR.

@rochdev
rochdev added this pull request to stack #7701 September 11, 2026 13:15
@rochdev
rochdev removed this pull request from stack #7701 September 11, 2026 15:16
@rochdev
rochdev added this pull request to stack #7705 September 11, 2026 15:33
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