Skip to content
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

Merged
merged 15 commits into from
Jun 30, 2021
Merged

Conversation

KnVerey
Copy link
Contributor

@KnVerey KnVerey commented Jun 23, 2021

@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:

ALLOW_MODULE_SPAN

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot
Copy link
Contributor

@KnVerey: This PR has multiple commits, and the default merge method is: merge.
You can request commits to be squashed using the label: tide/merge-method-squash

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.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /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 Jun 23, 2021
@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 Jun 23, 2021

## 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.
Copy link
Contributor Author

@KnVerey KnVerey Jun 23, 2021

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

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 29, 2021
@KnVerey
Copy link
Contributor Author

KnVerey commented Jun 29, 2021

/test kustomize-presubmit-master

1 similar comment
@KnVerey
Copy link
Contributor Author

KnVerey commented Jun 29, 2021

/test kustomize-presubmit-master

@KnVerey KnVerey marked this pull request as ready for review June 30, 2021 17:23
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 30, 2021
@KnVerey KnVerey changed the title Backup plan: internal go-yaml/yaml fork Internal go-yaml/yaml fork Jun 30, 2021
@natasha41575
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2021
@natasha41575 natasha41575 merged commit 5427ab7 into kubernetes-sigs:master Jun 30, 2021
@@ -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 {
Copy link
Contributor

@phanimarupaka phanimarupaka Jun 30, 2021

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 ?

Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I filed #4029. @KnVerey PTAL when you can

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants