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

applyEnvOverrides fails to override array elements #348

Closed
jonseymour opened this issue Mar 17, 2016 · 3 comments · Fixed by #350
Closed

applyEnvOverrides fails to override array elements #348

jonseymour opened this issue Mar 17, 2016 · 3 comments · Fixed by #350

Comments

@jonseymour
Copy link
Contributor

The following environment override:

KAPACITOR_INFLUXDB_URLS_0=http://influx:8086 kapacitord config

doesn't have the expected effect.

An attempt is made to ecursively apply overrides to array/slice elements, but the attempt fails because the recursive call returns early because the reflect.Value being operated on by the recursive call is not a struct.

jonseymour added a commit to jonseymour/kapacitor that referenced this issue Mar 18, 2016
@offlinehacker
Copy link

I guess the same error applies also to influxdb: https://github.com/influxdata/influxdb/blob/master/cmd/influxd/run/config.go

@jonseymour
Copy link
Contributor Author

Yes, it would. I am happy to cross-port the fix back to influx.

@jonseymour
Copy link
Contributor Author

@offlinehacker actually, right now it isn't a problem for influxdb because in the config language, arrays and slices are only ever used at the struct level (e.g. [[udp]]) never at the field level and the overrides do work at the struct level.

It would be a problem if this ever changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants