[SDTEST-3871] Add runtime tags env alias#101
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 85c371f | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
More details
The alias implementation is correct. Viper v1.21's BindEnv with multiple env vars follows first-non-empty semantics (allowEmptyEnv defaults to false), so DD_TEST_OPTIMIZATION_RUNTIME_TAGS is used whenever DD_TEST_OPTIMIZATION_RUNNER_RUNTIME_TAGS is absent or empty — exactly the intended precedence. Adversarial tests confirmed the alias works when canonical is truly unset, AutomaticEnv doesn't interfere, and invalid JSON in the alias is passed through without crashing Init.
📊 Validated against 6 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 85c371f · What is Autotest? · Any feedback? Reach out in #autotest
E2E Test Report: SUCCESSTested by: Shepherd Agent (autonomous QA for Datadog Test Optimization) Test Environment
Results
Issues FoundNone. Note: the first default mockdog run proved the alias was consumed by settings, but default mockdog settings have TIA disabled, so it did not call the skippable endpoint. I ran a second focused planner pass with the VerificationDatadog UI verification was not applicable for this change because the requested validation was Test Methodology
This E2E test was performed by Shepherd - autonomous QA agent for Datadog Test Optimization. |
What
Add
DD_TEST_OPTIMIZATION_RUNTIME_TAGSas an alias forDD_TEST_OPTIMIZATION_RUNNER_RUNTIME_TAGSwhen configuring runtime tag overrides. Document the alias in the settings table and cover alias precedence in settings tests.Why
This gives users a way to set one runtime-tags environment variable compatible with
datadog-cigem variable.E2E testing
Run
DD_TEST_OPTIMIZATION_RUNTIME_TAGS='{"os.platform":"linux","runtime.version":"3.2.0"}' ddtest planin a repository configured for DDTest and verify the plan uses those runtime tags when fetching skippable tests.