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

Key error messages are not available in some condition #2279

Closed
yujunz opened this issue Mar 15, 2020 · 7 comments · Fixed by #3192
Closed

Key error messages are not available in some condition #2279

yujunz opened this issue Mar 15, 2020 · 7 comments · Fixed by #3192
Assignees
Labels
area/api issues for api module kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@yujunz
Copy link
Member

yujunz commented Mar 15, 2020

Kustomize may encounter multiple errors during build, but sometimes only the last one is displayed. This makes it hard for user find out the root cause.

For example, given the error message below

Error: accumulating resources: accumulateFile "accumulating resources from 'https://github.com/kustless/kustomize-examples/archive/master.zip//kustomize-example-master': YAML file [https://github.com/kustless/kustomize-examples/archive/master.zip//kustomize-example-master] encounters a format error.\nerror converting YAML to JSON: yaml: line 134: mapping values are not allowed in this context\n", loader.New "evalsymlink failure on '/private/var/folders/k9/wwyq7x_n5jvbb68q7c0mbblm0000gn/T/kustomize-418159327/archive/master.zip/kustomize-example-master' : lstat /private/var/folders/k9/wwyq7x_n5jvbb68q7c0mbblm0000gn/T/kustomize-418159327/archive: no such file or directory"

The user has no idea about the actual error subdir "kustomize-example-master" not found returned from remote getter.

The limitation is cause by newLoaderAtConfirmedDir, which never returns an error. The error detection is delayed to later stage, where the previous errors (in git clone or remote get) are no longer available.

We need a better mechanism to show the error stack to make kustomize more user friendly.

@memo42
Copy link

memo42 commented May 5, 2020

please fix this.

For now is there any way to get to those error-messages?

@aimbot31
Copy link

Still a problem

@theophilegervet
Copy link

This is really hard to debug indeed... Any advice for how to troubleshoot this?

Running make apply as part of this guide:
https://www.kubeflow.org/docs/gke/deploy/deploy-cli/#deploy-kubeflow

and getting the following:

Error: accumulating resources: accumulateFile "accumulating resources from '../../../upstream/manifests/stacks/gcp': read /Users/thophile/relyance-kf/upstream/manifests/stacks/gcp: is a directory", accumulateDirector: "recursed accumulation of path '/Users/thophile/relyance-kf/upstream/manifests/stacks/gcp': accumulating resources: accumulateFile \"accumulating resources from '../../pipeline/installs/multi-user': read /Users/thophile/relyance-kf/upstream/manifests/pipeline/installs/multi-user: is a directory\", accumulateDirector: \"recursed accumulation of path '/Users/thophile/relyance-kf/upstream/manifests/pipeline/installs/multi-user': accumulating resources: accumulateFile \\\"accumulating resources from 'api-service': read /Users/thophile/relyance-kf/upstream/manifests/pipeline/installs/multi-user/api-service: is a directory\\\", accumulateDirector: \\\"couldn't make target for path '/Users/thophile/relyance-kf/upstream/manifests/pipeline/installs/multi-user/api-service': json: unknown field \\\\\\\"env\\\\\\\"\\\"\""

@win5do
Copy link

win5do commented Aug 26, 2020

I solved it by add option --load_restrictor none.

kustomize build --load_restrictor none  </your/path>

@pierreozoux
Copy link
Contributor

pierreozoux commented Aug 26, 2020

Same error for me even with --load_restrictor none .

@yujunz
Copy link
Member Author

yujunz commented Aug 27, 2020

Consider using https://github.com/hashicorp/go-multierror to aggregate errors.

@Shell32-Natsu
Copy link
Contributor

/assign

@Shell32-Natsu Shell32-Natsu added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Oct 15, 2020
@Shell32-Natsu Shell32-Natsu added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Oct 22, 2020
@Shell32-Natsu Shell32-Natsu added area/api issues for api module kind/feature Categorizes issue or PR as related to a new feature. labels Nov 3, 2020
@Shell32-Natsu Shell32-Natsu added this to the v3.8.7 milestone Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api issues for api module kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants