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 notfound errors w/o wrappering them #9763

Merged
merged 1 commit into from
Jul 12, 2016

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

@@ -233,6 +233,9 @@ func (g *BuildGenerator) Instantiate(ctx kapi.Context, request *buildapi.BuildRe

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
@@ -233,6 +234,9 @@ func (g *BuildGenerator) Instantiate(ctx kapi.Context, request *buildapi.BuildRe

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