Skip to content

Propagate test skipping enabled tag to CI Visibility test spans#11300

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomasterfrom
anmarchenko/tests_skipped_tag_propagation
May 7, 2026
Merged

Propagate test skipping enabled tag to CI Visibility test spans#11300
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomasterfrom
anmarchenko/tests_skipped_tag_propagation

Conversation

@anmarchenko
Copy link
Copy Markdown
Member

@anmarchenko anmarchenko commented May 7, 2026

What Does This Do

  • Propagates test.itr.tests_skipping.enabled to CI Visibility test_suite_end and test spans when test skipping is enabled for the session.
  • Uses the same backend/config-derived value that is already reported on test_session_end and test_module_end spans.
  • Updates ITR fixture expectations across JUnit 4, JUnit 5, JUnit 5 Cucumber, JUnit 5 Spock, TestNG, Karate, and ScalaTest.

Motivation

We want to report tests-skipping-enabled value on suite and test spans to improve accuracy of the test durations writer for test parallelization project.

Java currently only reports it at session/module level, which leaves lower-level CI Test Cycle events without the run-level TIA skipping state.

Additional Notes

  • The implementation stamps the tag when suite/test spans are created, because these spans can finish before module/session spans are finalized.
  • This PR currently passes the setting through the suite/test constructors. An alternative would be to model this as an initial-span-tag decorator, closer to how TestDecorator applies common CI Visibility tags. Maintainer feedback welcome on whether that shape is preferable before this leaves draft.
  • The tag is only emitted when the value is true, matching current session/module behavior.

Contributor Checklist

Jira ticket: SDTEST-3761

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

@anmarchenko anmarchenko added type: enhancement Enhancements and improvements comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM labels May 7, 2026
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - sbt-scalatest

Job Status: success

Scenario Overhead (%)
agent 54.96
agentEvpProxy 55.06

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - nebula-release-plugin

Job Status: success

Scenario Overhead (%)
agent 35.72
agentless 36.33
agentlessCodeCoverage 43.89
agentlessLineCoverage 74.56

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - reactive-streams-jvm

Job Status: success

Scenario Overhead (%)
agent 21.11
agentless 19.02
agentlessCodeCoverage 19.26
agentlessLineCoverage 29.54

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - pass4s

Job Status: success

Scenario Overhead (%)
agent 12.67
agentless 9.11
agentlessCodeCoverage 16.20

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - jolokia

Job Status: success

Scenario Overhead (%)
agent 93.62
agentless 89.59
agentlessCodeCoverage 99.71
agentlessLineCoverage 101.15

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - okhttp

Job Status: success

Scenario Overhead (%)
agent 19.19
agentless 18.94
agentlessCodeCoverage 20.65
agentlessLineCoverage 43.37

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - spring_boot

Job Status: success

Scenario Overhead (%)
agent 16.39
agentless 9.88
agentlessCodeCoverage 13.30
agentlessLineCoverage 32.88

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 7, 2026

Test Environment - sonar-java

Job Status: success

Scenario Overhead (%)
agent 36.70
agentless 7.80
agentlessCodeCoverage 109.56
agentlessLineCoverage 128.55

@anmarchenko
Copy link
Copy Markdown
Member Author

E2E Test Report: SUCCESS ✅

Tested by: Shepherd Agent (autonomous QA for Datadog Test Optimization)

Test Environment

  • Method: Local testing against mockdog (mock Datadog backend) with two scenarios
  • Playground: jolokia (Java / TestNG, 188 suites, 2030 tests)
  • Revision: 8b44837bdcff233e8a5c0b695eb6ba3f052380cd
  • Branch: anmarchenko/tests_skipped_tag_propagation

Results

Scenario 1 — itr-enabled (backend tests_skipping: true)

Build SUCCESS, mockdog received 2395 CI Test Cycle events.

Span type With test.itr.tests_skipping.enabled=true Total Notes
sessions 1 1 already supported pre-PR
modules 21 32 already supported pre-PR (11 modules without tag had zero surefire tests, e.g. siteskin, war, war-unsecured, agent-osgi, jolokia-it-*)
suites 188 188 ✅ NEW — propagated by this PR
tests 2030 2030 ✅ NEW — propagated by this PR

Scenario 2 — default (backend tests_skipping: false)

Build SUCCESS, mockdog received 1775 CI Test Cycle events.

Span type With test.itr.tests_skipping.enabled Total
sessions 0 1
modules 0 32
suites 0 188
tests 0 1410

Confirms that the tag is only emitted when its value is true, matching the PR's stated behavior and the existing session/module convention.

Verification Summary

Check Status
Build succeeds with PR branch
Tag propagates to test_suite_end spans (positive case)
Tag propagates to test spans (positive case)
Tag suppressed on all spans when value is false (negative case)
Tag value matches backend-derived tests_skipping setting
No regressions on existing session/module tag emission

Test Methodology

  1. Ran TestNG suite with crook run jolokia --dep dd-trace-java=anmarchenko/tests_skipped_tag_propagation --scenario <scenario> --debug against a fresh mockdog instance for each scenario.
  2. Mockdog persisted every CI Test Cycle event to JSONL.
  3. Used query-spans count <span-type> --has-tag test.itr.tests_skipping.enabled to count tag presence per span type, and query-spans tags to verify the tag value (true).
  4. Cross-checked counts against mockdog's session/module/suite/test totals to confirm full propagation.

This E2E test was performed by Shepherd - autonomous QA agent for Datadog Test Optimization

@anmarchenko anmarchenko marked this pull request as ready for review May 7, 2026 14:17
@anmarchenko anmarchenko requested a review from a team as a code owner May 7, 2026 14:17
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

Test Environment - sonar-kotlin

Job Status: success

Scenario Overhead (%)
agent 11.98
agentless 11.55
agentlessCodeCoverage 14.53
agentlessLineCoverage 19.44

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

Test Environment - netflix-zuul

Job Status: success

Scenario Overhead (%)
agent 87.78
agentless 80.70
agentlessCodeCoverage 95.31
agentlessLineCoverage 111.67

@anmarchenko anmarchenko enabled auto-merge May 7, 2026 15:38
@anmarchenko anmarchenko added this pull request to the merge queue May 7, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 7, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 7, 2026

View all feedbacks in Devflow UI.

2026-05-07 16:50:39 UTC ℹ️ Start processing command /merge


2026-05-07 16:50:44 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-05-07 18:07:27 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 7, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit a2db8ba into master May 7, 2026
570 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the anmarchenko/tests_skipped_tag_propagation branch May 7, 2026 18:07
@github-actions github-actions Bot added this to the 1.63.0 milestone May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants