-
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
Internal go-yaml/yaml fork #4013
Conversation
Skipping CI for Draft Pull Request. |
@KnVerey: This PR has multiple commits, and the default merge method is: merge. 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KnVerey 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 |
kyaml/internal/forked/README.md
Outdated
|
||
## go-yaml/yaml | ||
|
||
This code is used extensively by kyaml. It is a copy of upstream at a particular revision that kubectl is using, with [a change we need](https://github.com/go-yaml/yaml/pull/746) cherry-picked on top. For context on why the cherry-pick to an old revision is necessary, see https://github.com/kubernetes-sigs/kustomize/issues/3946. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: update this last sentence if we use this--it's not to an old revision anymore, and the pull request reference is wrong
/test kustomize-presubmit-master |
1 similar comment
/test kustomize-presubmit-master |
/lgtm |
@@ -33,7 +43,10 @@ var Unmarshal = yaml.Unmarshal | |||
var NewDecoder = yaml.NewDecoder | |||
var NewEncoder = func(w io.Writer) *yaml.Encoder { | |||
e := yaml.NewEncoder(w) | |||
e.SetIndent(2) | |||
e.SetIndent(indent) | |||
if sequenceIndentationStyle == CompactSequenceStyle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KnVerey @natasha41575 What is the reason behind not making this configurable ? Will it be exposed in the future ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kpt doesn't hold strong opinion about seq indentation, but we want minimum disruption to the users. The plan is to identify the existing indentation of package resources and retain it, for which, we need this to be configurable. Let me know your thoughts.
As of now, kpt can't upgrade to latest kyaml v0.11.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@natasha41575 here's a script we can use to make an internal copy of yaml.v3 with your changes applied. It pulls down the latest version from upstream and then applies your commit instead of pulling your branch directly. That's not strictly necessary now, since your changes are based on the same commit k/k is using. But if we need to merge this, we could end up in a situation where your changes need to be rebased to a version that is ahead of k/k (as was the case when Jeff was working on his version of the changes).
To use this:
CHERRY_PICK_SHA
if necessary (e.g. if the go-yaml PR changes)ALLOW_MODULE_SPAN