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

treat notfound and badrequest instantiate errors as fatal #9828

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

bparees
Copy link
Contributor

@bparees bparees commented Jul 13, 2016

fixes #9827

@@ -79,7 +79,7 @@ func (c *BuildConfigController) HandleBuildConfig(bc *buildapi.BuildConfig) erro
if kerrors.IsConflict(err) {
instantiateErr = fmt.Errorf("unable to instantiate Build for BuildConfig %s/%s due to a conflicting update: %v", bc.Namespace, bc.Name, err)
utilruntime.HandleError(instantiateErr)
} else if buildgenerator.IsFatal(err) {
} else if buildgenerator.IsFatal(err) || kerrors.IsNotFound(err) || kerrors.IsBadRequest(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What constitutes bad request here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

And the generateBuildConfig and updateBuildConfig methods. Are all those
fatal?

On Wed, Jul 13, 2016 at 5:21 PM, Ben Parees [email protected]
wrote:

In pkg/build/controller/config_controller.go
#9828 (comment):

@@ -79,7 +79,7 @@ func (c *BuildConfigController) HandleBuildConfig(bc *buildapi.BuildConfig) erro
if kerrors.IsConflict(err) {
instantiateErr = fmt.Errorf("unable to instantiate Build for BuildConfig %s/%s due to a conflicting update: %v", bc.Namespace, bc.Name, err)
utilruntime.HandleError(instantiateErr)

  •   } else if buildgenerator.IsFatal(err) {
    
  •   } else if buildgenerator.IsFatal(err) || kerrors.IsNotFound(err) || kerrors.IsBadRequest(err) {
    

whatever the instantiate api says is a bad request, eg:

https://github.com/openshift/origin/blob/master/pkg/build/generator/generator.go#L222-L226


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/openshift/origin/pull/9828/files/64a7ffb0efa0dc6bf954fe8e43d249281a80c7ab#r70711225,
or mute the thread
https://github.com/notifications/unsubscribe/ABG_p6V1MG5OvuArozXzYhdT5cpD0wA6ks5qVVbQgaJpZM4JL2_i
.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

those methods don't return a badrequest, but if they did i would assume so... if a request is bad, is there a reason to think retrying it will help?

if we're returning "badrequest" on something that isn't actually a bad request, then we're doing it wrong, i think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(they don't directly return one. of course an api call within them could, but again i'd argue that's a legit fatal error then, unless k8s is returning bad request when it should not)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm just asking if you're confident we're not doing it wrong.

On Wed, Jul 13, 2016 at 5:31 PM, Ben Parees [email protected]
wrote:

In pkg/build/controller/config_controller.go
#9828 (comment):

@@ -79,7 +79,7 @@ func (c *BuildConfigController) HandleBuildConfig(bc *buildapi.BuildConfig) erro
if kerrors.IsConflict(err) {
instantiateErr = fmt.Errorf("unable to instantiate Build for BuildConfig %s/%s due to a conflicting update: %v", bc.Namespace, bc.Name, err)
utilruntime.HandleError(instantiateErr)

  •   } else if buildgenerator.IsFatal(err) {
    
  •   } else if buildgenerator.IsFatal(err) || kerrors.IsNotFound(err) || kerrors.IsBadRequest(err) {
    

those methods don't return a badrequest, but if they did i would assume
so... if a request is bad, is there a reason to think retrying it will help?

if we're returning "badrequest" on something that isn't actually a bad
request, then we're doing it wrong, i think.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/openshift/origin/pull/9828/files/64a7ffb0efa0dc6bf954fe8e43d249281a80c7ab#r70712740,
or mute the thread
https://github.com/notifications/unsubscribe/ABG_p0elqKqKUHULUd0Fey3_d5W2cbi9ks5qVVkYgaJpZM4JL2_i
.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm confident the openshift bits aren't, i can't speak to upstream.

@smarterclayton
Copy link
Contributor

Lgtm [merge]

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 64a7ffb

@openshift-bot
Copy link
Contributor

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

@bparees
Copy link
Contributor Author

bparees commented Jul 14, 2016

flake #8701
[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jul 14, 2016

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

@bparees
Copy link
Contributor Author

bparees commented Jul 14, 2016

flake #9775 (i think)
[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 64a7ffb

@openshift-bot openshift-bot merged commit 7fad2e0 into openshift:master Jul 14, 2016
@bparees bparees deleted the build_controller_fatal branch July 20, 2016 18:50
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.

Build config controller doesn't forget a build
3 participants