Repository navigation
refactor: absorb thirdparty packages into pkg and remove thirdparty folder (#4554) - #4739
SurbhiAgarwal1 wants to merge 3 commits into
Conversation
- 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>
✅ 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>
|
The third party directory originally came from an external source, we could use the external library and just add the extra fields we need to it. @mozesl-nokia will comment further. |
|
Hi @liamfallon! Thanks for the feedback! Regarding using the external library directly vs. absorbing into Absorbing into Looking forward to hearing thoughts from @mozesl-nokia as well! |
|
Sorry for the late reply here as well; I was expecting the diff to be too great, I think it is fine as long as we keep that original kubernetes copyrights as well as adding our own line. However, I think we should be moving these to their logical places, not just dumping them into |
|
Superseded by #4811 |
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.