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

Reduce same-purpose Go dependencies #3848

Closed
antgamdia opened this issue Nov 29, 2021 · 3 comments
Closed

Reduce same-purpose Go dependencies #3848

antgamdia opened this issue Nov 29, 2021 · 3 comments
Assignees
Labels
component/project (To be removed) kind/enhancement An issue that reports an enhancement for an implemented feature

Comments

@antgamdia
Copy link
Contributor

antgamdia commented Nov 29, 2021

Description:

While upgrading our deps in the past, I noticed we are using a bunch of dependencies for the same purpose. Unless there is an actual reason for doing so, I think we should keep our dependencies as tight as possible.

Duplicated YAML deps:

  • github.com/ghodss/yaml v1.0.0
  • gopkg.in/yaml.v2 v2.4.0
  • sigs.k8s.io/yaml v1.3.0
  • k8s.io/apimachinery/pkg/util/yaml

Duplicated logging deps:

  • k8s.io/klog/v2 v2.30.0
  • github.com/pkg/errors v0.9.1
  • github.com/sirupsen/logrus v1.8.1

Dupplicated deps

  • github.com/Masterminds/semver v1.5.0
  • github.com/Masterminds/semver/v3 v3.1.1
@antgamdia antgamdia added priority/low component/project (To be removed) kind/enhancement An issue that reports an enhancement for an implemented feature labels Nov 29, 2021
@absoludity
Copy link
Contributor

+1 for the more obvious ones (semver v3, yaml). With the logging ones, +1 to use klog/v2, but how is the errors package related to logging? (It should be superseded by the standard errors pkg now, I tihnk?)

@antgamdia
Copy link
Contributor Author

WRT Duplicated logging deps, citing this Michael's comment for the record:

We can (and should) update in the kubeapps apisserver to using klog.InfoS and klog.ErrorS which are drop-in replacements, then users can choose to add the --logging-format option to the deployment (or better, we enable from the chart). At least that would have us enabling structured logging in the main service into the future.

@antgamdia
Copy link
Contributor Author

antgamdia commented Jan 31, 2022

Solved via:

Using named import is something still under discussion at #4176 (although it doesn't affect to this issue, directly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/project (To be removed) kind/enhancement An issue that reports an enhancement for an implemented feature
Projects
None yet
Development

No branches or pull requests

3 participants