prombench: add support for extra flags on Prometheus instances#956
Open
roidelapluie wants to merge 1 commit intoprometheus:masterfrom
Open
prombench: add support for extra flags on Prometheus instances#956roidelapluie wants to merge 1 commit intoprometheus:masterfrom
roidelapluie wants to merge 1 commit intoprometheus:masterfrom
Conversation
Add --pr.extra-flags and --main.extra-flags options to the /prombench command, allowing callers to pass arbitrary flags to the PR and main/release Prometheus instances respectively. Use github.com/google/shlex for proper shell tokenization of the command line, replacing the naive strings.Split approach. Also fix flag value parsing so that flag values containing = signs are handled correctly. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
7b44807 to
eaf2494
Compare
bwplotka
approved these changes
Mar 13, 2026
Member
bwplotka
left a comment
There was a problem hiding this comment.
We have already a way for this - bench.version.
But this is bit faster indeed, so LGTM. Just please remove log level setting, we don't need that and would unblock new use case
| // prArgs returns a YAML flow-sequence injection string for the PR prometheus | ||
| // instance, including --log.level=info and any PR_EXTRA_FLAGS. | ||
| "prArgs": func(vars map[string]string) string { | ||
| return prometheusArgs("--log.level=info", vars["PR_EXTRA_FLAGS"]) |
Member
There was a problem hiding this comment.
Kind of confusing we hardcode info here. Why not removing this and allowing this option to set it? (info is default)
a.Flag(LevelFlagName, LevelFlagHelp).
Default("info").HintOptions(promslog.LevelFlagOptions...).
SetValue(config.Level)
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.
Add --pr.extra-flags and --main.extra-flags options to the /prombench command, allowing callers to pass arbitrary flags to the PR and main/release Prometheus instances respectively.
Use github.com/google/shlex for proper shell tokenization of the command line, replacing the naive strings.Split approach. Also fix flag value parsing so that flag values containing = signs are handled correctly.