-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
bucket inspect: support machine-readable output formats #4180
Comments
Well explained and I think this would provide good value. Would you be interested on creating this feature or an initial draft for it? |
Unfortunately I won't have the time anytime soon, but I wanted to put the idea out there 😃 |
Created an initial draft for this, PTAL @wiardvanrij @matthiasr |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Closing for now as promised, let us know if you need this to be reopened! 🤗 |
PR still open, relevant |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
PR is open and waiting for a review. |
We're gonna need an anti-stalebot-bot soon … |
Is your proposal related to a problem?
When I want to do an action on a specific subset of blocks, I need a list of those blocks.
thanos tools bucket ls
gives me a list of all buckets, but does not allow filtering.thanos tools bucket inspect
does exactly the filtering it needs, but the output is geared towards human readability.I need to do
awk
gymnastics to extract the block ID.Describe the solution you'd like
Add a
--output
/-o
flag tothanos tools bucket inspect
, which allows selecting output formats.Ideas for formats:
table
: current format, defaultid
: block IDs only, similar tols
csv
: quoted comma-separated valuestsv
: tab-separated values, great for consumption with Unix toolsjson
: JSON encoding (exact format tbd), great for consumption withjq
or scripting languagesDescribe alternatives you've considered
bucket ls
– solves my concrete issue, but is less generally useful. Making all the information machine readable allows all kinds of integrations. Harder to judge whether the filter is correct.Additional context
I chose the proposed flag to be in line with
kubectl
s multiple outputs.I don't think Thanos needs the full power of that just yet but keeping the flags similar makes them easier to remember.
The text was updated successfully, but these errors were encountered: