Skip to content

Clean up types and helpers moved to the kpt API - #772

Merged
efiacor merged 1 commit into
kptdev:mainfrom
nokia:clean-kubeobject
Oct 27, 2026
Merged

efiacor merged 1 commit into
kptdev:mainfrom
nokia:clean-kubeobject

Conversation

@mozesl-nokia

Copy link
Copy Markdown
Contributor

Removed all the types and helpers that have been moved to the main repo's api module 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.

@mozesl-nokia
mozesl-nokia requested review from a team October 27, 2026 08:35
@mozesl-nokia mozesl-nokia added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Oct 27, 2026
@mozesl-nokia
mozesl-nokia requested a balanced review from Copilot October 27, 2026 08:36
Assisted-by: Cursor:grok-4.7
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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 kubeobject types 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

Comment thread go/fn/run.go Resolved
Comment thread go/get-started/go.mod Resolved
@efiacor
efiacor merged commit 3a433fd into kptdev:main Oct 27, 2026
4 checks passed
@mozesl-nokia
mozesl-nokia deleted the clean-kubeobject branch October 27, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants