Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K6_SYSTEM_TAGS is returning an error when set #768

Closed
markjmeier opened this issue Sep 13, 2018 · 4 comments
Closed

K6_SYSTEM_TAGS is returning an error when set #768

markjmeier opened this issue Sep 13, 2018 · 4 comments

Comments

@markjmeier
Copy link

markjmeier commented Sep 13, 2018

When executing a test with the K6_SYSTEM_TAGS Env variable an error is returned. e.g.:

export 
K6_SYSTEM_TAGS=proto,subproto,status,method,url,name,group,check,error,tls_version,vu,iter

returns

ERRO[0001] envconfig.Process: assigning K6_SYSTEM_TAGS to SystemTags: 
converting 
'proto,subproto,status,method,url,name,group,check,error,tls_version,vu,iter' 
to type lib.TagSet. details: invalid map item: "proto"

The flag --system-tags does NOT produce this error and works as expected.

@na--
Copy link
Member

na-- commented Sep 13, 2018

I think this happens because envconfig tries to work with the underlying map that's currently used to track the enabled system tags. To fix that we probably have to implement the TextUnmarshaler interface for the type: https://github.com/kelseyhightower/envconfig#supported-struct-field-types

The biggest issue with fixing this is that both parts of the equation would soon change - we'd probably have to replace envconfig pretty soon (because of #671 and a few other issues), and we also probably should change the underlying type used to track the enabled system tags (#755)... So we'll either do a quick fix that would soon be overwritten or fix this as part of one of the aforementioned issues.

@cuonglm
Copy link
Contributor

cuonglm commented Aug 9, 2019

@na-- This issue seems to be fixed.

@na--
Copy link
Member

na-- commented Aug 12, 2019

Hmm unfortunately, the error seems to have disappeared at some point, but instead of being fixed, I think it's just not triggered, since the current k6 doesn't seem to read the K6_SYSTEM_TAGS variable at all. Running K6_SYSTEM_TAGS=proto,status k6 run -o json script.js with k6 v0.24.0 or v0.25.0 doesn't produce the error, but it also doesn't change the used system tags, while k6 v0.23.1 produces the error reported above...

@na--
Copy link
Member

na-- commented Aug 12, 2019

Ah, actually, my mistake. It seems like @mstoykov partially fixed this here in the datadog/statsd pull request, but it was masked because of the CLI option handling bug, which you recently fixed. So @cuonglm, you are completely right, this is now fixed - it's working perfectly on master and it's soon going to be released in v0.25.1.

@na-- na-- closed this as completed Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants