refactor(fn): return RenderStatus from Renderer interface - #4777
Open
SurbhiAgarwal1 wants to merge 1 commit into
Open
SurbhiAgarwal1 wants to merge 1 commit into
SurbhiAgarwal1 wants to merge 1 commit into
Conversation
SurbhiAgarwal1
requested review from
a team
and
a balanced review from Copilot
September 28, 2026 17:03
SurbhiAgarwal1
requested review from
efiacor,
kispaljr,
liamfallon and
mozesl-nokia
as code owners
September 28, 2026 17:03
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| } | ||
| return rr.Execute(printer.WithContext(ctx, &packagePrinter{})) | ||
| _, err := rr.Execute(printer.WithContext(ctx, &packagePrinter{})) | ||
| return rr.RenderStatus, err |
Comment on lines
+253
to
+256
| if hydErr != nil { | ||
| return &kptfilev1.RenderStatus{ | ||
| ErrorSummary: hydErr.Error(), | ||
| } |
Contributor
|
Since this is a breaking API change, I propose we don't straight up replace the existing interface but create a new one and deprecate the old one without changes. |
SurbhiAgarwal1
force-pushed
the
feat/4520-renderer-render-status
branch
from
September 29, 2026 14:52
479848a to
2985a24
Compare
Introduce fn.StatusRenderer returning (*kptfilev1.RenderStatus, error) and kptops.NewStatusRenderer while preserving the existing fn.Renderer interface as deprecated to prevent breaking API changes for external callers. Expose RenderStatus across all kptops.Renderer execution paths, ensuring ErrorSummary is populated on pre-hydration and post-hydration errors. Fixes kptdev#4520 Signed-off-by: Surbhi Agarwal <SurbhiAgarwal1@users.noreply.github.com>
SurbhiAgarwal1
force-pushed
the
feat/4520-renderer-render-status
branch
from
September 29, 2026 16:04
2985a24 to
c49f546
Compare
This branch has not been deployed
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
Updates the
fn.Rendererinterface return value to(*kptfilev1.RenderStatus, error)instead of(*fnresultv1.ResultList, error). The underlyingkptops.Renderernow tracks and returnsRenderStatusdirectly upon execution.Motivation
Callers of the
Rendererinterface need access to the structuredRenderStatusmetadata (such as individual mutator/validator step execution details and error summaries) rather than just the rawResultList.Fixes #4520
Changes
pkg/fn/render.go: UpdatedRendererinterface signature to return(*kptfilev1.RenderStatus, error).pkg/lib/kptops/render_executor.go:RenderStatusfield toRenderer.updateRenderStatusto return the constructed*kptfilev1.RenderStatus.e.RenderStatusacross all execution return paths (both success and error cases).buildRenderStatuspopulatesErrorSummarywhen hydration errors occur before steps are executed.pkg/lib/kptops/render.go: Updatedrenderer.Renderto returnrr.RenderStatusalong with execution error.pkg/lib/kptops/render_status_test.go: Added unit tests verifyingRenderreturns*kptfilev1.RenderStatuson both success and failure cases.