-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking whitespace changes in go-yaml upgrade #3946
Comments
/priority important-soon @Shell32-Natsu I couldn't find an issue for this outside your PR, but I believe you were working on this. Are you still? |
This issue will probably get some interest/questions down the road, so adding some history. In a commit on 2020-May-04, marshaling code in gopkg.in/yaml.v3 changed indenting from
to
Kustomize (via kyaml) depends on gopkg.in/yaml.v3. Hundreds of kustomize tests assume the older more compact behavior, where the hyphens don't 'consume' an indent. These tests are intentionally brittle in this fashion as downstream consumers of the YAML also compare differences in marhsalled YAML and don't want surprises. The modules in this repo (kyaml and api) use Meanwhile,
Options
edit: tune up comments about kubectl behavior after investigating how the k8s repo used v2 vs v3 |
The upgrade of k8s to yaml.v3 circa 2020-Jun-15 happened in kubernetes/kubernetes#100490 on 2021 Apr 20 - just a few weeks ago. Were the dozen or so later commits to yaml.v3 that this PR could have grabbed intentionally kept out? Meaning step 1 above wouldn't make it past code rev? |
Some of the issues in various repos related to this:
|
@monopole for Flux users, I think it's best to autodetected and keep the original indentation, unlike go fmt, Kubernetes users are not accustom to strict formatting since kubectl does no such enforcement. |
After further thought, we're exploring both options 2 and 3 @monopole mentioned above. Option 1 is likely a no-go even if we were to cut a new major version of Kustomize, because of the issue of inconsistency with kubectl, which is definitely not able to change. |
The PR for option 3 is go-yaml/yaml#746 |
/cc @phanimarupaka |
Closing this in favor of #4033, which includes a summary of the decision made and what we need to do moving forward. |
* Add openvino with GPU support * Update display name of gpu * Use one image for both OOTB
As discovered in #3789, upgrading go-yaml causes whitespace changes in the output. This may be seriously disruptive to some users, as committing build results is a common practice for both testing and GitOps workflows.
We need to either:
A) Prevent the whitespace changes. Presumably this involves kyaml interfering with the marshalling process. Related to #3559
B) Release the go-yaml bump in a major version bump (i.e. kustomize 5.0).
This issue is urgent because although we can pin the version used by the standalone kustomize binary, kubernetes/kubernetes has already upgraded to a more recent version. This presumably means the next kubectl release will include the breaking changes as of right now (TBC).
The text was updated successfully, but these errors were encountered: