-
Notifications
You must be signed in to change notification settings - Fork 1k
e2e: enhance application failover testing #6845
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
Conversation
Summary of ChangesHello @zhzhuang-zju, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the reliability of end-to-end application failover tests. It specifically targets an issue where the timing of failover events, particularly when Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request addresses a flaky e2e test for application failover. The change correctly moves the start time measurement (beginTime = time.Now()) to before the creation of the OverridePolicy. This ensures that the time taken for the policy creation API call is included in the total failover duration measurement, making the test assertion more robust and less prone to timing-related failures. The change is logical and directly addresses the problem described. The code looks good.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6845 +/- ##
=======================================
Coverage 45.64% 45.65%
=======================================
Files 692 692
Lines 57580 57580
=======================================
+ Hits 26283 26286 +3
+ Misses 29658 29656 -2
+ Partials 1639 1638 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Isn't adding some logs convenient for later troubleshooting when encountering problems? |
7818d05 to
0b3996f
Compare
Good idea! done~ |
Signed-off-by: zhzhuang-zju <[email protected]>
0b3996f to
9e74488
Compare
XiShanYongYe-Chang
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.
Let's merge it first and see if the occasional errors still occur.
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang 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 |
@XiShanYongYe-Chang Should we backport this to previous releases? |
What type of PR is this?
/kind flake
What this PR does / why we need it:
When
GracePeriodSecondsis configured by the user, if an application becomes unhealthy and triggers an application failover, it will wait forGracePeriodSecondsbefore deleting the unhealthy replicas in that cluster. In e2e tests, we cannot accurately determine the total time for the entire application failover, so we can only make a relative comparison. The current start time of the application failover is not precise enough, leading to occasional failures in judgment.Which issue(s) this PR fixes:
Part of #6841
Special notes for your reviewer:
Does this PR introduce a user-facing change?: