Skip to content
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

Chore: improve how we check if a module is enabled #2844

Open
pracucci opened this issue Aug 26, 2022 · 0 comments
Open

Chore: improve how we check if a module is enabled #2844

pracucci opened this issue Aug 26, 2022 · 0 comments

Comments

@pracucci
Copy link
Collaborator

In pkg/mimir/ we do an extensive use of Config.isAnyModuleEnabled(). This function checks if any of the input modules have been specified in the -target CLI flag or YAML config parameter. This means that if we want to check if the distributor is running, we have to specify all targets that would run the distributor, like Distributor, All, Write.

Having to specify every possible target that would run a given module is very error prone. We should instead resolve the dependency tree and have a function which just takes in input the module we want to check, and then it's checked against all modules that will be running based on the resolve dependency tree (e.g. if you want to check if the distributor is running, just check for Distributor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant