-
Notifications
You must be signed in to change notification settings - Fork 524
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
docs: how to convert config to per tenant limit #5446
docs: how to convert config to per tenant limit #5446
Conversation
46f8e8d
to
efcfef7
Compare
|
||
## Deprecating the Existing Config Option | ||
|
||
1. Move the config option description JSON object from its previous location to the "limits" block of `cmd/mimir/config-descriptor.json`. |
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.
This file is automatically generated when make reference-help
is run. It shouldn't be modified manually.
|
||
3. Expose the tenant-specific overrides for the new config option | ||
|
||
First add the tenant-specific method and docstring to the _interface_ which uses the config option. |
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.
Using an interface like this is specific to the way limits are used in this particular area of the code. Can you note that this pattern of adding the setting to an interface may not apply in all cases?
|
||
Similar helper functions may already exist for similar purposes: `SmallestPositiveNonZeroIntPerTenant`, `LargestPositiveNonZeroDurationPerTenant`, etc. | ||
|
||
5. Consume the overrides with the multiple tenant limits. |
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.
Using the limits from multiple tenants at once is specific to the read path. Can you note that here or mark this step as optional?
@56quarters I believe all feedback is addressed |
15d4dc5
to
fec4872
Compare
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.
Good job, LGTM! I'm merging given I think Nick's comments have been applied.
What this PR does
Adds a doc to
docs/internal
about how to migrate global config options to tenant-specific config.There are a ton of minor steps here particularly in regards to maintaining compatibility through the deprecation period for the old, global config option.
A playbook was suggested to make sure we didn't miss anything, as we will certainly need to do this again.
Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]