-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
add options to disable unique keys #4096
Conversation
@xyz-li: 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. |
Welcome @xyz-li! |
Hi @xyz-li. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @natasha41575 |
I am curious if we can make this PR against goyaml first. We don't want to diverge too much from upstream. |
+1, we want to diverge as little as possible. We don't want to run into a situation where we take this change in kustomize and the go-yaml maintainer decides against accepting the change upstream. I'm also hesitant to expose a new flag for kustomize build, as that introduces build time side effects. Rather than make it configurable, it might be better to firmly take a stance on whether or not we allow unique keys. I see you've already made a PR upstream go-yaml/yaml#752. Thanks for that, we will have to wait to see what the go-yaml maintainer says. |
/hold until go-yaml/yaml#751 is closed. |
@xyz-li: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Signed-off-by: LiHui <andrewli@yunify.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: xyz-li 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 |
I agree with @natasha41575 that we cannot accept any changes to the internal fork that have not been agreed to upstream, and even then we should be extremely conservative about merging such changes in vs. waiting to remove the fork in favour of a new release that includes them. FWIW go-yaml.v3 is a yaml 1.2 implementation, and the maintainer has correctly pointed out that duplicate keys are not valid per that spec. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/close |
@xyz-li: Closed this PR. In response to this:
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. |
@natasha41575 @KnVerey would you reconsider your position. The PR by @xyz-li has been sitting there since June with no comment or review. Currently I have a scenario I am facing with |
Even if we were willing to diverge from the |
Also the error you've cited in the other issue:
Are you sure that error is coming from kustomize? It sounds more like an error that kubernetes or kubectl is throwing, because the kubernetes specification defines the key for a port entry to be [containerPort, protocol], and expects this to be unique. This is not the same thing as a YAML key and this PR won't fix your issue. If you just run |
@natasha41575 do you think it's okay to port this changes to https://github.com/kubernetes-sigs/yaml/blob/master/goyaml.v3/yaml.go? This is still a very much needed change and I'll be happy to take continue from where @xyz-li has started |
@natasha41575 I've opened a follow PR for this on go-yaml. I'll create the next PR to implement this once that is merged. |
Upgrading to go-yaml.v3 causes a kustomize returns as error when there are duplicate keys in resources.
I think it will be better to provide an option to disable uniqueKeys.
go-yaml/yaml#751
#3480