-
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
Replace github/pkg/errors with sigs.k8s.io/kustomize/kyaml/errors #4970
Replace github/pkg/errors with sigs.k8s.io/kustomize/kyaml/errors #4970
Conversation
Skipping CI for Draft Pull Request. |
@@ -72,7 +72,7 @@ func (p *plugin) Transform(m resmap.ResMap) (err error) { | |||
p.applyDefaults() | |||
err = p.validate() | |||
if err != nil { | |||
return errors.WithStack(err) |
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.
Could not get stack output using this locally. It was recently introduced and not release so removing the with stack functionality for now.
@@ -252,7 +252,7 @@ func (p *HelmChartInflationGeneratorPlugin) Generate() (rm resmap.ResMap, err er | |||
// try to remove the contents before first "---" because | |||
// helm may produce messages to stdout before it | |||
stdoutStr := string(stdout) | |||
if idx := strings.Index(stdoutStr, "---"); idx != -1 { | |||
if idx := strings.Index(stdoutStr, "\n---\n"); idx != -1 { |
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.
accidental change?
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.
This one I am not sure about. It's a generated file - might I have changed something elsewhere causing this?
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.
Yes, this one is generated from plugin/builtin/helmchart...
. The change is gone for that file, so I think you need to re-run make generate-kustomize-builtin-plugins
. It's not good that CI didn't catch the need to do that! Filed #4977
5964385
to
2f5a114
Compare
2f5a114
to
18e9d5d
Compare
18e9d5d
to
c12b803
Compare
c12b803
to
034e127
Compare
034e127
to
0c37de6
Compare
Hi @cailynse. I found remain lines in generated go files like here. |
@cailynse: 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. |
beac9b9
to
d908b27
Compare
/label tide/merge-method-squash |
@@ -28,6 +27,7 @@ require ( | |||
github.com/kr/pretty v0.2.1 // indirect | |||
github.com/mailru/easyjson v0.7.7 // indirect | |||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect | |||
github.com/pkg/errors v0.9.1 // indirect |
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.
This is coming from github.com/evanphx/json-patch, which k/k itself also depends on and has not been updated to remove the errors dependency: https://github.com/kubernetes/kubernetes/blob/4802d7bb62c2623be8e4f940f6b5c1fcddd6c744/go.mod#L34
d908b27
to
ec55d0c
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cailynse, 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 |
Addresses: #4964
Replace
github/pkg/errors
withsigs.k8s.io/kustomize/kyaml/errors
errors.Wrap -> errors.WrapPrefixf
errors.Wrapf -> errors.WrapPrefixf
errors.New -> errors.Errorf
errors.Cause -> functions updated to only check errors.Is (use case was only to check if an error is a given type)
errors.WithStack -> removed because it was not impacting output (will investigate outside of this PR)