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

deploy: retry in conflicts in instantiate #14902

Merged
merged 1 commit into from Jun 28, 2017

Conversation

mfojtik
Copy link
Member

@mfojtik mfojtik commented Jun 27, 2017

This will retry on conflicts for instantiate. Should cleanup a master log with failed instantiate calls and relax the generictrigger controller doing retries.

@mfojtik mfojtik requested a review from 0xmichalis June 27, 2017 09:12
@mfojtik
Copy link
Member Author

mfojtik commented Jun 27, 2017

@Kargakis seems this works :-)

@@ -102,6 +102,8 @@ func (r *REST) Create(ctx apirequest.Context, obj runtime.Object) (runtime.Objec
return nil, err
}

// Do unconditional update here to guarantee it always succeed.
config.ResourceVersion = ""
updated, _, err := r.store.Update(ctx, config.Name, rest.DefaultUpdatedObjectInfo(config, kapi.Scheme))
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like the entire method could be done in a RetryOnConflict block. The end user wouldn't know that you're retrying for them, but the conditional check in the code would re-run so that changes that affect the branching path in here would be reflected.

@mfojtik mfojtik force-pushed the deploy-unconditional-update branch from 50c1aad to 5a40c8c Compare June 28, 2017 13:12
@mfojtik mfojtik changed the title deploy: do unconditional update in instantiate deploy: retry in conflicts in instantiate Jun 28, 2017
@mfojtik
Copy link
Member Author

mfojtik commented Jun 28, 2017

fixes: #13105

@@ -51,58 +52,63 @@ func (r *REST) Create(ctx apirequest.Context, obj runtime.Object) (runtime.Objec
if !ok {
return nil, errors.NewInternalError(fmt.Errorf("wrong object passed for requesting a new rollout: %#v", obj))
}
var updated runtime.Object
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: rename to ret or some such? Sometimes this is a status object.

@deads2k
Copy link
Contributor

deads2k commented Jun 28, 2017

nit, lgtm otherwise.

@mfojtik mfojtik force-pushed the deploy-unconditional-update branch from 5a40c8c to 486977b Compare June 28, 2017 13:19
@tnozicka tnozicka self-requested a review June 28, 2017 13:33
Copy link
Contributor

@tnozicka tnozicka left a comment

Choose a reason for hiding this comment

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

lgtm

@mfojtik
Copy link
Member Author

mfojtik commented Jun 28, 2017

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 28, 2017

continuous-integration/openshift-jenkins/merge Waiting: You are in the build queue at position: 13

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 486977b

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@deads2k
Copy link
Contributor

deads2k commented Jun 28, 2017

#14043

@deads2k
Copy link
Contributor

deads2k commented Jun 28, 2017

re[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 486977b

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2764/) (Base Commit: 478cfe2) (PR Branch Commit: 486977b)

@deads2k
Copy link
Contributor

deads2k commented Jun 28, 2017

green on head of master, no conflicts with the top of th queue.

@deads2k deads2k merged commit 1a96817 into openshift:master Jun 28, 2017
@smarterclayton
Copy link
Contributor

This is the last thing that changed instantiate behavior and now instantiate is consistently failing.

@smarterclayton
Copy link
Contributor

@smarterclayton
Copy link
Contributor

{buildconfig-controller } BuildConfigInstantiateFailed: gave up on Build for BuildConfig extended-test-new-app-p62h3-h1gl9/a234567890123456789012345678901234567890123456789012345678 (0) due to fatal error: the LastVersion(1) on build config extended-test-new-app-p62h3-h1gl9/a234567890123456789012345678901234567890123456789012345678 does not match the build request LastVersion(0)
Jun 28 14:47:37.523: INFO: At 2017-06-28 14:46:08 -0400 EDT - event for a234567890123456789012345678901234567890123456789012345678-1-

@smarterclayton
Copy link
Contributor

How is last version wrong?

@deads2k
Copy link
Contributor

deads2k commented Jun 29, 2017

deploy instantiate is wired up to builconfiginstantiate somehow?

@0xmichalis
Copy link
Contributor

deploy instantiate is wired up to builconfiginstantiate somehow?

No. cc: @bparees

@mfojtik
Copy link
Member Author

mfojtik commented Jun 29, 2017

@smarterclayton yeah instantiate here has no relation to build instantiation.

@bparees
Copy link
Contributor

bparees commented Jun 29, 2017

the instantiate failure is disturbing but it looks like the build (a build) ultimately did run successfully. we're deep into an investigation on why that test is failing (the ultimately failure reason was that the deployment failed) already, so one way or another we should get to the bottom of it.

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.

None yet

7 participants