-
Notifications
You must be signed in to change notification settings - Fork 569
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
Ingester: allow only POST method on /ingester/shutdown
#7707
Merged
pstibrany
merged 8 commits into
grafana:main
from
kevinmingtarja:kevinmingtarja/allow-only-post-for-ingester-shutdown
Apr 12, 2024
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
26ea0af
Ingester: allow only POST method on `/ingester/shutdown`
kevinmingtarja 47f4424
Add tests, address review comments
kevinmingtarja d6b676c
Merge branch 'main' into kevinmingtarja/allow-only-post-for-ingester-…
kevinmingtarja 366ad48
Minor fixes
kevinmingtarja c89a030
Fix CLI flag name
kevinmingtarja 1eb0294
Update cmd/mimir/help-all.txt.tmpl
jhesketh b3d6829
Set CLI flag to -api.get-request-for-ingester-shutdown-enabled
kevinmingtarja 900c3fa
Regenerated help.
pstibrany File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On re-review, this should probably be:
And the corresponding changes to the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, should the
yaml
field name stay the same though?Right now it's
get_request_for_ingester_shutdown_enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, initially I did as you suggested, but then Peter suggested to make it consistent so I changed it: #7707 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, I missed that conversation sorry. Looking at the
distributor.enable-otlp-metadata-storage
flag (just above) it exists as bothdistributor.enable-otlp-metadata-storage
as the flag andenable_otel_metadata_translation
as the yaml. @pstibrany Just want to double check your opinion here please.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry for confusion here. The problem here comes from the fact that config option is defined in
api
config block in YAML, but we're trying to useingester.
prefix for CLI flag. At the same time, we're triyng to make CLI flag and yaml field name consistent (this was goal of my previous comment, without realizing it's causing more confusion).I think we should settle on:
-api.get-request-for-ingester-shutdown-enabled
for CLI flagget_request_for_ingester_shutdown_enabled
as YAML field name (it's already underapi
section)WDYT?
If we want to use
-ingester.
prefix for CLI flag, then we should put this into ingester config struct.Unfortunately I think
enable_otel_metadata_translation
was a mistake, as it doesn't follow our practices. ("enabled" suffix, consistent CLI and YAML names)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhesketh thanks for catching this. My suggestion was not to remove
-ingester.
prefix (only to addingester
in the middle of the name), and I missed that this is what happened. 🤦There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry for the misunderstanding too. So should we keep going with the
-ingester.
prefix or-api.
instead? As you mentioned, I think the latter makes more sense as it's already under theapi
section in the yaml.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Kevin, with Josh we agreed to go with
-api.get-request-for-ingester-shutdown-enabled
CLI flag andget_request_for_ingester_shutdown_enabled
YAML field name. Thank you very much for your patience with us!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Peter, no worries! Let me quickly do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!