[e2e] Increase Kubernetes connection timeouts - #1570
Conversation
This patch increases the connection and request timeouts used in the E2E tests when communicating with the Kubernetes API. The change improves test stability under high load and slow cluster response conditions. ```release-note [e2e] Increase connection and request timeouts for Kubernetes API calls in E2E tests to improve stability. ``` Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
WalkthroughThis pull request adjusts timing parameters in the Kubernetes end-to-end test setup script. The port-forward timeout increases from 200 to 300 seconds, the node readiness wait timeout extends from 2 to 3 minutes, and the polling interval decreases from 3 to 2 seconds. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello IvanHunters, 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 stability of End-to-End (E2E) tests by increasing the connection and request timeouts when interacting with the Kubernetes API. These adjustments are designed to improve test reliability, especially under conditions of high system load or when the cluster response times are slower, ensuring that tests do not prematurely fail due to transient network or API delays. 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 (@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.
Code Review
This pull request increases connection and request timeouts in the E2E tests to improve stability. The changes are reasonable and should help with test reliability in slower environments. I have a couple of suggestions to update comments to match the new timeout values, which will improve code maintainability.
|
|
||
| # Set up port forwarding to the Kubernetes API server for a 200 second timeout | ||
| bash -c 'timeout 200s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &' | ||
| bash -c 'timeout 300s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &' |
|
|
||
| # Wait for the nodes to be ready (timeout after 2 minutes) | ||
| timeout 2m bash -c ' | ||
| timeout 3m bash -c ' |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
hack/e2e-apps/run-kubernetes.sh(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (1)
hack/e2e-apps/run-kubernetes.sh (1)
95-99: Verify polling strategy aligns with stability goal.You're increasing the node-readiness timeout from 2m to 3m (line 95) while simultaneously reducing the polling sleep from 3s to 2s (line 97). The decreased polling interval increases API query frequency, which contradicts the PR goal of improving stability "under high load."
Consider whether more aggressive polling is intentional or if you meant to keep the polling interval at 3s for the lower-load scenario. If you're expecting longer waits due to high load, frequent polling may compound stress on the API server.
| # Set up port forwarding to the Kubernetes API server for a 200 second timeout | ||
| bash -c 'timeout 200s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &' | ||
| bash -c 'timeout 300s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &' |
There was a problem hiding this comment.
Update comment to reflect new timeout value.
Line 89's comment states "200 second timeout" but the code on line 90 now uses timeout 300s. Update the comment to match the implementation.
- # Set up port forwarding to the Kubernetes API server for a 200 second timeout
- bash -c 'timeout 300s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &'
+ # Set up port forwarding to the Kubernetes API server for a 300 second timeout
+ bash -c 'timeout 300s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Set up port forwarding to the Kubernetes API server for a 200 second timeout | |
| bash -c 'timeout 200s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &' | |
| bash -c 'timeout 300s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &' | |
| # Set up port forwarding to the Kubernetes API server for a 300 second timeout | |
| bash -c 'timeout 300s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &' |
🤖 Prompt for AI Agents
In hack/e2e-apps/run-kubernetes.sh around lines 89 to 90, the inline comment
says "200 second timeout" but the command uses `timeout 300s`; update the
comment to reflect the actual 300 second timeout (e.g., change the comment text
to "300 second timeout") so the comment matches the implementation.
|
Successfully created backport PR for |
This patch increases the connection and request timeouts used in the E2E tests when communicating with the Kubernetes API. The change improves test stability under high load and slow cluster response conditions.
What this PR does
Release note
Summary by CodeRabbit