You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "TongruiLi (via GitHub)" <gi...@apache.org> on 2026/05/06 01:14:23 UTC

[PR] Added Portable Runner Passing for Python Runners [beam]

TongruiLi opened a new pull request, #38375:
URL: https://github.com/apache/beam/pull/38375

   Added Portable Runner Passing for Python Runners. This includes the following experiment options
   
   1. enable_portable_runner as a valid option for enabling runner v2
   2. disable_portable_runner/enable_streaming_java_runner for disabling runner v2. Specifying these options will cause the job to be rejected.
   
   ------------------------
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/actions/workflows/build_wheels.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/actions/workflows/python_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/actions/workflows/java_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/actions/workflows/go_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4425249488

   Please also fix the format issue. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4483472929

   I think we need to address 
   - [PreCommit Python Runners](https://github.com/apache/beam/actions/runs/26066572772/job/76638631086?pr=38375)
   - Java formatter [PreCommit Spotless](https://github.com/apache/beam/actions/runs/26066572853/job/76638630887?pr=38375)
   - Python formatter [PreCommit Python Formatter](https://github.com/apache/beam/actions/runs/26066572789/job/76638630827?pr=38375)
   
   Other failed workflows look irrelevant.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4468554330

   ran yapf --in-place --parallel --recursive sdks/python/apache_beam/runners/dataflow/dataflow_runner.py yapf --in-place --parallel --recursive sdks/python/apache_beam/runners/dataflow/dataflow_runner_test.py


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4468671230

   Again [beam_PreCommit_Python_PVR_Flink (Run Python_PVR_Flink PreCommit)](https://github.com/apache/beam/actions/runs/25975995307/job/76356103728?pr=38375#logs) looks irrelevant, 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Passing for Python/Go Runners [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4384806990

   Assigning reviewers:
   
   R: @shunping for label python.
   R: @shunping for label go.
   
   
   Note: If you would like to opt out of this review, comment `assign to next reviewer`.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
   
   The PR bot will only process comments in the main thread (not review comments).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added Portable Runner Passing for Python Runners [beam]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on code in PR #38375:
URL: https://github.com/apache/beam/pull/38375#discussion_r3192450784


##########
sdks/python/apache_beam/runners/dataflow/dataflow_runner.py:
##########
@@ -591,6 +591,7 @@ def _add_runner_v2_missing_options(options):
   debug_options.add_experiment('use_unified_worker')
   debug_options.add_experiment('use_runner_v2')
   debug_options.add_experiment('use_portable_job_submission')
+  debug_options.add_experiment('enable_portable_runner')

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The PR description states that `enable_portable_runner` is a valid option for enabling Runner V2. However, this flag is currently only added to the experiments list within `_add_runner_v2_missing_options`, which is typically called after the decision to use Runner V2 has already been made. To fully support this flag as a trigger for Runner V2, it should also be included in the detection logic (e.g., in `_is_runner_v2_enabled` or the logic that calls `_add_runner_v2_missing_options`).



##########
sdks/python/apache_beam/runners/dataflow/dataflow_runner.py:
##########
@@ -662,6 +663,8 @@ def _is_runner_v2_disabled(options):
   """Returns true if runner v2 is disabled."""
   debug_options = options.view_as(DebugOptions)
   return (
+      debug_options.lookup_experiment('disable_portable_runner') or
+      debug_options.lookup_experiment('enable_streaming_java_runner') or

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The PR description mentions that specifying `disable_portable_runner` or `enable_streaming_java_runner` should cause the job to be rejected. Currently, these flags are only added to `_is_runner_v2_disabled`, which prevents Runner V2 flags from being added but allows the job to potentially fall back to the legacy runner. If a hard rejection is intended as described, please add an explicit validation check that raises an exception when these experiments are present.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on code in PR #38375:
URL: https://github.com/apache/beam/pull/38375#discussion_r3211527947


##########
sdks/python/apache_beam/runners/dataflow/dataflow_runner.py:
##########
@@ -662,6 +663,8 @@ def _is_runner_v2_disabled(options):
   """Returns true if runner v2 is disabled."""
   debug_options = options.view_as(DebugOptions)
   return (
+      debug_options.lookup_experiment('disable_portable_runner') or
+      debug_options.lookup_experiment('enable_streaming_java_runner') or

Review Comment:
   Added unit test for disablement. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4578837047

   change superceeded by https://github.com/apache/beam/pull/38532/changes#diff-6918aa3e30555e3fc328446059d3384ddbe1634978512c67f3cbfcfc5795412c


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4480652391

   @shunping if you can take another look that will be great, thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi closed pull request #38375: [Dataflow] Added Portable Runner Parsing for Python/Go Runners
URL: https://github.com/apache/beam/pull/38375


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on code in PR #38375:
URL: https://github.com/apache/beam/pull/38375#discussion_r3211527042


##########
sdks/python/apache_beam/runners/dataflow/dataflow_runner.py:
##########
@@ -591,6 +591,7 @@ def _add_runner_v2_missing_options(options):
   debug_options.add_experiment('use_unified_worker')
   debug_options.add_experiment('use_runner_v2')
   debug_options.add_experiment('use_portable_job_submission')
+  debug_options.add_experiment('enable_portable_runner')

Review Comment:
   Resolving outdated comments



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4547446461

   Seems like I accidently merged some change from another branch, reverted to intended change only.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4410464331

   unit test failure looks unrelated. same set of test also fails in https://github.com/apache/beam/pull/38407


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4501095470

   waiting on author


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4425240111

   Could you merge your branch to master and run the tests again?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added Portable Runner Passing for Python Runners [beam]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4384393179

   ## Summary of Changes
   
   Hello, I'm Gemini Code Assist[^1]! 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 introduces support for the portable runner in Python by adding 'enable_portable_runner' as a configuration experiment. It also enhances the Runner v2 validation logic to ensure that specific experimental flags correctly trigger the disabling of Runner v2, maintaining consistency across job submission configurations.
   
   ### Highlights
   
   * **Portable Runner Support**: Added 'enable_portable_runner' as a valid experiment option to support Runner v2.
   * **Runner v2 Disabling**: Updated logic to disable Runner v2 when 'disable_portable_runner' or 'enable_streaming_java_runner' experiments are specified.
   * **Test Coverage**: Updated existing unit tests in dataflow_runner_test.py to include 'enable_portable_runner' in validation checks.
   
   <details>
   <summary><b>New Features</b></summary>
   
   🧠 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](https://codeassist.google/code-review/login) to enable Memory in your admin console.**
   </details>
   
   <details>
   <summary><b>Using Gemini Code Assist</b></summary>
   <br>
   
   The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.
   
   <b>Invoking Gemini</b>
   
   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-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.
   
   <b>Customization</b>
   
   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 `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github).
   
   <b>Limitations & Feedback</b>
   
   Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with :thumbsup: and :thumbsdown: 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](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG).
   </details>
   
   
   [^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4468557880

   ## [Codecov](https://app.codecov.io/gh/apache/beam/pull/38375?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 58.72%. Comparing base ([`4c4a2c1`](https://app.codecov.io/gh/apache/beam/commit/4c4a2c11e29d7b644f30b91789e6989a4d8ff21c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b846cec`](https://app.codecov.io/gh/apache/beam/commit/b846ceccaf75045d5fb68624f7c1abd14e6b43a5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #38375      +/-   ##
   ============================================
   - Coverage     58.73%   58.72%   -0.01%     
     Complexity     7418     7418              
   ============================================
     Files          1649     1649              
     Lines        212374   212374              
     Branches       6330     6330              
   ============================================
   - Hits         124728   124717      -11     
   - Misses        83099    83108       +9     
   - Partials       4547     4549       +2     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/beam/pull/38375/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [go](https://app.codecov.io/gh/apache/beam/pull/38375/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `28.70% <100.00%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/beam/pull/38375?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Dataflow] Added Portable Runner Parsing for Python/Go Runners [beam]

Posted by "TongruiLi (via GitHub)" <gi...@apache.org>.
TongruiLi commented on PR #38375:
URL: https://github.com/apache/beam/pull/38375#issuecomment-4550026457

   error looks unrelated, is there a way to rerun the test to ensure its not flake?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org