From 6770f22ed2d508617b5d20f50bbe41922c26140e Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Tue, 31 Aug 2021 09:22:04 +0200 Subject: [PATCH 1/2] Register CLI flag for ChunkStoreConfig.MaxLookBackPeriod Even though the flag is already deprecated, registering the flag is necessary for generating the config reference documentation. --- pkg/storage/store.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/storage/store.go b/pkg/storage/store.go index e95b1ef102db..88a7aebea5b1 100644 --- a/pkg/storage/store.go +++ b/pkg/storage/store.go @@ -83,6 +83,8 @@ type ChunkStoreConfig struct { // RegisterFlags adds the flags required to configure this flag set. func (cfg *ChunkStoreConfig) RegisterFlags(f *flag.FlagSet) { cfg.StoreConfig.RegisterFlags(f) + _ = cfg.MaxLookBackPeriod.Set("0s") + f.Var(&cfg.MaxLookBackPeriod, "store.max-look-back-period", "This flag is deprecated. Use -querier.max-query-lookback instead.") } func (cfg *ChunkStoreConfig) Validate(logger log.Logger) error { From f0626ec4f2a8108e8fd5cfa1c751f8b242218a9f Mon Sep 17 00:00:00 2001 From: Owen Diehl Date: Mon, 6 Sep 2021 15:06:05 -0400 Subject: [PATCH 2/2] Update pkg/storage/store.go --- pkg/storage/store.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/storage/store.go b/pkg/storage/store.go index 88a7aebea5b1..50509a440a6d 100644 --- a/pkg/storage/store.go +++ b/pkg/storage/store.go @@ -83,7 +83,6 @@ type ChunkStoreConfig struct { // RegisterFlags adds the flags required to configure this flag set. func (cfg *ChunkStoreConfig) RegisterFlags(f *flag.FlagSet) { cfg.StoreConfig.RegisterFlags(f) - _ = cfg.MaxLookBackPeriod.Set("0s") f.Var(&cfg.MaxLookBackPeriod, "store.max-look-back-period", "This flag is deprecated. Use -querier.max-query-lookback instead.") }