Skip to content

Update kyaml and kustomize API versions in catalog functions#4432

Open
NETIZEN-11 wants to merge 9 commits intokptdev:mainfrom
NETIZEN-11:main
Open

Update kyaml and kustomize API versions in catalog functions#4432
NETIZEN-11 wants to merge 9 commits intokptdev:mainfrom
NETIZEN-11:main

Conversation

@NETIZEN-11
Copy link
Copy Markdown

No description provided.

…nctions

- Upgrade sigs.k8s.io/kustomize/api from v0.20.1 to v0.21.0
- Upgrade sigs.k8s.io/kustomize/kyaml from v0.20.1 to v0.21.0
- Upgrade k8s.io/api from v0.34.1 to v0.35.0
- Upgrade k8s.io/apimachinery from v0.34.1 to v0.35.0
- Upgrade k8s.io/kubectl from v0.34.1 to v0.35.0
- Upgrade github.com/kptdev/krm-functions-catalog/functions/go/apply-setters from v0.2.2 to v0.2.4
- Update catalog function registry to reference new apply-setters version
- Run go mod tidy to resolve transitive dependencies

Resolves GitHub Issue kptdev#4406

All catalog functions remain compatible with new APIs - zero breaking changes encountered.
Zero compilation errors and zero failing tests across repository.
Copilot AI review requested due to automatic review settings March 17, 2026 19:19
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 17, 2026

Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit 512f5bd
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/69c2ebfdfe51e4000857130f
😎 Deploy Preview https://deploy-preview-4432--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…nctions

- Upgrade sigs.k8s.io/kustomize/api from v0.20.1 to v0.21.0
- Upgrade sigs.k8s.io/kustomize/kyaml from v0.20.1 to v0.21.0
- Upgrade k8s.io/api from v0.34.1 to v0.35.0
- Upgrade k8s.io/apimachinery from v0.34.1 to v0.35.0
- Upgrade k8s.io/kubectl from v0.34.1 to v0.35.0
- Upgrade github.com/kptdev/krm-functions-catalog/functions/go/apply-setters from v0.2.2 to v0.2.4
- Update catalog function registry to reference new apply-setters version
- Run go mod tidy to resolve transitive dependencies

Resolves GitHub Issue kptdev#4406

All catalog functions remain compatible with new APIs - zero breaking changes encountered.
Zero compilation errors and zero failing tests across repository.

Signed-off-by: NETIZEN-11 <nitesh@example.com>
NETIZEN-11 added 2 commits March 18, 2026 10:51
- Add new RenderStatus and PipelineStepResult structs as per GitHub issue kptdev#4390
- Clearly separate mutation pipeline steps from validation steps
- Capture execution failures (network errors, missing images, command failures)
- Record stderr and exit codes for each pipeline step
- Extract and categorize error results from function results
- Aggregate all failures into comprehensive ErrorSummary
- Update pipeline execution logic to populate detailed step results
- Maintain backward compatibility with existing Rendered conditions
- Add comprehensive unit tests for new functionality
- Fix JSON tags and serialization issues

This addresses the problems with the current schema:
- Difficult troubleshooting → Clear step-by-step execution details
- Unclear error reporting → Structured error information with aggregation
- Inability to represent execution failures → Detailed execution error capture
- Confusing result structure → Clean separation of mutation/validation steps
…ng issues

- Add Windows build constraints to exclude wasmtime support
- Fix linting issues: spelling, unused parameters, unused functions
- Use errors.New for static error strings
- Remove unused setRenderCondition function

This resolves the failing CI checks for docker and podman builds.
Copilot AI review requested due to automatic review settings March 19, 2026 06:33
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Mar 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@efiacor efiacor requested a review from Copilot March 19, 2026 07:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 modernizes Kubernetes/kustomize-related dependencies and updates render/function execution plumbing to align with newer APIs, while also persisting more detailed render execution status into the root Kptfile.

