Remove internal/kptops dead code#4481
Conversation
Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Removes the legacy internal/kptops translators/amendments and related tests/testdata after the move from porch to kpt, keeping pkg/lib/kptops tests working with an in-process runtime.
Changes:
- Deleted the
internal/kptopspackage and its associatedtestdata. - Removed the
pkg/lib/kptops/eval.gosimple runtime and its unit test. - Introduced a new test-only in-process
FunctionRuntimeinpkg/lib/kptops/helpers_test.goand trimmedrender_test.goaccordingly.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/lib/kptops/render_test.go | Removes now-obsolete render test; retains printer logging tests with reduced imports. |
| pkg/lib/kptops/helpers_test.go | Adds test-only in-process function runtime + simplified set-labels/set-namespace implementations. |
| pkg/lib/kptops/eval_test.go | Deletes tests that depended on internal/kptops runtime behavior/testdata. |
| pkg/lib/kptops/eval.go | Deletes simple runtime that depended on internal/kptops processors. |
| internal/kptops/testdata/render-with-inline-config/simple-bucket/bucket.yaml | Removes obsolete render test fixture. |
| internal/kptops/testdata/render-with-inline-config/simple-bucket/Kptfile | Removes obsolete render test fixture. |
| internal/kptops/testdata/render-with-inline-config/expected.txt | Removes obsolete render expected output. |
| internal/kptops/testdata/render-with-function-config/simple-bucket/setters.yaml | Removes obsolete render test fixture. |
| internal/kptops/testdata/render-with-function-config/simple-bucket/bucket.yaml | Removes obsolete render test fixture. |
| internal/kptops/testdata/render-with-function-config/simple-bucket/Kptfile | Removes obsolete render test fixture. |
| internal/kptops/testdata/render-with-function-config/expected.txt | Removes obsolete render expected output. |
| internal/kptops/testdata/bucket/bucket.yaml | Removes obsolete fixture used by removed eval test. |
| internal/kptops/set-namespace.go | Deletes dead test-focused function implementation. |
| internal/kptops/set-labels.go | Deletes dead test-focused function implementation. |
| internal/kptops/functions.go | Deletes dead image->processor registry. |
| internal/kptops/doc.go | Deletes package docs for removed internal package. |
| internal/kptops/apply-setters.go | Deletes dead apply-setters wrapper implementation. |
| go.mod | Drops the apply-setters Go module dependency. |
| go.sum | Removes corresponding go.sum entries for the dropped dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Removes the now-obsolete internal/kptops implementation and its associated tests/testdata after the move away from porch, keeping pkg/lib/kptops tests self-contained.
Changes:
- Deleted the
internal/kptopspackage (processors + registry) and all its testdata fixtures. - Removed the
pkg/lib/kptops/eval.gowrapper runtime and its unit test. - Refactored
pkg/lib/kptopstests by removing the old render golden tests and adding a lightweight in-process function runtime for remaining render-related tests.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/lib/kptops/render_test.go | Removes render golden tests tied to deleted internal/kptops testdata; keeps printer/logging tests. |
| pkg/lib/kptops/helpers_test.go | Adds a test-only in-process FunctionRuntime for render pipeline tests. |
| pkg/lib/kptops/eval_test.go | Deletes eval tests that depended on internal/kptops. |
| pkg/lib/kptops/eval.go | Deletes runtime implementation that depended on internal/kptops. |
| internal/kptops/testdata/** | Removes render/eval fixtures for the deleted package. |
| internal/kptops/*.go | Removes dead processors (apply-setters, set-labels, set-namespace) and registry/doc. |
| go.mod | Drops unused krm-functions-catalog/functions/go/apply-setters module dependency. |
| go.sum | Removes corresponding checksum entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Removal of dead code after move from porch to kpt (internal/kptops)
Fixes #4375