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

Consider reverting prometheus/client_golang dependency to v0.9.x instead of v1.0.0 #660

Closed
munnerz opened this issue Oct 25, 2019 · 2 comments · Fixed by #679
Closed

Consider reverting prometheus/client_golang dependency to v0.9.x instead of v1.0.0 #660

munnerz opened this issue Oct 25, 2019 · 2 comments · Fixed by #679

Comments

@munnerz
Copy link
Member

munnerz commented Oct 25, 2019

In df0f06f#diff-37aff102a57d3d7b797f152915a6dc16R15, the dependency on client_golang was bumped to v1.0.0.

This was not required as part of bumping dependencies for Kubernetes 1.15.x (as k8s is currently incompatible with v1.0.0 due to the github.com/prometheus/client_golang/prometheus.InstrumentHandler method being removed).

Bumping this dependency in k/k is non-trivial as a replacement for this method is not provided: https://github.com/prometheus/client_golang/blob/2641b987480bca71fb39738eb8c8b0d577cb1d76/prometheus/http.go#L112-L133

controller-runtime does not itself depend on k8s.io/component-base, which is the area of Kubernetes that depends on the prometheus client. Therefore this repository is able to build fine. If another project does depend on controller-runtime as well as component-base (which is a reasonable thing to do 😄), when running go mod tidy the go tool replaces my own require directive to point to client_golang 1.0.0, thus breaking my build of component-base 🙈

Can we revert the dependency version in this repository to alleviate this? I understand it'd be ideal to 'roll forward' in k/k, but this will take a fairly large amount of work and will mean only users depending on bleeding edge k8s.io/* repos will be able to take advantage for quite a while yet.

/cc @DirectXMan12

@gdoctor
Copy link

gdoctor commented Oct 29, 2019

As of now, the earliest github.com/prometheus/client_golang v1.0.0 is supported by core kubernetes (https://github.com/kubernetes/kubernetes/blob/v1.17.0-beta.0/go.mod) (and component-base https://github.com/kubernetes/kubernetes/blob/v1.17.0-beta.0/staging/src/k8s.io/component-base/go.mod) Makes a lot of sense to me to revert for compatibility reasons.

@DirectXMan12
Copy link
Contributor

yeah, this seems reasonable. Please file a PR. We'll un-revert when 1.17 comes out.

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

Successfully merging a pull request may close this issue.

3 participants