Fix Xlang IO Direct installGcpTest uv cache lock#38862
Conversation
Summary of ChangesHello, 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 addresses intermittent test failures in the Xlang IO Direct 'installGcpTest' suite. The issue was identified as cache lock contention when using 'uv' during parallel environment setup. By reverting to standard 'pip' with explicit retry configurations, the build process is now more resilient to concurrent execution environments. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request reverts the installation tool from uv to pip in BeamModulePlugin.groovy to resolve cache lock timeouts during parallel test executions. The reviewer suggests retaining uv for its performance benefits by configuring a unique cache directory per environment to avoid the lock contention.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Code Review
This pull request triggers a post-commit test suite and updates the Beam Gradle plugin to use a project-specific cache directory for uv to avoid lock contention. The review feedback suggests wrapping the environment and installation target paths in double quotes to prevent failures when paths contain spaces.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| def uvCacheDir = "${project.ext.envdir}/.uv_cache" | ||
| project.exec { | ||
| executable 'sh' | ||
| args '-c', ". ${project.ext.envdir}/bin/activate && pip install uv && uv pip install --pre ${installTargets}" | ||
| // Default uv cache is global; py310/py314 installGcpTest fight over the same lock. | ||
| args '-c', ". ${project.ext.envdir}/bin/activate && pip install uv && uv pip install --cache-dir ${uvCacheDir} --pre ${installTargets}" | ||
| } |
There was a problem hiding this comment.
If the project path or virtual environment directory (envdir) contains spaces (which is common in local development environments), executing the shell command without quotes will fail. It is safer to wrap the paths in double quotes within the shell command to ensure robustness.
def uvCacheDir = "${project.ext.envdir}/.uv_cache"
project.exec {
executable 'sh'
// Default uv cache is global; py310/py314 installGcpTest fight over the same lock.
args '-c', ". \"${project.ext.envdir}/bin/activate\" && pip install uv && uv pip install --cache-dir \"${uvCacheDir}\" --pre \"${installTargets}\""
}
There was a problem hiding this comment.
This comment looks reasonable.
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
assign set of reviewers |
|
Assigning reviewers: R: @Abacn for label build. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Fixes: #38838
Successful run: https://github.com/apache/beam/actions/runs/27202991814/job/80311405660?pr=38862
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.