Skip to content

remove multiple dots in redis flags #6476

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

Merged

Conversation

won-js
Copy link
Contributor

@won-js won-js commented Jan 3, 2025

Fixes #6459

cortex/cmd/cortex$ go run main.go -help | grep redis | grep tls
  -blocks-storage.bucket-store.chunks-cache.redis.tls-ca-path string
  -blocks-storage.bucket-store.chunks-cache.redis.tls-cert-path string
  -blocks-storage.bucket-store.chunks-cache.redis.tls-enabled
        Whether to enable tls for redis connection.
  -blocks-storage.bucket-store.chunks-cache.redis.tls-insecure-skip-verify
  -blocks-storage.bucket-store.chunks-cache.redis.tls-key-path string
  -blocks-storage.bucket-store.chunks-cache.redis.tls-server-name string
  -blocks-storage.bucket-store.index-cache.redis.tls-ca-path string
  -blocks-storage.bucket-store.index-cache.redis.tls-cert-path string
  -blocks-storage.bucket-store.index-cache.redis.tls-enabled
        Whether to enable tls for redis connection.
  -blocks-storage.bucket-store.index-cache.redis.tls-insecure-skip-verify
  -blocks-storage.bucket-store.index-cache.redis.tls-key-path string
  -blocks-storage.bucket-store.index-cache.redis.tls-server-name string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-ca-path string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-cert-path string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-enabled
        Whether to enable tls for redis connection.
  -blocks-storage.bucket-store.metadata-cache.redis.tls-insecure-skip-verify
  -blocks-storage.bucket-store.metadata-cache.redis.tls-key-path string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-server-name string
  -frontend.redis.tls-enabled
  -frontend.redis.tls-insecure-skip-verify

@friedrichg
Copy link
Member

@won-js thanks! looks good. Can you run make doc and commit the corresponding docs?

@@ -60,7 +59,7 @@ func (cfg *RedisClientConfig) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix st
f.StringVar(&cfg.MasterName, prefix+"master-name", "", "Specifies the master's name. Must be not empty for Redis Sentinel.")
f.IntVar(&cfg.CacheSize, prefix+"cache-size", 0, "If not zero then client-side caching is enabled. Client-side caching is when data is stored in memory instead of fetching data each time. See https://redis.io/docs/manual/client-side-caching/ for more info.")
f.BoolVar(&cfg.TLSEnabled, prefix+"tls-enabled", false, "Whether to enable tls for redis connection.")
cfg.TLS.RegisterFlagsWithPrefix(prefix, f)
cfg.TLS.RegisterFlagsWithPrefix(prefix[:len(prefix)-1], f)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker to this PR. I wonder if we should just unify our flags to always remove . in its flag description and add . in the prefix instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea, but it seems like there would be a lot of code that needs to be changed.

Signed-off-by: won-js <[email protected]>
@pull-request-size pull-request-size bot added size/M and removed size/XS labels Jan 4, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 6, 2025
Copy link
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

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

@won-js Do you mind adding a BUGFIX entry in the CHANGELOG? I notice this problem exists since v1.15.0

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Jan 6, 2025
@won-js won-js force-pushed the remove-redis-flags-multiple-dots branch from b181abf to a6afa70 Compare January 6, 2025 11:27
@won-js
Copy link
Contributor Author

won-js commented Jan 6, 2025

I have made the addition as requested😃

Signed-off-by: Friedrich Gonzalez <[email protected]>
Signed-off-by: Friedrich Gonzalez <[email protected]>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 6, 2025
@friedrichg friedrichg merged commit 6c0075b into cortexproject:master Jan 6, 2025
17 checks passed
@won-js won-js deleted the remove-redis-flags-multiple-dots branch January 6, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants