-
Notifications
You must be signed in to change notification settings - Fork 9
e2e: use Eventually for IP assertions to avoid race condition #129
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
e2e: use Eventually for IP assertions to avoid race condition #129
Conversation
50c3913 to
d23b2b3
Compare
maiqueb
left a comment
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.
just a thought
d23b2b3 to
043b831
Compare
|
Seen again here |
I worry that patching the immediate problem with this fix is just introducing tech debt that I worry will never be tackled. So yes, you will no longer be nagged. But the test just got harder to follow and understand. I would prefer if we did this properly. |
Can you elaborate? is using eventually in order for the status to eventually consist the data we want - not the proper solution? |
I'm speaking about this, which you actually +1ed. |
ah, np! Why didn't you say so earlier :) |
Replace separate VMI readiness and IP assignment checks with the composite BeReadyWithIPsAtInterface matcher. This makes the test intent clearer and checks both conditions atomically. Also eliminates race condition, as VMI Ready state doesn't guarantee IPs are populated in status.interfaces. Assisted-by: Claude <[email protected]> Signed-off-by: Ram Lavi <[email protected]>
043b831 to
f6c86f7
Compare
maiqueb
left a comment
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.
Nice !
I really favor this approach to the previous one; thanks for complying.
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maiqueb The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Consider writing release notes for this bug. @RamLavi |
There is no bug. We just assumed that vm ready ==> vm. Status.ips is there. That is simply not the case. |
|
@maiqueb can you issue a release on main branch so that we could consume the tests on cnao main branch? |
What this PR does / why we need it:
In the e2e tests there is a hidden assumption that once the VMI is in Ready=true condition then the status.interface.ipAddress is set. This is not guaranteed, causing a flake.
This PR adds Eventually with 30s timeout to wait for IPs to appear.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: