Repository navigation
Clean up types and helpers moved to the kpt API - #772
Merged
Merged
Conversation
mozesl-nokia
requested review from
efiacor,
kispaljr and
liamfallon
as code owners
October 27, 2026 08:35
Assisted-by: Cursor:grok-4.7 Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
mozesl-nokia
force-pushed
the
clean-kubeobject
branch
from
October 27, 2026 08:36
65ce68c to
7157b3d
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The migration changes structured-result value types and makes the copyable starter depend on a sibling SDK checkout.
2 open issues
What changed in this PR
This PR consolidates shared resource types and helpers in the kpt API module, leaving the SDK focused on function execution.
Changes:
- Replace SDK type references with
kubeobjecttypes across runners, tests, examples, and documentation. - Remove local implementations and tests for functionality moved to the API.
- Upgrade the API dependency to v1.1.0 and enable local SDK replacements in example modules.
| File | Description |
|---|---|
| README.md | Update example signatures and interface documentation. |
| go/get-started/main.go | Use API types in the starter runner. |
| go/get-started/go.sum | Refresh starter dependency checksums. |
| go/get-started/go.mod | Add API dependency and local SDK replacement. |
| go/fn/types.go | Remove the relocated byte-reader wrapper declaration. |
| go/fn/testhelpers/golden.go | Use API types in golden-test helpers. |
| go/fn/runnerProcessor.go | Adapt runner processing to API types. |
| go/fn/runnerprocessor_test.go | Migrate runner tests to API types. |
| go/fn/run.go | Use API processors and resource parsing. |
| go/fn/run_test.go | Update execution tests to API interfaces. |
| go/fn/run_flags_test.go | Update the no-op processor type. |
| go/fn/run_filemode_test.go | Migrate file-mode tests to API types. |
| go/fn/run_filemode_property_test.go | Use API parsing in equivalence tests. |
| go/fn/result.go | Remove local result types and helpers. |
| go/fn/resourcelist.go | Remove local ResourceList implementation. |
| go/fn/resourcelist_test.go | Remove tests for moved ResourceList functionality. |
| go/fn/resourcelist_io.go | Use API types and retain the I/O wrapper. |
| go/fn/origin.go | Remove local resource-origin helpers. |
| go/fn/origin_test.go | Remove tests for moved origin helpers. |
| go/fn/objects.go | Remove local object collection helpers. |
| go/fn/object_io.go | Remove local object parsing and serialization. |
| go/fn/kptfileko/pipeline.go | Remove local pipeline helpers. |
| go/fn/kptfileko/pipeline_test.go | Remove pipeline-helper tests. |
| go/fn/kptfileko/metadata.go | Remove local Kptfile metadata helpers. |
| go/fn/kptfileko/kptfile.go | Remove the local Kptfile wrapper. |
| go/fn/kptfileko/kptfile_test.go | Remove Kptfile wrapper tests. |
| go/fn/kptfileko/conditions.go | Remove condition and readiness-gate helpers. |
| go/fn/kptfileko/conditions_test.go | Remove condition-helper tests. |
| go/fn/kptfileapi/types.go | Remove copied Kptfile API types. |
| go/fn/internal/yaml_utils.go | Remove local YAML formatting utilities. |
| go/fn/internal/variant.go | Remove local YAML variant conversions. |
| go/fn/internal/test/variant_test.go | Remove variant conversion tests. |
| go/fn/internal/test/maphelper_test.go | Remove map-helper tests. |
| go/fn/internal/test/go.sum | Remove obsolete test-module checksums. |
| go/fn/internal/test/go.mod | Remove the obsolete internal test module. |
| go/fn/internal/slice.go | Remove local slice variants. |
| go/fn/internal/scalar.go | Remove local scalar variants. |
| go/fn/internal/namespace.go | Remove the local namespace-scope lookup. |
| go/fn/internal/maphelpers.go | Remove local nested-map helpers. |
| go/fn/internal/map.go | Remove local map variants. |
| go/fn/internal/document.go | Remove local YAML document helpers. |
| go/fn/go.sum | Refresh SDK dependency checksums. |
| go/fn/go.mod | Upgrade the API and remove unused dependencies. |
| go/fn/functionrunner.go | Use API types in the Runner interface. |
| go/fn/examples/go.sum | Refresh example dependency checksums. |
| go/fn/examples/go.mod | Add API dependency and local SDK replacement. |
| go/fn/examples/example_validator_test.go | Migrate validation and result types. |
| go/fn/examples/example_set_field_test.go | Migrate the field-setting processor. |
| go/fn/examples/example_select_exclude_test.go | Use API selection helpers. |
| go/fn/examples/example_read_functionConfig_test.go | Migrate configuration-reading types. |
| go/fn/examples/example_read_field_test.go | Use API resource types and selectors. |
| go/fn/examples/example_mutate_comments_test.go | Migrate the comment-mutation processor. |
| go/fn/examples/example_logger_injector_test.go | Migrate the logger-injection processor. |
| go/fn/examples/example_kubeobject_test.go | Use API KubeObject declarations. |
| go/fn/examples/example_generator_test.go | Migrate generator types and configuration errors. |
| go/fn/examples/example_filter_GVK_test.go | Use API types, errors, and selectors. |
| go/fn/examples/example_builtin_function_test.go | Update the built-in processor signature. |
| go/fn/examples/example_asmain_runner_test.go | Update the example Runner signature. |
| go/fn/examples/const.go | Use API objects in the shared predicate. |
| go/fn/errors.go | Remove local resource error types. |
| go/fn/doc.go | Document API ownership of resource types. |
| go/fn/const.go | Remove constants moved to the API. |
Review effort: Balanced
1 task done
liamfallon
approved these changes
Oct 27, 2026
efiacor
approved these changes
Oct 27, 2026
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.

Removed all the types and helpers that have been moved to the main repo's
apimodule and pointed all the old references to the api where applicable.AI disclosure: Cursor's Grok 4.7 was used to do most of the cleanup.