Skip to content
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

Remove references to cortex #6015

Merged
merged 1 commit into from
Apr 25, 2022
Merged

Remove references to cortex #6015

merged 1 commit into from
Apr 25, 2022

Conversation

trevorwhitney
Copy link
Collaborator

What this PR does / why we need it:

Found a few stale references to cortex to remove.

@owen-d owen-d merged commit 2a04ac9 into main Apr 25, 2022
@owen-d owen-d deleted the remove_cortex_references branch April 25, 2022 21:06
@@ -105,7 +105,7 @@ func (c *BlobStorageConfig) RegisterFlags(f *flag.FlagSet) {
// RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet
func (c *BlobStorageConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
f.StringVar(&c.Environment, prefix+"azure.environment", azureGlobal, fmt.Sprintf("Azure Cloud environment. Supported values are: %s.", strings.Join(supportedEnvironments, ", ")))
f.StringVar(&c.ContainerName, prefix+"azure.container-name", "cortex", "Name of the blob container used to store chunks. This container must be created before running cortex.")
f.StringVar(&c.ContainerName, prefix+"azure.container-name", "loki", "Name of the blob container used to store chunks. This container must be created before running cortex.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the last parameter string literal also say "Loki" instead of "Cortex?"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it should. do you want to include that in your bigger docs PR or should I make another PR for this change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll handle making the change when I put up a PR to remove "cortex" from several places in the docs.

@stevehipwell
Copy link
Contributor

@trevorwhitney @owen-d I must be misunderstanding something here, so could you help me out with why this change is valid? When I looked at the code previously I assumed that although it'd have been nice to change, by doing so you'd be breaking anyone already using this storage type?

Also wouldn't you need to set it consistently in the other place the same setting is referenced (see below)? I think this is currently incorrect but not a bug as I can't see it actually used anywhere from the second location.

f.StringVar(&cfg.ContainerName, prefix+"azure.container-name", "", "Azure storage container name")

I normalised the two lines in #5891 which is where my interest comes due to a rebase conflict.

@trevorwhitney
Copy link
Collaborator Author

@stevehipwell you are correct that this represents a breaking change, I will make sure to add to the upgrading guide that if you are relying on this default container name you will have to specify it when doing an upgrade. Thanks for catching that!

I don't think we need to update the other location, as the goal of this task was to remove references to "Cortex", since we no longer depend on it. Having these flags defined in 2 places is the result of some technical debt we have yet to pay down. We used to rely on the clients from Cortex for the ruler, but then implemented our own for chunks. When we forked some of the Cortex code while removing that dependency, we ended up with 2 different definitions for these clients. Ideally, I would like to see these definitions moved out of loki, probably to dskit, so we could share them between loki and mimir. However, that is why one references cortex and the other does not.

@stevehipwell
Copy link
Contributor

@trevorwhitney I've aligned the other default in #5891 as I believe they're coming from the same input? As I don't think the second instance is ever used it might be best to remove it from the code unless I'm missing something?

@trevorwhitney
Copy link
Collaborator Author

@stevehipwell I think you're spot on, that can be removed, but let's do that in a separate PR. Thanks!

@stevehipwell
Copy link
Contributor

@trevorwhitney could you take a look at #5891 to see what I've done there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants