refactor: absorb thirdparty packages into pkg and remove thirdparty folder (#4554) - #4739
Open
SurbhiAgarwal1 wants to merge 3 commits into
Open
refactor: absorb thirdparty packages into pkg and remove thirdparty folder (#4554)#4739SurbhiAgarwal1 wants to merge 3 commits into
SurbhiAgarwal1 wants to merge 3 commits into
Conversation
added 2 commits
September 1, 2026 16:35
- Consolidate CLI and Porch klog printer logic into an exported Printer interface in pkg/printer. - Introduce stateful contextual scoping via WithField, WithFields, WithPackage, and WithFunction. - Provide structured lifecycle event printing (PrintRunning, PrintPass, PrintFail, PrintResult, PrintSummary). - Remove duplicate packagePrinter implementation in pkg/lib/kptops/render.go. - Add comprehensive unit tests verifying stateful field scoping and formatting. Signed-off-by: SurbhiAgarwal1 <surbhi.agarwal@example.com>
…older (kptdev#4554) Signed-off-by: SurbhiAgarwal1 <surbhi.agarwal@example.com>
SurbhiAgarwal1
requested review from
a team
and
a balanced review from Copilot
September 8, 2026 16:20
SurbhiAgarwal1
requested review from
efiacor,
kispaljr,
liamfallon and
mozesl-nokia
as code owners
September 8, 2026 16:20
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Surbhi Agarwal <SurbhiAgarwal1@users.noreply.github.com>
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 pull request refactors the
thirdparty/directory in the repository by absorbing the customized packages intopkg/and completely removing thethirdparty/folder:thirdparty/kyaml/runfntopkg/fn/runfn.thirdparty/cmdconfig/commands/*(cmdcat,cmdeval,cmdsink,cmdsource,cmdtree,runner) topkg/cmdconfig/commands/*.commands/fn/fncmd.go,commands/pkg/pkgcmd.go, and internal cross-package dependencies..golangci.yml,sonar.properties,.github/copilot-code-review.yml, andAGENTS.mdto removethirdparty/path exclusions.thirdparty/directory.All original Apache 2.0 copyright and license headers have been preserved.
Motivation
As outlined in issue #4554 (part of EPIC #4552: Clean up the kpt repo), the code in
thirdparty/is no longer a set of unmodified upstream dependencies. Over time, packages likerunfnandcmdconfig/commandswere heavily customized to supportkpt-specific features (such askptfile/v1handling, CEL conditional execution, and custom Cobra command runners).Absorbing these packages into
pkg/formally establisheskpt's ownership, simplifies the repository layout, and allows linters and static analysis tools (golangci-lint, SonarQube) to cover the entire codebase cleanly.Issue Fixed
Fixes #4554
Verification
go fmtandgo vetexecuted cleanly without errors.go test ./pkg/fn/runfn/... ./pkg/cmdconfig/commands/...passed 100%.go buildcompiledkptbinary cleanly.