-
Notifications
You must be signed in to change notification settings - Fork 703
fix: zone-aware-routing e2e falkiness #6152
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
618a0ee
NamespacesMustBeReady after GatewayAndHTTPRoutesMustBeAccepted
jukie 65118ed
lint
jukie 0d4adb9
Merge branch 'main' into zone-aware-routing-e2e-fix
jukie a6c3f5f
trigger tests
jukie c5503ff
Merge branch 'main' into zone-aware-routing-e2e-fix
jukie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
@zhaohuabing @zirain I narrowed this down to being a race condition if
NamespacesMustBeReady()executes prior toGatewayAndHTTPRoutesMustBeAccepted()and that's what was changed with the refactor.The manifest apply action happens before test execution but the client cache seems to still be outdated and as a result the list actions in
NamespacesMustBeReady()are empty and the intended wait action never happens.I was able to reproduce the failure locally ~50% of the time but by moving
NamespacesMustBeReady()intorunWeightedBackendTest()afterGatewayAndHTTPRoutesMustBeAccepted()execution it consistently suceeds.Uh oh!
There was an error while loading. Please reload this page.
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.
BTY, can you explain more about this?
NamespacesMustBeReady()make sure that all the pods in the namespace should be ready, it should be more strict thanGatewayAndHTTPRoutesMustBeAccepted(), why move it after solve this?Need more time to refresh the pod list? if so, prefer to bring back
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 don't have any real proof about the issue being client cache but that's a theory.
I suspect that by first calling
GatewayAndHTTPRoutesMustBeAccepted()that implicitly ensures the proxy pods are also up and running. In the case of zone aware routing tests, this is needed due to the affinity rules.It seems useful that for all tests we'd want to wait for all test resources to be completely ready before proceeding. Limiting to just Pods allows for other edge cases in the future so a comprehensive function like
NamespacesMustBeReady()(tbf it currently just checks gateways and pods but could be expanded further) would be my preference but if you'd like to instead bring backWaitForPods()specifically for zone-aware-routing I can make that update.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 using
same-namespacegateway, so it's always there.Let us test with, we can bring
WaitForPods()back if needed in the future.