-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix deploy test conflict flake #5630
Conversation
[test] |
lgtm. @smarterclayton or @liggitt for approval. |
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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woopsie daisy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to use RetryOnConflict
135c494
to
f73f6f8
Compare
if config.LatestVersion != 1 { | ||
t.Fatalf("Generated deployment should have version 1: %#v", config) | ||
} | ||
glog.Infof("config(1): %#v", config) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
f73f6f8
to
3d05dbc
Compare
@smarterclayton cleaned up variables/scopes. |
I'd add you to the merge queue... but I don't think it will make a difference. |
Evaluated for origin test up to 3d05dbc |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6826/) |
Fix deploy test conflict flake
Retry update conflict errors during deploy trigger test.
Fixes #5612