Skip to content

Conversation

@pohly
Copy link
Contributor

@pohly pohly commented Jul 16, 2025

The tests were defined in the "fieldpath" package, which prevented using typed.NewParser (import cycle!). Defining them in "fieldpath_test" allows that. To avoid changing all references to the package's exported symbols, "fieldpath_test.go" defines aliases.

typed.NewParser is more strict and finds a typo in the test schema.

Also, constructing a set with NewSet(MakePath(...)) was found to not yield the same structs as parsing a value with a schema, so now parser.Type(typeName).FromYAML().ToFieldSet is used instead.

@k8s-ci-robot k8s-ci-robot requested a review from apelisse July 16, 2025 16:59
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 16, 2025
@k8s-ci-robot k8s-ci-robot requested a review from yliaog July 16, 2025 16:59
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 16, 2025
The tests were defined in the "fieldpath" package, which prevented using
typed.NewParser (import cycle!). Defining them in "fieldpath_test" allows
that. To avoid changing all references to the package's exported symbols,
"fieldpath_test.go" defines aliases.

typed.NewParser is more strict and finds a typo in the test schema.

Also, constructing a set with NewSet(MakePath(...)) was found to not yield
the same structs as parsing a value with a schema, so now
parser.Type(typeName).FromYAML().ToFieldSet is used instead.
@pohly pohly force-pushed the fieldpath-test-enhancements branch from c3b5bf5 to 5f3bed2 Compare July 16, 2025 17:02
@pohly
Copy link
Contributor Author

pohly commented Jul 16, 2025

/assign @jpbetz
/cc @liggitt

@liggitt
Copy link
Contributor

liggitt commented Jul 16, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 16, 2025
@jpbetz
Copy link
Contributor

jpbetz commented Jul 16, 2025

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpbetz, pohly

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2025
@k8s-ci-robot k8s-ci-robot merged commit 6b415d5 into kubernetes-sigs:master Jul 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

4 participants