Discuss flag / config pkg usage #4066
Replies: 2 comments
-
Thanks for starting this discussion. I would just add this https://github.com/openproto/protoconfig to our discussion. It would help us enormously. It's also worth to mention that ideally the current way of configuring does not change - to avoid breaking changes. |
Beta Was this translation helpful? Give feedback.
-
I hate to be contrarian (and have no authoritative voice here - my ideas might be ridiculous) Just some vague thoughts - I think using whatever super popular 10 million GitHub star cli package of the day is a losing proposition (dealing with the library's own opinionatedness, momentum, and most likely inevitable downward swing in momentum and community interest). Prometheus for example built its own promu tool to manage Prometheus releases. Why not have aim for something fresh and new for Thanos, based on the stdlib (and some well-vetted third party packages) to customize the behavior? Looks like protoconfig above is a step in that direction. Maybe Thanos could be the exemplar child for the protoconfig library? tl;dr I trust Thanos maintainers to write important libraries, much more than the most-popular-library-of-the-day (which comes with maintainership cost if your needs don't align perfectly). Thanos is a big enough ecosystem of interacting Go binaries and related documentation that it could be a nice place to write a custom cli framework just for Thanos which works great. |
Beta Was this translation helpful? Give feedback.
-
Problem description
The current package for flags that is used, is Kingpin. Which is still feature stable, but is in contribution mode.
When we require new features or hit an issue, this would get committed / merged but there are no active releases. This means making a replace in our go.mod to the latest commit hash.
For example #4034 requires an update of the kingpin pkg.
There are also a few issues regarding using flags / configuration for other uses-cases. For example generating structs for flags. Improving our documentation (automatically) based on flags.
I figured to make a single discussion on this subject to gather requirements, input, feedback and move this towards actionable items that might be related to each other. I.e. generate structs might correlate with having a solid flag pkg. I'm not saying we must replace kingpin but it could be an option.
Related issues / discussions / PR's
#3924
prometheus/prometheus#2455
prometheus/prometheus#7026
#2267
#4062
#3888
#3622
Maybe relevant
#2248
Suggestions - what we would like to see
Originally posted by @brancz in #3924 (comment)
Originally posted by @roidelapluie in #3924 (comment)
Originally posted by @bwplotka in #3924 (comment)
Originally posted by @bwplotka in prometheus/prometheus#7026 (comment)
Originally posted by @wiardvanrij in #3888 (comment)
Actions
LMK if this would work.
@thanos-io/thanos-maintainers
Beta Was this translation helpful? Give feedback.
All reactions