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

Breaking changes in the BuilderInterface released in a bug fix version (v2.1.1) #1605

Closed
ahmed-mez opened this issue Oct 11, 2021 · 0 comments · Fixed by #1610
Closed

Breaking changes in the BuilderInterface released in a bug fix version (v2.1.1) #1605

ahmed-mez opened this issue Oct 11, 2021 · 0 comments · Fixed by #1610
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ahmed-mez
Copy link
Contributor

ahmed-mez commented Oct 11, 2021

What happened:

#1499 introduces major breaking changes in the BuilderInterface interface.

  • BuildStoresFunc now returns []*metricsstore.MetricsStore (struct) instead of a cache.Store (interface). This made injecting custom stores impossible when kube state metrics is used as a library.
  • Build() not exposing the store anymore. The returned interface []metricsstore.MetricsWriter is very specific to the regular use-case and isn't generic enough. The builder should at least have a method to expose the store as is.

What you expected to happen:

  • Public APIs and interfaces should stay backward compatible especially in bug fix releases.
  • Stick to using interfaces: metricsstore.MetricsStore implements cache.Store already. Any reason why []*metricsstore.MetricsStore can't be replaced by []cache.Store ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
1 participant