-
Notifications
You must be signed in to change notification settings - Fork 94
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: put the update into a eventually to avoid flaky error. #557
🐛 fix: put the update into a eventually to avoid flaky error. #557
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #557 +/- ##
=======================================
Coverage 62.41% 62.41%
=======================================
Files 177 177
Lines 13857 13857
=======================================
Hits 8649 8649
Misses 4339 4339
Partials 869 869
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
_, err = clusterClient.ClusterV1().ManagedClusters().Update(context.TODO(), updatedCluster, v1.UpdateOptions{}) | ||
gomega.Expect(err).NotTo(gomega.HaveOccurred()) | ||
gomega.Eventually(func() error { | ||
_, err = clusterClient.ClusterV1().ManagedClusters().Update(context.TODO(), updatedCluster, v1.UpdateOptions{}) |
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.
I do not think it works, you need to also call get in eventually.
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.
You're right, updated.
Signed-off-by: xuezhaojun <zxue@redhat.com>
b6d95bd
to
e01f5e8
Compare
/assign @qiujian16 |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, xuezhaojun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5617fec
into
open-cluster-management-io:main
Summary
Sometimes the update operation need another try.
To avoid errors like the following: