Skip to content

go.mod dependency cleanup#2085

Merged
moolen merged 2 commits intoexternal-secrets:mainfrom
sgmitchell:main
Mar 6, 2023
Merged

go.mod dependency cleanup#2085
moolen merged 2 commits intoexternal-secrets:mainfrom
sgmitchell:main

Conversation

@sgmitchell
Copy link
Copy Markdown
Contributor

Problem Statement

While working with this repo, I noticed the go.mod file had some confusing import directives. This PR tries to remove that confusion.

Related Issue

None

Proposed Changes

From the commits:

#1525 accidentally assumed that k8s.io/client-go followed semvar and update the lib to the latest 1.x release. Unfortunately, that project doesn't follow semvar on major versions so this actually downgraded the package from v0.24.2 to v1.5.2 that was released ~15 months earlier. This was subsequently fixed with replace statements but the go mod file is easier to reason about if we correct this.

#1990 attempted to bump the version of some dependencies but missed the versions being set in the replace statements. This caused some of the deps to not actually get updated (as can be seen by the contents of the go.sum file). It turns out most of these replace statements are for libraries that aren't currently being imported, so I cleaned up the whole block.

Checklist

  • I have read the contribution guidelines
  • All commits are signed with git commit --signoff
  • My changes have reasonable test coverage
  • All tests pass with make test
  • [] I ensured my PR is ready for review with make reviewable
    • make docs failed with an error most likely related my my local env. All other make dependencies of the reviewable target passed when ran individually. I don't think this should have any impact on the pr's correctness

PR #1525 accidentally assumed that k8s.io/client-go followed semvar and
update the lib to the latest 1.x release. Unfortunately, that project
doesn't follow semvar on major versions so this actually _downgraded_
the package to one ~15 months earlier. This was subsequently fixed with
replace statements but the go mod file is easier to reason about if we
correct this

Signed-off-by: Steve Mitchell <steve@sgmitchell.net>
PR #1990 attempted to bump the version of some dependencies but missed
the versions being set in the replace statements. This caused some of
the deps to not actually get updated (as can be seen by the contents of
the go.sum file). It turns out most of these replace statements are for
libraries that aren't currently being imported, so I cleaned up the
whole block.

The resulting changes can be seen in the go.sum file

Signed-off-by: Steve Mitchell <steve@sgmitchell.net>
@sgmitchell sgmitchell requested a review from a team as a code owner March 3, 2023 00:16
@sgmitchell sgmitchell requested review from knelasevero and removed request for a team March 3, 2023 00:16
Copy link
Copy Markdown
Contributor

@paul-the-alien paul-the-alien bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greetings!
Thank you for contributing to this project!
If this is your first time contributing, please make
sure to read the Developer and Contributing Process guides.
Please also mind and follow our Code of Conduct.

Useful commands:

  • make fmt: Formats the code
  • make check-diff: Ensures the branch is clean
  • make reviewable: Ensures a PR is ready for review

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Copy Markdown
Member

@moolen moolen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

Weird that the CI pipeline doesn't trigger 🤨. Anyways, gonna merge this and fix forward if needed 👍

@moolen moolen merged commit bdd5899 into external-secrets:main Mar 6, 2023
sebagomez pushed a commit that referenced this pull request Mar 8, 2023
* deps: remove awkward k8s.io/client-go version

PR #1525 accidentally assumed that k8s.io/client-go followed semvar and
update the lib to the latest 1.x release. Unfortunately, that project
doesn't follow semvar on major versions so this actually _downgraded_
the package to one ~15 months earlier. This was subsequently fixed with
replace statements but the go mod file is easier to reason about if we
correct this

Signed-off-by: Steve Mitchell <steve@sgmitchell.net>

* deps: remove unncessary replace statements

PR #1990 attempted to bump the version of some dependencies but missed
the versions being set in the replace statements. This caused some of
the deps to not actually get updated (as can be seen by the contents of
the go.sum file). It turns out most of these replace statements are for
libraries that aren't currently being imported, so I cleaned up the
whole block.

The resulting changes can be seen in the go.sum file

Signed-off-by: Steve Mitchell <steve@sgmitchell.net>

---------

Signed-off-by: Steve Mitchell <steve@sgmitchell.net>
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 this pull request may close these issues.

2 participants