Fix Datadog pipeline options scope#468
Conversation
a6b533c to
8463b71
Compare
drodriguezhdez
left a comment
There was a problem hiding this comment.
Dropped some questions about some scenarios that combines options both at root and at stage level. Finally, also dropped some comments about the complete renaming from TestVisibility to TestOptimization.
| public TestVisibility() { | ||
| } | ||
|
|
||
| public TestVisibility(boolean enabled, String serviceName, Collection<TracerLanguage> languages, Map<String, String> additionalVariables) { |
There was a problem hiding this comment.
Should we name this TestOptimization or TestOptimizationConfig class? (Given the fact that's just a model class with getters/setters that keeps the config of Test Optimization)
There was a problem hiding this comment.
Good point, renamed.
| options { | ||
| datadog(tags: ["outer_tag:value"]) | ||
| } |
There was a problem hiding this comment.
Is it possible to have (and if so, what happens if):
tagsat root level andtagsat the stage level at the same time?tagsat root level with the same key than thetagsat the stage level at the same time?
There was a problem hiding this comment.
tags at root level and tags at the stage level at the same time?
yes, this is possible
tags at root level with the same key than the tags at the stage level at the same time?
if the same tag is defined at multiple levels (root, stage, "substage"), the innermost value will be used. I actually had to fix this
Requirements for Contributing to this repository
What does this PR do?
Fixes the scope of
datadogpipeline options:datadogoption is presentdatadogoption is presentSee examples for better understanding.
In the below pipeline test visibility auto-instrumentation and "myTag" custom tag will be applied for every stage:
In the below pipeline test visibility auto-instrumentation and "myTag" custom tag will be applied only for Stage 2:
In the below pipeline test visibility auto-instrumentation and "myTag" custom tag will be applied for Stage 2, Stage 2.1, Stage 2.2, Stage 2.3.
Additionally, "myOtherTag" custom tag will be applied to Stage 2.2.
Description of the Change
Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/label attached. If applicable it should have thebackward-incompatiblelabel attached.do-not-merge/label attached.kind/andseverity/labels attached at least.