Changes:

  • Bump kustomize/kyaml, Kubernetes libs (k8s.io/*), apply-setters, and test deps in go.mod/go.sum.
  • Extend Kptfile status to include a new renderStatus payload and populate it during fn render execution.
  • Adjust wasmtime build constraints (disable wasmtime on Windows) and update the built-in catalog apply-setters image tag.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/test/runner/runner.go Minor formatting cleanup.
pkg/api/kptfile/v1/types.go Adds new Status.RenderStatus schema and supporting types.
internal/util/render/executor.go Tracks per-step pipeline execution info and writes it to Kptfile status.
internal/util/render/executor_test.go Adds unit tests for new render-status helpers.
internal/kptops/functions.go Updates apply-setters catalog image version.
internal/fnruntime/wasmtime_unsupported.go Expands unsupported build condition and improves error message/impl.
internal/fnruntime/wasmtime.go Narrows supported build condition to non-Windows cgo builds.
go.mod Updates dependency versions (notably Kubernetes + kustomize).
go.sum Dependency graph updates from go mod tidy.
Comments suppressed due to low confidence (1)

internal/util/render/executor.go:92

  • The PR title/description focus on dependency/version updates, but this change also introduces a new persisted Kptfile schema field (status.renderStatus) and writes detailed pipeline step results into the root Kptfile. Please either update the PR description (and any relevant release notes / API docs) to reflect this user-visible behavior change, or consider splitting the RenderStatus feature into a separate PR.
	hctx := &hydrationContext{
		root:          root,
		pkgs:          map[types.UniquePath]*pkgNode{},
		fnResults:     fnresult.NewResultList(),
		renderStatus:  &kptfilev1.RenderStatus{},
		runnerOptions: e.RunnerOptions,
		fileSystem:    e.FileSystem,
		runtime:       e.Runtime,
	}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

- Update k8s.io/apiextensions-apiserver from v0.34.1 to v0.35.0
- Add yaml tags to RenderStatus, PipelineStepResult, and ResultItem structs
- Fix result classification logic to use severity instead of ExitCode
- Fix YAML test input to use proper multiline format
- Run go mod tidy to normalize dependencies

All changes maintain Go formatting and project coding style.
…subpackages

- Add isRootKptfile() helper function for robust root detection
- Enhance pkgContextResource() to generate package-context.yaml only for root packages
- Subpackages are now correctly suppressed to prevent duplicate ConfigMap creation
- Fix path normalization to handle relative paths like './Kptfile'
- Ensure only one ConfigMap 'kptfile.kpt.dev' exists in mutation pipeline

This resolves the 'ConfigMap already exists' error when rendering packages with subpackages.
Copilot AI review requested due to automatic review settings March 19, 2026 19:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

NETIZEN-11 added a commit to NETIZEN-11/kpt that referenced this pull request Mar 24, 2026
…ML serialization, result classification, and test YAML parsing

Fixes applied:
1. Kubernetes Dependency Alignment - Updated all k8s.io modules to v0.35.0
2. YAML Serialization Fix - Added yaml tags alongside json tags in RenderStatus, PipelineStepResult, ResultItem
3. Correct Result Classification Logic - Updated extractResultsFromFnResults to use severity instead of ExitCode
4. Test YAML Parsing Fix - Fixed yaml.MustParse test input with proper multiline YAML

Result: Eliminates dependency/API mismatch, ensures correct YAML output, fixes logic bug in result classification, makes tests valid and reliable

Closes: kptdev#4432

Signed-off-by: NETIZEN-11 <niteshkumar121411@gmail.com>
NETIZEN-11 added a commit to NETIZEN-11/kpt that referenced this pull request Mar 24, 2026
…ML serialization, result classification, and test YAML parsing

Fixes applied:
1. Kubernetes Dependency Alignment - Updated all k8s.io modules to v0.35.0
2. YAML Serialization Fix - Added yaml tags alongside json tags in RenderStatus, PipelineStepResult, ResultItem
3. Correct Result Classification Logic - Updated extractResultsFromFnResults to use severity instead of ExitCode
4. Test YAML Parsing Fix - Fixed yaml.MustParse test input with proper multiline YAML

Result: Eliminates dependency/API mismatch, ensures correct YAML output, fixes logic bug in result classification, makes tests valid and reliable

Closes: kptdev#4432

Signed-off-by: NETIZEN-11 <niteshkumar121411@gmail.com>
NETIZEN-11 and others added 2 commits March 25, 2026 01:24
- Removed mistakenly pushed changes that were related to another issue
- Cleaned up commits to keep this PR focused on the intended issue
- No functional changes introduced

This ensures the PR only contains relevant changes.

Signed-off-by: NETIZEN-11 <niteshkumar121411@gmail.com>
NETIZEN-11 added a commit to NETIZEN-11/kpt that referenced this pull request Mar 30, 2026
…ML serialization, result classification, and test YAML parsing

Fixes applied:
1. Kubernetes Dependency Alignment - Updated all k8s.io modules to v0.35.0
2. YAML Serialization Fix - Added yaml tags alongside json tags in RenderStatus, PipelineStepResult, ResultItem
3. Correct Result Classification Logic - Updated extractResultsFromFnResults to use severity instead of ExitCode
4. Test YAML Parsing Fix - Fixed yaml.MustParse test input with proper multiline YAML

Result: Eliminates dependency/API mismatch, ensures correct YAML output, fixes logic bug in result classification, makes tests valid and reliable

Closes: kptdev#4432

Signed-off-by: NETIZEN-11 <niteshkumar121411@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants