Open sharpyy opened 1 year ago
This issue is currently awaiting triage.
SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted
label.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
I ran into the same problem and have been digging into the code to see how best to fix it. The code around loading resources is a bit of a mess and it doesn't look like it's going to be an easy fix.
The problem comes from this section of the code:
My interpretation of this logic is:
GET
on this URL and it stores any errors in errF
GET
was unsuccessful:err
errF
relates to invalid YAML then it returns only that error message and drops the error message relating to the git fetch in err
errF
is anything else then it returns only git fetch error message in err
The problem here is that the HTTP GET
failed returned invalid YAML (because it's probably returning a webpage from a host like GitHub) so when the intended git fetch
also fails it doesn't show the real error message.
All of the problems seem to come down to trying to load resources by optimistically fetching both the HTTP content and trying to fetch it with git. That may kind of work most of the time for the happy path, but what do you do if both of these fail?
When the user specified a resource starting with https://
did they intend for that to be an HTTP GET
or a git fetch
? Which error message should you present to the user to help them debug the problem?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
Eschewed features
What would you like to have added?
Currently, kustomize build running with github remote sources is not providing clear information when the git commands fails or did not get the expected content. We end up with error message like this one: MalformedYAMLError: yaml: line 30: mapping values are not allowed in this context in File which are not easy to understand. I would also suggest adding some retry mecanism depending on the type of error we get from git.
Why is this needed?
Having proper git command handling for all types of failures will help end user to troubleshoot issues.
Can you accomplish the motivating task without this feature, and if so, how?
We could probably enable git debugging locally but those logs can be huge and would collect all the git commands on the system. not just the one from kustomize build.
What other solutions have you considered?
N/A
Anything else we should know?
N/A
Feature ownership