Avoid retrying untracked Karate scenarios#12012
Conversation
Test Environment - sbt-scalatestJob Status: 🟢 success
Baseline: median of |
Test Environment - netflix-zuulJob Status: 🟢 success
Baseline: median of |
Test Environment - nebula-release-pluginJob Status: 🟢 success
Baseline: median of |
This comment has been minimized.
This comment has been minimized.
Test Environment - reactive-streams-jvmJob Status: 🟢 success
Baseline: median of |
Test Environment - pass4sJob Status: 🟢 success
Baseline: median of |
Test Environment - heliboardJob Status: 🟢 success
Baseline: median of |
Test Environment - sonar-kotlinJob Status: 🟢 success
Baseline: median of |
Test Environment - jolokiaJob Status: 🟢 success
Baseline: median of |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Test Environment - okhttpJob Status: 🟢 success
Baseline: median of |
Test Environment - spring_bootJob Status: 🟢 success
Baseline: median of |
Test Environment - sonar-javaJob Status: 🟢 success
Baseline: median of |
There was a problem hiding this comment.
More details
The fix correctly addresses two bugs: (1) in both karate-1.0 and karate-2.0, called/setup scenarios were incorrectly processed by the RetryAdvice, which could trigger spurious EFD retries since their ExecutionContext was created but no test span was started; (2) in karate-2.0, a standalone ScenarioRuntime (no FeatureRuntime) caused an NPE when skipTracking called getFeatureRuntime().getCaller(). The CallDepthThreadLocalMap invariants are preserved: skipped scenarios exit before incrementCallDepth, leaving the counter clean for the outer tracked scenario.
📊 Validated against 6 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 42b9368 · What is Autotest? · Any feedback? Reach out in #autotest
What Does This Do
Prevents retry handling for Karate setup scenarios and scenarios executed through a feature call. These internal scenarios do not create test spans.
It also guards standalone Karate 2 scenario execution, where no
FeatureRuntimeis available.Motivation
Retry advice was still applied to scenarios that the tracing listener intentionally ignores. Since no test was started, finishing the scenario did not advance the execution policy. This could cause internal scenarios to be retried incorrectly.
For standalone Karate 2 scenarios, accessing the missing
FeatureRuntimecaused an NPE.Additional Notes
Includes regression coverage for Karate 1 and Karate 2 setup and called scenarios, plus standalone Karate 2 execution.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]