fix: preserve scalar source tag during merge#6174
Conversation
|
This PR has multiple commits, and the default merge method is: merge. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @notandruu! |
|
Hi @notandruu. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: notandruu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@koba1t could you take a look when you have a moment? Happy to make any changes needed. |
|
You have created three PRs in rapid succession, do you understand that this type of behavior is considered "AI slop PR"? It is also questionable whether the PR was created in accordance with the official AI guidelines. |
|
Sorry about that I opened two PRs within the same session which understand looks like spam, and I didn't disclose AI assistance in the descriptions which I'm adding now. These each fix separate bugs I ran into and tested before submitting. |
Fixes #6140
This PR was written in part with the assistance of generative AI. I have reviewed and tested each change.
/kind bug
Strategic merge scalar replacement returns the patch scalar from merge2.VisitScalar, but map writeback goes through FieldSetter which preserves the existing destination style. So replacing a quoted scalar like '6%' with an integer 3 kept the old quoted style and emitted '3'. Fix: update the destination node with the origin node before returning so the patch scalar's tag and style are carried through.