Open RohitKochhar opened 1 year ago
This issue can be assigned to me, I just need some advice on what might be the issue
Looking for some help on this @yeya24
This is impacting us, we need a way to mark blocks for no-downsample. It looks like the code exists server-side, but the cli tool errors when I try to use it.
Similar issue https://github.com/thanos-io/thanos/issues/6179
Thanos, Prometheus and Golang version used: Thanos v0.30.2
Object Storage Provider: AWS
What happened:
Following my contribution with https://github.com/thanos-io/thanos/pull/5945, there is new functionality to mark a block for
no-downsample
in the same way that blocks can be marked forno-compact
.When running the command:
thanos tools bucket mark --objstore.config="..." --marker=no-downsample-mark.json --details="..." --id=BLOCK_ID
, the following error is given:enum value must be one of deletion-mark.json,no-compact-mark.json, got 'no-downsample-mark.json
This is unexpected, as the line with checks the enum value is as follows (
cmd/thanos/tools_bucket.go:242
):cmd.Flag("marker", "Marker to be put.").Required().EnumVar(&tbc.marker, metadata.DeletionMarkFilename, metadata.NoCompactMarkFilename, metadata.NoDownsampleMarkFilename)
. The value ofmetadata.NoDownsampleMarkFilenam
e is"no-downsample-mark.json"
, so I am not sure why the enum check is not including this as an allowed value for this command.What you expected to happen:
The
--marker
flag should acceptno-downsample-mark.json
the same way that it acceptsdeletion-mark.json
orno-compact-mark.json
How to reproduce it (as minimally and precisely as possible):
Mark any block with
no-downsample-mark.json
using the following command:thanos tools bucket mark --objstore.config="..." --marker=no-downsample-mark.json --details="..." --id=BLOCK_ID