kustomize icon indicating copy to clipboard operation
kustomize copied to clipboard

Improve invalid node kind errors

Open KnVerey opened this issue 2 years ago • 9 comments

Also enhance this kind of error specifically in the namespace transformer, explaining to the user that it is probably a field spec issue. Also remove ignored field specs from that transformer's defaults, including two that are invalid in a way that would produce this message (but continuing to ignore the valid path).

@annasong20 was correct that it is the kyaml error package that is not working with errors.Is and errors.As. That is because it uses a very old version of its go-errors dependency, that didn't have go-1.13 style support. I think we are the reason k/k has this dep, and the diff to update all the way to latest is quite small in any case: https://github.com/go-errors/errors/compare/v1.0.1...v1.4.2.

/cc @natasha41575

KnVerey avatar Jul 28 '22 00:07 KnVerey

@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 avatar Jul 28 '22 02:07 k8s-ci-robot

/hold for rebase on https://github.com/kubernetes-sigs/kustomize/pull/4704 when it merges (unless we change our mind about the order)

KnVerey avatar Jul 28 '22 03:07 KnVerey

Deploy Preview for kubernetes-sigs-kustomize canceled.

Name Link
Latest commit ffdb1edc78b8b2f3463f7d2315417088c5319529
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kustomize/deploys/62e2deaa47440b000911e3a1

netlify[bot] avatar Jul 28 '22 19:07 netlify[bot]

This has been rebased, but it might be good to hold until after the next release in case the dep upgrade unexpectedly is in fact an issue for kubectl.

KnVerey avatar Jul 28 '22 19:07 KnVerey

/unhold

This is ready for a look

KnVerey avatar Aug 10 '22 19:08 KnVerey

Ah sorry I missed this PR

/lgtm /approve

I can retag if you need to rebase

natasha41575 avatar Aug 16 '22 16:08 natasha41575

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KnVerey, natasha41575

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:
  • ~~OWNERS~~ [KnVerey,natasha41575]

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 avatar Aug 16 '22 16:08 k8s-ci-robot

@natasha41575 I rebased and added two new commits: one making an improvement I couldn't do in #4754 because of the go-errors version, and another committing go.sum changes. PTAL.

KnVerey avatar Aug 16 '22 22:08 KnVerey

/lgtm

natasha41575 avatar Aug 25 '22 19:08 natasha41575