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

Fix deploy test conflict flake #5630

Merged

Conversation

ironcladlou
Copy link
Contributor

Retry update conflict errors during deploy trigger test.

Fixes #5612

@ironcladlou
Copy link
Contributor Author

[test]

@deads2k
Copy link
Contributor

deads2k commented Nov 3, 2015

lgtm.

@smarterclayton or @liggitt for approval.

@0xmichalis
Copy link
Contributor

LGTM

new, err := openshift.Client.DeploymentConfigs(testutil.Namespace()).Update(config)
if err != nil {
t.Fatalf("Couldn't create updated DeploymentConfig: %v %#v", err, config)
retryErr := wait.ExponentialBackoff(wait.Backoff{Steps: maxUpdateRetries}, func() (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is exactly the case where you should have used retry.OnConflict

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woopsie daisy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched to use RetryOnConflict

if config.LatestVersion != 1 {
t.Fatalf("Generated deployment should have version 1: %#v", config)
}
glog.Infof("config(1): %#v", config)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be log.Printf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, converted those and removed glog dependency

Retry update conflict errors during deploy trigger test.
@ironcladlou
Copy link
Contributor Author

@smarterclayton cleaned up variables/scopes.

@smarterclayton
Copy link
Contributor

I'd add you to the merge queue... but I don't think it will make a difference.

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 3d05dbc

@openshift-bot
Copy link
Contributor

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

smarterclayton added a commit that referenced this pull request Nov 4, 2015
@smarterclayton smarterclayton merged commit 601476a into openshift:master Nov 4, 2015
@smarterclayton smarterclayton added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 4, 2015
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants