Skip to content

return notfound errors w/o wrappering them#9763

Merged
openshift-bot merged 1 commit intoopenshift:masterfrom
bparees:instantiate_error_type
Jul 12, 2016
Merged

return notfound errors w/o wrappering them#9763
openshift-bot merged 1 commit intoopenshift:masterfrom
bparees:instantiate_error_type

Conversation

@bparees
Copy link
Contributor

@bparees bparees commented Jul 11, 2016

No description provided.

@bparees
Copy link
Contributor Author

bparees commented Jul 11, 2016

[test]

@bparees
Copy link
Contributor Author

bparees commented Jul 11, 2016

@smarterclayton ptal


newBuild, err := g.generateBuildFromConfig(ctx, bc, request.Revision, request.Binary)
if err != nil {
if errors.IsNotFound(err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the other API types should be ignored. generateBuildFromConfig is responsible for generating the correct API error type - if you want to transform it, transform it in generateBuildFromConfig. We should not be wrapping any error that comes out of gbfc unless it's not an API error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

@bparees bparees force-pushed the instantiate_error_type branch from 1cdaad3 to abc4b32 Compare July 11, 2016 03:24

newBuild, err := g.generateBuildFromConfig(ctx, bc, request.Revision, request.Binary)
if err != nil {
if oerrors.IsKnownAPIErrorType(err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct test is casting to APIStatus in the kube pkg/api/errors package - if the error implements that, we consider it already handled.

@bparees bparees force-pushed the instantiate_error_type branch from abc4b32 to 87a21e0 Compare July 11, 2016 21:13
@bparees
Copy link
Contributor Author

bparees commented Jul 11, 2016

@smarterclayton updated.

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 87a21e0

@smarterclayton
Copy link
Contributor

LGTM [merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jul 11, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6079/) (Image: devenv-rhel7_4569)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 87a21e0

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6079/)

@openshift-bot openshift-bot merged commit f46d624 into openshift:master Jul 12, 2016
@bparees bparees deleted the instantiate_error_type branch July 13, 2016 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants