-
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
cmd/thanos: Refactor run*(...) functions. #2248
Comments
Wonder if this helps https://github.com/peterbourgon/ff |
@bwplotka I don't mind taking a stab at this if thats ok |
Sure @philipgough ❤️ Let us know here @philipgough what would be idea of end look .e.g. how you plan to achieve this. (: |
@bwplotka I did some work on the Basically, the idea I had was to decompose into smaller structs with related config and compose the config for the component from these. Config structs are built by passing all flags into a func. The benefit here is that we wouldn't need to duplicate this info in each component, the downside (I haven't checked if its required) is the lack of ability to customise defaults in each component. Should the defaults always be the same? I took a look at the package you linked and while it would probably work, would require a change from kingpin lib to flag package in stdlib. Maybe this is worth considering but I would have thought unlikely? I didn't see that the kingpin library had a way to populate struct fields directly during parse unfortunately |
This issue/PR has been automatically marked as stale because it has not had recent activity. Please comment on status otherwise the issue will be closed in a week. Thank you for your contributions. |
Almost done (:
…On Sun, 12 Apr 2020 at 16:00, stale[bot] ***@***.***> wrote:
This issue/PR has been automatically marked as stale because it has not
had recent activity. Please comment on status otherwise the issue will be
closed in a week. Thank you for your contributions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2248 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVA3O5ESEKKGKOE3NGTA3LRMHJQTANCNFSM4LFA7G2Q>
.
|
Hello 👋 Looks like there was no activity on this issue for last 30 days. |
@bwplotka i would like to play with this bug 😺 |
@soniasingla I have some completed already but feel free to take any of the others. I am working through |
Hello 👋 Looks like there was no activity on this issue for last 30 days. |
Still valid |
Hello 👋 Looks like there was no activity on this issue for last 30 days. |
Closing for now as promised, let us know if you need this to be reopened! 🤗 |
ack 👾 |
Maybe @idoqo, you want help here? Sounds like it's defined and we need this badly 🤗 |
I think querier, is almost done by @MalloZup , but let's look on other components if we can do the similar change as #3771 (review) |
While implementing the config struct for ruler, I noticed some advantage in the current approach (using the Using the Line 291 in 04ad33d
Abstracting those parameters into config structs could take that away for instance: |
Did similar refactoring for |
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! 🤗 |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Are there any commands left to complete? |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Still valid |
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! 🤗 |
Hi 👋
Right now all our components can be run as a single commands. We do this via those ugly
run
functions with a sometimes a large number of arguments (one per each flag). e.g. https://github.com/thanos-io/thanos/blob/master/cmd/thanos/query.go#L132 It would be nice to fix this while preserving flags. The short fix would be to create config structs for each command that will be populated by flags, and then pass it torun
functions?AC:
The text was updated successfully, but these errors were encountered: