Skip to content

[e2e] Increase Kubernetes connection timeouts - #1570

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
fix/increase_the_timeout_in_k8s_tests
Nov 3, 2025
Merged

[e2e] Increase Kubernetes connection timeouts#1570
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
fix/increase_the_timeout_in_k8s_tests

Conversation

@IvanHunters

@IvanHunters IvanHunters commented Nov 3, 2025

Copy link
Copy Markdown
Collaborator

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.

[e2e] Increase connection and request timeouts for Kubernetes API calls in E2E tests to improve stability.

What this PR does

Release note

Summary by CodeRabbit

  • Chores
    • Optimized infrastructure timeout and polling configurations to improve deployment reliability and test execution efficiency.

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>
@dosubot dosubot Bot added the size/XS This PR changes 0-9 lines, ignoring generated files label Nov 3, 2025
@coderabbitai

coderabbitai Bot commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This 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

Cohort / File(s) Summary
E2E test timing adjustments
hack/e2e-apps/run-kubernetes.sh
Extended port-forward timeout (200s → 300s), increased node readiness wait timeout (2min → 3min), reduced polling interval (3s → 2s)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single file with timeout configuration adjustments
  • No logic changes or behavioral modifications beyond timing parameters
  • Changes are straightforward and self-explanatory

Possibly related PRs

Suggested reviewers

  • lllamnyp
  • kvaps

Poem

🐰 Tick-tock, the timers grow and shrink,
Port-forward waits a touch more long,
While readiness checks tick more strong,
Three hundred seconds now to link,
Patience pays—our tests are strong!

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "[e2e] Increase Kubernetes connection timeouts" directly and accurately summarizes the main change in the changeset. The pull request extends multiple timeout values (port-forward timeout from 200s to 300s, node readiness wait timeout from 2 to 3 minutes) and adjusts polling intervals to improve E2E test stability under high load conditions. The title is concise, clear, and uses specific terminology that allows a teammate to immediately understand the primary objective without scanning the full changeset. The [e2e] prefix properly scopes the change to end-to-end testing infrastructure.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/increase_the_timeout_in_k8s_tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello 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

  • Kubernetes API Port-Forward Timeout Increased: The timeout for kubectl port-forward operations to the Kubernetes API server has been extended from 200 seconds to 300 seconds (5 minutes).
  • Node Readiness Check Timeout Extended: The overall timeout for waiting for Kubernetes nodes to become ready in E2E tests has been increased from 2 minutes to 3 minutes.
  • Node Readiness Check Sleep Interval Adjusted: Within the node readiness check loop, the sleep interval between retries has been reduced from 3 seconds to 2 seconds, allowing for faster re-evaluation within the extended timeout.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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 &'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The timeout has been increased to 300s, but the comment on the preceding line (89) is now outdated as it still refers to a 200 second timeout. Please update the comment to match the new value to improve code clarity and maintainability.


# Wait for the nodes to be ready (timeout after 2 minutes)
timeout 2m bash -c '
timeout 3m bash -c '

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The timeout has been increased to 3 minutes, but the comment on the preceding line (94) is now outdated as it still refers to a 2 minute timeout. Please update the comment to reflect the new value for consistency.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2ac533f and e2eb1e2.

📒 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.

Comment on lines 89 to +90
# 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 &'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
# 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.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Nov 3, 2025
@kvaps Andrei Kvapil (kvaps) added the backport Should change be backported on previous release label Nov 3, 2025
@kvaps
Andrei Kvapil (kvaps) merged commit 5a2d4d7 into main Nov 3, 2025
22 checks passed
@kvaps
Andrei Kvapil (kvaps) deleted the fix/increase_the_timeout_in_k8s_tests branch November 3, 2025 09:48
@github-actions

github-actions Bot commented Nov 3, 2025

Copy link
Copy Markdown

Successfully created backport PR for release-0.37:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Should change be backported on previous release lgtm This PR has been approved by a maintainer size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants