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

[PR] Add an option to set the Dataflow container base repository (Python, Java, Go) [beam]

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

   Part of #40569
   
   he Dataflow runners hardcode `gcr.io/cloud-dataflow/v1beta3` for the default SDK container images. Python and Java also use it when they rewrite cross-language `apache/beam*` images. Trusted Partner Cloud (TPC) universes have their own registries (e.g. `docker.s3nsregistry.fr/q-s3ns-system/cloud-dataflow/v1beta3`), so workers there can't pull these images.
   
   This PR adds an option that replaces that prefix:
   
   | SDK | Option |
   |---|---|
   | Python | `--dataflow_container_base_repository` |
   | Java | `--dataflowContainerBaseRepository` |
   | Go | `--dataflow_container_base_repository` |
   - It is used for the default SDK image and for rewriting cross-language `apache/beam*` images.
   - `sdk_container_image` and `sdk_harness_container_image_overrides` still take precedence.
   - If the option is unset, behavior is unchanged. In Go, cross-language images are only rewritten when the flag is set.
   


-- 
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] Add an option to set the Dataflow container base repository (Python, Java, Go) [beam]

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

   ## [Codecov](https://app.codecov.io/gh/apache/beam/pull/40690?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `69.69697%` with `10 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 28.86%. Comparing base ([`76f6e6d`](https://app.codecov.io/gh/apache/beam/commit/76f6e6d7c0c1b2ce582c73d068ad9260cf15c5f3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`17f4d07`](https://app.codecov.io/gh/apache/beam/commit/17f4d07f6d89d6ba41069a13a01fd145f455f8b8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 249 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/beam/pull/40690?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [sdks/go/pkg/beam/runners/dataflow/dataflow.go](https://app.codecov.io/gh/apache/beam/pull/40690?src=pr&el=tree&filepath=sdks%2Fgo%2Fpkg%2Fbeam%2Frunners%2Fdataflow%2Fdataflow.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93Lmdv) | 69.69% | [7 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40690?src=pr&el=tree&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   #40690       +/-   ##
   =============================================
   - Coverage     56.16%   28.86%   -27.31%     
   =============================================
     Files          1124      381      -743     
     Lines        178336    71181   -107155     
     Branches       1489        0     -1489     
   =============================================
   - Hits         100170    20549    -79621     
   + Misses        75645    48776    -26869     
   + Partials       2521     1856      -665     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/beam/pull/40690/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/40690/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `28.86% <69.69%> (-0.27%)` | :arrow_down: |
   | [java](https://app.codecov.io/gh/apache/beam/pull/40690/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [python](https://app.codecov.io/gh/apache/beam/pull/40690/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   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 Harness](https://app.codecov.io/gh/apache/beam/pull/40690?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] Add an option to set the Dataflow container base repository (Python, Java, Go) [beam]

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

   > sdks/python/apache_beam/options/pipeline_options.py (line 1280): 🟡 Medium: When --prebuild_sdk_container_engine is used on Dataflow without --sdk_container_image, sdk_container_builder._get_cloud_build_id_and_image_name (in sdks/python/apache_beam/runners/portability/sdk_container_builder.py) resolves the base image via environments.DockerEnvironment.default_docker_image() and only rewrites the apache/beam prefix to names.DATAFLOW_CONTAINER_IMAGE_REPOSITORY when sdk_location == 'default'. As a result, prebuilding a container with --dataflow_container_base_repository set will still pull the base image from gcr.io/cloud-dataflow/v1beta3 (or apache/beam), which will fail in restricted environments where only the custom mirror repository is accessible. Consider using apiclient.get_container_image_from_options(pipeline_options) (or get_container_base_repository_from_options) when determining the default base image in sdk_container_builder.py.
   
   Good catch on the gap, though the details differ: the prebuild base image comes from `SdkContainerImageBuilder.__init__` (`sdk_container_image` or `apache/beam_python3.X_sdk:<ver>` on Docker Hub), not from `gcr.io` or a non-existent `_get_cloud_build_id_and_image_name` helper. Fixed in dataflow_runner.py
   
   
   > runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineWorkerPoolOptions.java (line 150): 🟢 Low: For consistency with other optional string getters in this interface (and since getDataflowContainerBaseRepository() returns null when unset, as checked in DataflowRunner.getContainerImageForJob), consider annotating the return type with @Nullable.
   
   Done: annotated the getter and setter with @Nullable


-- 
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] Add an option to set the Dataflow container base repository (Python, Java, Go) [beam]

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

   Assigning reviewers:
   
   R: @jrmccluskey for label python.
   Backup reviewer: damccorm (if the main reviewer is unresponsive, you can escalate to them by tagging their username)
   
   
   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] Add an option to set the Dataflow container base repository (Python, Java, Go) [beam]

Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping merged PR #40690:
URL: https://github.com/apache/beam/pull/40690


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