You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
context:
we do some validations on incoming prometheus config, and then write it to a file for prometheus to pick up.
In our internal code we use config.Load this nicely imports the users config and verifies it. Later on we use cfg.String() to write it to a file.
When using the .String() method on the config, it will convert the HTTPClientConfig.TLSConfig.MinVersion on load nicely from a String to a TlsVersion. but after calling .String() it will save a number (like 772) instead of the original string value from the user. This is currently breaking our logic.
The question is: Is the .String() method failing to map back the value, or is this expected behaviour
What did you expect to see?
given:
tls_config:
min_version: "TLS12"
i want
tls_config:
min_version: "TLS12"
after calling .String()
What did you see instead? Under which circumstances?
What did you do?
context:
we do some validations on incoming prometheus config, and then write it to a file for prometheus to pick up.
In our internal code we use
config.Load
this nicely imports the users config and verifies it. Later on we usecfg.String()
to write it to a file.When using the
.String()
method on the config, it will convert theHTTPClientConfig.TLSConfig.MinVersion
on load nicely from a String to aTlsVersion
. but after calling.String()
it will save a number (like 772) instead of the original string value from the user. This is currently breaking our logic.The question is: Is the
.String()
method failing to map back the value, or is this expected behaviourWhat did you expect to see?
given:
i want
after calling
.String()
What did you see instead? Under which circumstances?
System information
Darwin 21.6.0 arm64
Prometheus version
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response
The text was updated successfully, but these errors were encountered: