Skip to content

Use API v0.0.2 and SDK v1.1.0#4620

Open
mozesl-nokia wants to merge 3 commits into
kptdev:mainfrom
nokia:use-api-v0.0.2
Open

Use API v0.0.2 and SDK v1.1.0#4620
mozesl-nokia wants to merge 3 commits into
kptdev:mainfrom
nokia:use-api-v0.0.2

Conversation

@mozesl-nokia

Copy link
Copy Markdown
Contributor

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/mod for semver; replaced this usage with Masterminds' semver.

Copilot AI review requested due to automatic review settings July 6, 2026 09:41
@mozesl-nokia mozesl-nokia added dependencies Pull requests that update a dependency file area/fn-runtime KRM function runtime go Pull requests that update Go code labels Jul 6, 2026
@netlify

netlify Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit 4b29ff4
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/6a4b8d7a1b951900082447a0
😎 Deploy Preview https://deploy-preview-4620--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 6, 2026
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/live and pkg/kptfile codepaths to api/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.

Comment thread pkg/fn/runtime/container.go
Comment thread pkg/fn/runtime/container.go Outdated
Comment thread pkg/kptfile/kptfileutil/gvk.go
Comment thread pkg/kptfile/kptfileutil/gvk.go Outdated
Signed-off-by: mozesl-nokia <laszlo.mozes@nokia.com>

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mozesl-nokia mozesl-nokia requested review from a team July 6, 2026 10:01
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/fn-runtime KRM function runtime dependencies Pull requests that update a dependency file go Pull requests that update Go code size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants