Repository navigation
Skip default dependencies in YAML template when workers use private IPs - #4597
ashokballolli wants to merge 2 commits into
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 prevents pipeline timeouts in private IP environments by skipping the addition of default runtime dependencies when workers do not have public IP access. 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 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 prevents adding default runtime dependencies when pipeline workers are configured to use only private IPs, as they typically lack access to PyPI. It introduces a helper function _uses_private_ips to parse pipeline options and check if use_public_ips is set to false, and updates the main execution flow to skip dependency addition and log an informational message when this condition is met. Unit tests have also been added to cover these scenarios. I have no feedback to provide.
9359244 to
f6f86d9
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a check to prevent adding default runtime dependencies when Apache Beam pipeline workers are configured to use only private IPs, as they typically lack access to PyPI. It adds the _uses_private_ips helper function to parse pipeline options and skip dependency installation accordingly, accompanied by comprehensive unit tests to validate this behavior. I have no feedback to provide.
|
Hi @chamikaramj, this is the fix we discussed on #4565. I tested it again on Dataflow with private and public IPs and both jobs worked fine. Could you please take a look when you get time? It also needs the cc @GoogleCloudPlatform/dataflow-templates-wg |
Fixes #4565
When the workers only use private IPs, the YAML template still adds the default requirements file, so
pip downloadtries to reach PyPI and the launcher times out. As discussed in the issue, the template now does not add the requirements file in this case. The private IP setting is read from the args (--no_use_public_ips) or fromoptionsin the YAML. These jobs can still pass their ownrequirements_file.Tested on Dataflow with private and public IPs, details and screenshots here: #4565 (comment). Also added unit tests.
This is a bug fix, so the
bug-fixlabel should fit.