Skip to content

Conversation

@JesseStutler
Copy link
Member

What type of PR is this?

/area flaky

What this PR does / why we need it:

DRA sometimes failed recently: https://github.com/volcano-sh/volcano/actions/runs/16809889541/job/47612203028?pr=4517, this PR can fix this: kubernetes/kubernetes#130141, it's because that previously, "env" ran as the command inside the container and its log output
was checked. That suffered from a race because even though the pod might be
reported as running, there's no guarantee that the command has really produced
output and that this output has been captured. Therefore, we might use exec env instead, if the pod is already running, exec env can get the expected result

Which issue(s) this PR fixes:

NONE

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Signed-off-by: JesseStutler <[email protected]>
@volcano-sh-bot
Copy link
Contributor

@JesseStutler: The label(s) area/flaky cannot be applied. These labels are supported: ``

In response to this:

What type of PR is this?

/area flaky

What this PR does / why we need it:

DRA sometimes failed recently: https://github.com/volcano-sh/volcano/actions/runs/16809889541/job/47612203028?pr=4517, this PR can fix this: kubernetes/kubernetes#130141, it's because that previously, "env" ran as the command inside the container and its log output
was checked. That suffered from a race because even though the pod might be
reported as running, there's no guarantee that the command has really produced
output and that this output has been captured. Therefore, we might use exec env instead, if the pod is already running, exec env can get the expected result

Which issue(s) this PR fixes:

NONE

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

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

Choose a reason for hiding this comment

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

Summary of Changes

Hello @JesseStutler, 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!

I've addressed a known flakiness issue in the Dynamic Resource Allocation (DRA) end-to-end tests. The previous method of verifying environment variables by inspecting pod logs was prone to race conditions. This change updates the test logic to directly execute the env command within the test pods once they are running, providing a more robust and reliable way to assert the presence of expected environment variables. This should significantly improve the stability of the DRA E2E test suite.

Highlights

  • Reliable Environment Variable Checking: The core change involves switching from checking environment variables by parsing pod logs (which could be subject to race conditions) to directly executing the env command within the running container using e2epod.ExecWithOptionsContext. This ensures that the environment variables are retrieved reliably after the pod is confirmed to be running.
  • Refactored Test Helper Functions: The testPod and testContainerEnv functions were refactored to accept a *framework.Framework instance, providing a more consistent and direct way to access Kubernetes client functionalities and other testing utilities.
  • Simplified Test Pod Creation: The pod() function now creates a simpler pod that effectively pauses, as the env command is no longer part of the pod's initial command. This streamlines the test pod's behavior, focusing its purpose on being a target for exec commands.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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-code-assist Responds in comments when explicitly tagged, both in issue 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-code-assist comments or fill out our survey to provide feedback.

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.

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 11, 2025
@JesseStutler
Copy link
Member Author

/kind flake

@volcano-sh-bot volcano-sh-bot added the kind/flake Categorizes issue or PR as related to a flaky test. label Aug 11, 2025
@gemini-code-assist
Copy link

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@Monokaix
Copy link
Member

/approve

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Monokaix

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2025
@JesseStutler
Copy link
Member Author

/cc @lowang-bh @hwdef @archlitchi Could you put an LGTM for this PR?

Copy link
Member

@hwdef hwdef left a comment

Choose a reason for hiding this comment

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

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2025
@volcano-sh-bot volcano-sh-bot merged commit 80eea1d into volcano-sh:master Aug 13, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/flake Categorizes issue or PR as related to a flaky test. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants