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

Remove config dependency in discovery #3013

Closed
fabxc opened this Issue Aug 1, 2017 · 10 comments

Comments

Projects
None yet
7 participants
@fabxc
Copy link
Member

fabxc commented Aug 1, 2017

Currently the discovery packages relies on config via config.TargetGroup. This is not the best design for reusability and the type should be moved into the package itself.

To be discussed whether we just have the type twice and map between it or import discovery into config.

@cstyan

This comment has been minimized.

Copy link
Contributor

cstyan commented Aug 22, 2017

Are there not more dependencies here? ProvidersFromConfig makes use of config.ServiceDiscoverConfig

The import option seems to make more sense to me, if we have the TargetGroup type in two packages and map between the two we need to maintain the type in two separate places, plus the code to map between the two.

Is there anything I'm missing here?

@shubheksha

This comment has been minimized.

Copy link
Contributor

shubheksha commented Dec 27, 2017

I'll pick this up!

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Dec 27, 2017

@shubheksha I have done some work around discovery and config recently so ping me on IRC (prometheus-dev) if you need any pointers.

@shubheksha

This comment has been minimized.

Copy link
Contributor

shubheksha commented Dec 27, 2017

@fabxc, as part of this change, will the SD structs be moved to their respective packages as implied by the title as well? Or are we only concerning ourselves with config.TargetGroup?

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Dec 27, 2017

@shubheksha I don't think there is a definitive answer here.
I think some devs favour a global config package where others(me included) prefer package independence.

I think @brian-brazil can also share some more context here.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Dec 27, 2017

@krasi-georgiev But at least the issue title implies getting rid of the SD->config dependency, which would naturally have to include moving any SD-related config structs to the SD packages as well.

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Dec 27, 2017

Yes I agree with this as well. Just have some faint memory that there were at least 2 opinions on this.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Dec 27, 2017

I don't recall any disagreements here. Ultimately if we want SD to be usable as a separate component then the config bits need to move out of the config package.

@fabxc

This comment has been minimized.

Copy link
Member Author

fabxc commented Dec 27, 2017

Yea, moving them to the respective packages is a good first step.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.