test(cmd/prometheus): add TestFeatureFlagsDocumented and adjust --enable-feature description#18487
Open
machine424 wants to merge 1 commit intoprometheus:mainfrom
Open
test(cmd/prometheus): add TestFeatureFlagsDocumented and adjust --enable-feature description#18487machine424 wants to merge 1 commit intoprometheus:mainfrom
machine424 wants to merge 1 commit intoprometheus:mainfrom
Conversation
Add TestFeatureFlagsDocumented to ensure the --enable-feature help text in and docs/feature_flags.md list the same set of flags. The help text was out of sync with the documentation: - Flags present in docs but missing from help text: `auto-reload-config`, `metadata-wal-records`, `otlp-native-delta-ingestion`, `promql-delayed-name-removal`, `type-and-unit-labels`. Added them. - Flags present in help text but missing from docs: `auto-gomaxprocs`, `expand-external-labels`. Removed them. The help text is now sorted for better readability and kept in sync with the documentation. Also, the parsing of an empty `--enable-feature` was changed to print `msg="Unknown option for --enable-feature" option=""` instead of nothing. Signed-off-by: Ayoub Mrini <[email protected]>
| c.parserOpts.EnableBinopFillModifiers = true | ||
| logger.Info("Experimental PromQL binary operator fill modifiers enabled.") | ||
| case "": | ||
| continue |
Member
There was a problem hiding this comment.
I would still allow that, following the robustness principle.
| }, 30*time.Second, time.Second) | ||
| } | ||
|
|
||
| // TestFeatureFlagsDocumented ensures the --enable-feature help text in main.go |
Member
There was a problem hiding this comment.
can we have this test in docs?
using statically https://github.com/prometheus/prometheus/blob/main/docs/command-line/prometheus.md
I think it would be lighter.
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 TestFeatureFlagsDocumented to ensure the --enable-feature help text in and docs/feature_flags.md list the same set of flags.
The help text was out of sync with the documentation:
auto-reload-config,metadata-wal-records,otlp-native-delta-ingestion,promql-delayed-name-removal,type-and-unit-labels. Added them.auto-gomaxprocs,expand-external-labels. Removed them.The help text is now sorted for better readability and kept in sync with the documentation.
Also, the parsing of an empty
--enable-featurewas changed to printmsg="Unknown option for --enable-feature" option=""instead of nothing.Which issue(s) does the PR fix:
Release notes for end users (ALL commits must be considered).
Reviewers should verify clarity and quality.