Allow creating/updating draft package revisions with a failing pipeline#194
Allow creating/updating draft package revisions with a failing pipeline#194kispaljr wants to merge 5 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kispaljr The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Could you move the vendoring of the kpt function sdk libraries into a separate PR? I'm fine with it, just so it's not bundled with this one. |
|
|
|
/retest |
|
@kispaljr we have tweaked the Sonarcloud checks but i think you may need to rebase to pick up the tweaked config file. |
46b1b46 to
da936a7
Compare
@nagygergo Good idea, I did that: #212 . Unfortunately until that PR is merged all the changes related to the vendoring are also showing up in this change. I will update the original description soon to point to the important parts of the change. |
7390344 to
13b49fc
Compare
13b49fc to
07aac3a
Compare
|
This PR adds a condition to the status of the Kptfile, that indicates the success or failure of the latest render. Proposal and approval is rejected if this condition is false. This condition is easily observed by any porch client either in the status of the PackageRevision object, or as part of the Kptfile. |
The error that user gets when propose/approve is rejected, states clearly that the pipeline execution has failed, and the Message of the Render condition will even contain the full render status in JSON format |
This change only handles the binary result (failed or succeeded ) of the render operation. I believe this is enough for this particular use case. Making the full RenderStatus always available is still a good functionality to add, but it can come independently from this. |
Yes, I store a condition that stores the binary result of the last render. Since conditions are already a part of Kptfile, this doesn't require any API change |
Since conditions are already a part of Kptfile, this doesn't require any API change. That leaves kpt render and porch render as compatible as it is now. |
|
Hi @kispaljr , |
|
This code is so old that is not meaningful anymore. |


See related discussion here: nephio-project/nephio#876
Right now the creation of a new draft PackageRevision fails if the pipeline in the kpt package fails. Isn't only proposal/approval should be rejected in this case? Similarly how we allow to create draft packages with not-ready readiness gates, and only check readiness at proposal/approval time.
This makes it very hard to debug cases, when an algorithm tries to create a new package (like a PackageVariant, or any other higher level controller). This means that the content of the newly created package is calculated, it doesn't exists on the developers machine, so she cannot try to fix the package by locally running kpt fn render or similar.
On the other hand if we allow the creation of a half-ready draft, it would allow the developer to download the faulty package and try to troubleshoot the problem. I believe the purpose of draft revisions is to allow the preparation of the final version of a package anyway.