feat: make LoadHTTPConfigFile set directory and move from tests file#415
Merged
roidelapluie merged 1 commit intoprometheus:mainfrom Dec 8, 2022
Merged
Conversation
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
Member
|
Thanks! |
Contributor
Author
|
Thanks, @roidelapluie, for merging! Should I wait with using of the functions in Prometheus and Alertmanager for new release/tag of this repo? |
Member
|
I will try to tag asap, I am reviewing a few things
Le jeu. 8 déc. 2022, 13:38, Martin Chodur ***@***.***> a
écrit :
… Thanks, @roidelapluie <https://github.com/roidelapluie>, for merging!
Should I wait with using of the functions in Prometheus and Alertmanager
for new release/tag of this repo?
Not sure what the release lifecycle is.
—
Reply to this email directly, view it on GitHub
<#415 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACHHJWQ7T3THXSO24SFKQ3WMHJFNANCNFSM6AAAAAASL5MQY4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move away the functions from the test files since they are not only test helper.
For motivation, see prometheus/prometheus#11487
Also add setting directory
cfg.SetDirectory(filepath.Dir(filepath.Dir(filename)))as used in Alertmanager seehttps://github.com/prometheus/alertmanager/blob/1a9f55b939ab81b86428c013ae294ad80779c9b6/cli/config/http_config.go#L36
Prometheus does not use the
LoadHTTPConfigFilefunction AFAIK, so the change in setting the directory won't break anything, hopefully.Other possibility is to avoid setting the directory and fix this on the Alertmanager side outside the common library.
That might be safer (function is exported, so it could be breaking change for someone, possibly?)
@roidelapluie PTAL