-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Feature Description
There are two ways to set the test-wide tags: via CLI --tag and in script as part of options struct. CLI tags fully overwrite the ones in options according to the order of precedence.
In case of tags, this is not always desirable behavior, esp. noticeable in CI / CD setups and k6-operator usage: it would be easier to be able to pass CLI tags as an addition to the tags set in the script. E.g. if there is a script:
export const options = {
tags: {
tag_a: 'foo',
},
};
...
and we run it with k6 run script.js --tag tag_b=bar, the output will have only tag_b attached. Instead, it'd be good to have both tag_a and tag_b attached in such a case.
Suggested Solution (optional)
Tags are essentially a key-value map which means that it can be overwritten not only at it's root but at the key level. E.g. if one passes tag_a both in CLI and in the script, then by the order of precedence only CLI value should remain. But if one passes two different tags, they should result in a map with two keys.
Already existing or connected issues / PRs (optional)
No response