fix: Improve kpt version command output and add comprehensive tests#4479
Open
NETIZEN-11 wants to merge 9 commits intokptdev:mainfrom
Open
fix: Improve kpt version command output and add comprehensive tests#4479NETIZEN-11 wants to merge 9 commits intokptdev:mainfrom
NETIZEN-11 wants to merge 9 commits intokptdev:mainfrom
Conversation
…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 <kumarnitesh121411@gmail.com>
…n, and CRLF - Update testdata Kptfiles to use apply-setters:v0.2.4 (was v0.2.0) which is not registered in the functions map, causing TestRender failures - Fix validateFnConfigPathSyntax to use path.IsAbs (forward-slash) instead of filepath.IsAbs so absolute path detection works correctly on all platforms - Normalize CRLF to LF in pkg_context_test.go when reading expected output files to fix TestPkgContextGenerator on Windows - Remove unused absPath helper and os import from executor_test.go Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
- Remove duplicate entries for apply-setters (v0.2.2) and krm-functions-sdk (v1.0.2) - Bump k8s.io/apiextensions-apiserver from v0.34.1 to v0.35.0 to align all k8s deps - Remove gogo/protobuf indirect dep (no longer needed) - Run go mod tidy to validate Addresses reviewer feedback on PR kptdev#4432 Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
…ility The PR bumps apply-setters to v0.2.4 in go.mod. Adding v0.2.4 to the functions registry is required so Kptfiles referencing the new version work with the built-in runner. v0.2.0 is kept for backward compatibility with existing Kptfiles that already reference that version. Also revert testdata Kptfiles back to v0.2.0 since both versions are now supported by the functions map. Addresses reviewer question on PR kptdev#4432 Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
added 3 commits
April 14, 2026 02:32
Enhance the kpt version command to provide clear, consistent semantic version output for both development and release builds. Changes: - Add initVersion() function that enriches version with VCS revision from Go's debug.ReadBuildInfo() for development builds - Update Makefile LDFLAGS to inject v0.0.0-dev+<commit> format for local builds, separate from goreleaser-managed release versioning - Release builds continue to use proper semver tags injected by goreleaser Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
Bug fixes and improvements from testing: - Add apply-setters:v0.2.0 to functions map for backward compatibility - Use path.IsAbs instead of filepath.IsAbs for cross-platform path validation - Normalize CRLF to LF in pkg_context_test.go for Windows compatibility - Fix path handling in executor_test.go with absPath helper - Remove extra blank line in runner.go Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
- Bump k8s.io/apiextensions-apiserver from v0.34.1 to v0.35.0 - Update indirect dependency chain for consistency - Remove outdated transitive dependencies Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
30b4ec1 to
5461e64
Compare
Contributor
|
This PR contains dependency uplifts and changes to path handling as well as the described changes. Please separate these aspects into separate PRs. Also, please consider the comment made on PR #4468 #4468 (comment) |
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.
Description
This PR improves the
kpt versioncommand to provide clear, consistent semantic version output across all architectures and adds comprehensive test coverage.Part of #4450 - Stabilize kpt API to version 1
Changes Made
Version Command Enhancement (
run/run.go)Test Coverage (
run/run_test.go)Testing