Hi, I’m creating an archive with a tag like this
k6 archive --tag foo=1 loadtest.js
which adds the foo as a label to emitted metrics when I run the archive, as expected.
But when I run the archive with an additional tag, like this
k6 run --tag bar=1 archive.tar
the foo
label is removed, and only the bar
label is present on the metrics.
I see in the documentation for the archive command that cli flags can be overridden when running the archive, which makes sense to me for other cli flags. But I expected that adding tags to an archive before running it would append tags, not completely remove the tags from the archive. Is this the expected behavior?
Thanks,
Kevin
HI @kshawroblox, welcome to the community forum!
Options in k6 are overridden by layers - if you configure it different layers , only the “latest” layer is the one that takes effect.
This was/is discussed here - as explained there, there are other considerations. You are welcome to add your use case and vision there as well.
At this point with k6 v1 released thsi also will be a breaking change that will need to be pushed until v2. But it is also the kind of thing that will be much more easy to get merged … for v2, instead of having to make it pre v1.
Hope this helps you!
1 Like
Thanks for the response and linking me to that issue! My use case is pretty similar to yorugac, I have tags set when creating an archive, and then pass the archive for distributed execution and add new tags before running it. I’ve found a workaround so this is not completely necessary for me, but my suggested solution would be the same as yorugac’s if this does make it in v2.