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

Migrate Fake Client from gopkg.in/evanphx/json-patch.v4 to github.com/evanphx/json-patch/v5 #3117

Open
kersten opened this issue Feb 17, 2025 · 1 comment

Comments

@kersten
Copy link

kersten commented Feb 17, 2025

We would like to request that the Fake Client library be updated from the older gopkg.in/evanphx/json-patch.v4 to github.com/evanphx/json-patch/v5.

The primary motivation for this change is to remove the indirect dependency on github.com/pkg/errors that accompanies version v4. This indirect dependency was removed in json-patch v5.9.11 and has been integrated in controller-runtime since version v0.20.2.

Rationale

  • Dependency Cleanup: Upgrading to v5 removes the indirect github.com/pkg/errors dependency, reducing the overall dependency footprint.
  • Upstream Compatibility: Aligning with newer releases ensures compatibility and support for future bug fixes and features.
  • Consistency: As controller-runtime is already using newer versions, matching these library versions helps maintain consistency.

Proposal

  1. Update the import statement in pkg/client/fake/client.go from gopkg.in/evanphx/json-patch.v4 to github.com/evanphx/json-patch/v5.
  2. Remove the direct v4 dependency entry from go.mod in favor of the v5 version, ensuring no regression in functionality.
  3. Validate that existing tests pass and confirm there are no breaking changes.

Please let us know if you have any questions or need more details. Thank you for considering this request.

@kersten
Copy link
Author

kersten commented Feb 17, 2025

I created a PR for it: #3118

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

No branches or pull requests

1 participant