Use API v0.0.2 and SDK v1.1.0#4620
Open
mozesl-nokia wants to merge 3 commits into
Open
Conversation
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
e21c5f6 to
dbf6a23
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the main module to use github.com/kptdev/kpt/api v0.0.2 and github.com/kptdev/krm-functions-sdk/go/fn v1.1.0, adjusts internal code to use the API’s schema types (including conversions to/from apimachinery types), and replaces golang.org/x/mod/semver usage with github.com/Masterminds/semver/v3.
Changes:
- Bump API and functions SDK module versions.
- Switch GVK/GK handling in
pkg/liveandpkg/kptfilecodepaths toapi/schema/v1, adding conversion helpers where apimachinery types are still required. - Replace docker version semver logic to use Masterminds semver.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/live/rgstream.go | Switches excluded GK logic to api/schema/v1 types. |
| pkg/live/rgpath.go | Converts apimachinery GVK to kpt schema GVK before comparing to ResourceGroup GVK. |
| pkg/live/load.go | Moves object GVK extraction/parsing onto api/schema/v1. |
| pkg/kptfile/kptfileutil/util.go | Updates supported/deprecated Kptfile GVK tracking to use api/schema/v1. |
| pkg/kptfile/kptfileutil/gvk.go | Adds conversion helpers between apimachinery schema GVK and kpt API schema GVK. |
| pkg/fn/runtime/container.go | Replaces docker version validation from x/mod/semver to Masterminds semver. |
| go.mod | Bumps API + SDK versions and removes direct golang.org/x/mod requirement. |
| go.sum | Updates sums for bumped modules and new/transitive deps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: mozesl-nokia <laszlo.mozes@nokia.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As the title says, updated the versions of the main module to use the new version of the API module and the fn SDK module.
The main module still must depend on apimachinery because of metav1 and more importantly unstructured. Thus, added conversion functions for apimachinery types.
Random small change: noticed we depend on
golang.org/x/modfor semver; replaced this usage with Masterminds' semver.