Repository navigation
Conversation
When a pipeline has several mutators, kyaml's FunctionFilter restores a document's foot comment onto the bare resource root. On the next function call that root is serialized inside the ResourceList items sequence, and YAML decoding attaches the foot comment to the following resource, so each additional mutator duplicated comments across resources and files. Re-wrap such roots in a document node after each function run so foot comments stay outside the items sequence. Fixes kptdev#4211 Assisted-by: Devin:Claude Signed-off-by: Kulraj <59130414+Kulraj69@users.noreply.github.com>
✅ Deploy Preview for kptdocs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
| content := *root | ||
| content.FootComment = "" | ||
| node.SetYNode(&yaml.Node{ | ||
| Kind: yaml.DocumentNode, | ||
| FootComment: root.FootComment, | ||
| Content: []*yaml.Node{&content}, | ||
| }) |
|
@Kulraj69 Can you address the comments, So that the maintainers can review this. |
|
Thanks for flagging this. I reproduced the document-header loss when a pass-through function is followed by a comment-stripping function. The private correction moves the header onto the document wrapper along with the footer. The runtime tests pass with the repository-local API replacement; the published API dependency fails to build before those tests, so this is not a default-build or CI pass. The branch has not been updated yet. |
Please rebase on main and address copilot comment |

When a pipeline has several mutators, kyaml's FunctionFilter restores a document's foot comment onto the bare resource root. On the next function call that root is serialized inside the ResourceList items sequence, and YAML decoding attaches the foot comment to the following resource, so each additional mutator duplicated comments across resources and files.
Re-wrap such roots in a document node after each function run so foot comments stay outside the items sequence.
Fixes #4211
Assisted-by: Devin:Claude