Skip to content

Conversation

inteon
Copy link
Member

@inteon inteon commented Apr 17, 2025

Continuation of #100

Switches from the 'yaml.v2' fork to the 'yaml.v3' fork. Tried to do this while maintaining backwards compatibility as much as possible.

Fixes some of the Yes = true and No = false confusion (see tests).

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: inteon
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Apr 17, 2025
@k8s-ci-robot k8s-ci-robot requested review from liggitt and thockin April 17, 2025 21:56
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 17, 2025
@inteon inteon mentioned this pull request Apr 17, 2025
// the go-yaml library uses to convert float to string when
// Marshaling.
s := strconv.FormatFloat(typedKey, 'g', -1, 32)
s := strconv.FormatFloat(typedKey, 'g', -1, 64)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Will this result in visibly different output? Any changes have the potential to break consumers so we need to be extremely careful about changes that break byte-for-byte round-tripping" - @liggitt

#100 (comment)

Copy link
Member Author

@inteon inteon Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaik, this should just result in float64 values also being supported.
I added a few additional test cases for float marshalling and unmarshalling.

@dims
Copy link
Member

dims commented Jun 18, 2025

fyi, once #133 lands, you will need to revisit this PR.

@liggitt
Copy link

liggitt commented Jun 19, 2025

fyi, once #133 lands, you will need to revisit this PR.

(even once reworked on top of that, it's still not clear to me that the things this changes / breaks will be feasible to overcome and roll out ... the unknowns about switching to v3 are super time-consuming to chase down definitively ... I appreciate the continued effort here, it's just really difficult to prioritize almost unbounded due diligence work to review / approve this)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 25, 2025
@k8s-ci-robot
Copy link

PR needs rebase.

Instructions 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.

@ingydotnet
Copy link

There are current (albeit tentative) plans to make the v4 API configurable to a very granular level.

If we can get the v4 API to work exactly the same way given a v2 configuration, then I think it will be possible for users to add very specific new v4 features to their configs.
(Rather than needing to buy into every change that v3 made from v2).

@ingydotnet
Copy link

I'll mention this PR in the yaml/go-yaml v4 config PR when it lands, so people here can be aware and weigh in...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants