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

return original error, unless error is *meta.NoKindMatchError #73608

Conversation

juanvallejo
Copy link
Contributor

/kind cleanup
/sig cli

Makes it easier to debug errors associated with discovery. If we're unable to obtain a rest mapping for a resource due to miscellaneous discovery errors, that error is now printed out. For errors pertaining to non-existent resources, the original error error: the server doesn't have a resource type "..." is still returned.

NONE

cc @deads2k @smarterclayton @soltysh

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/cli Categorizes an issue or PR as relevant to SIG CLI. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 31, 2019
@smarterclayton
Copy link
Contributor

Can you add a test that reasonably demonstrates this? (unit is fine) so it doesn't regress.

@juanvallejo
Copy link
Contributor Author

@smarterclayton sure, will add test

@juanvallejo juanvallejo force-pushed the jvallejo/improve-discovery-restmapper-errors branch from 31aa409 to bc381fb Compare January 31, 2019 22:24
@juanvallejo
Copy link
Contributor Author

@smarterclayton thanks, added a test for this codepath in the resource builder

@smarterclayton
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: juanvallejo, smarterclayton

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit a31be28 into kubernetes:master Feb 1, 2019
@juanvallejo juanvallejo deleted the jvallejo/improve-discovery-restmapper-errors branch February 1, 2019 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants