Skip to content

[Bug]: Cross-language pipeline options are not picked up in Java DoFns #33074

Open

Description

@ahmedabu98

What happened?

I noticed this when testing with Managed BigQueryIO in Python SDK:

options = PipelineOptions([
  "--project=google.com:clouddfe",
  "--region=us-central1",
  "--temp_location=gs://ahmedabualsaud-wordcount/tmp",
])


with beam.Pipeline(options=options) as p:
  (p
   | beam.Create([beam.Row(int=999)])
   | beam.managed.Write("bigquery",
                        config={"table": "google.com:clouddfe.ahmedabualsaud.test_table"},
                        expansion_service="localhost:12345"
                        ))

I would expect these pipeline options to be picked up on Java's side. With some logging, I see the Java SDK recognizing the options at expand time in PTransforms (i.e. expand()), but not at runtime in DoFns (i.e. @ProcessElement).

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Activity

  1. changed the title [-][Bug]: Cross-language pipeline options are not picked up in DoFns[/-] [+][Bug]: Cross-language pipeline options are not picked up in Java DoFns[/+] on Nov 11, 2024
  2. Suvrat1629 commented on Mar 7, 2025

    @Suvrat1629
    Contributor

    @ahmedabu98 I am trying to understand how this would work. So do i tweak the expand() method and the "@ProcessElement" to pass it to the DoFns or is there some other way to do this?

  3. github-actions commented on Aug 6, 2025

    @github-actions
    Contributor

    This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.

  4. github-actions commented on Sep 6, 2025

    @github-actions
    Contributor

    This issue has been closed due to lack of activity. If you think that is incorrect, you can reopen the issue at any time.

  5. tarun-google commented on Sep 17, 2025

    @tarun-google
    Contributor

    .take-issue

  6. 15 remaining items

  7. ahmedabu98 commented on Nov 18, 2025

    @ahmedabu98
    ContributorAuthor

    I think the original issue here is not solved right? A Java DoFn's process context does not include pipeline options passed thru the Python SDK

  8. Abacn commented on Nov 18, 2025

    @Abacn
    Contributor

    A Java DoFn's process context does not include pipeline options passed thru the Python SDK

    I remember I checked the pipeline option is honored. The NPE in the example in description was due to other issue (#33074 (comment))

  9. tarun-google commented on Nov 18, 2025

    @tarun-google
    Contributor

    Yes the main issue is still not fixed. As i mentioned, In this code we pass pipeline options through PCollection Input(which i think is a rare code pattern) and Runner Context. The first path is not working, we fall back to the second path.

  10. chamikaramj commented on Nov 18, 2025

    @chamikaramj
    Contributor

    My understanding is that the same set of pipeline options are available to all SDKs via UW but specific options might be not available due to the differences in naming conventions. I haven't tried accessing options via DoFn's process context though and it's possible that some options get dropped when accessing them via that path.

  11. shunping commented on Nov 25, 2025

    @shunping
    Collaborator

    @tarun-google @chamikaramj, is this a release blocker or could we move this to the next release?

  12. chamikaramj commented on Nov 25, 2025

    @chamikaramj
    Contributor

    I don't think this is a release blocker.

  13. shunping commented on Nov 25, 2025

    @shunping
    Collaborator

    Sounds good. Will move it to the next release then.

  14. damccorm commented on Nov 25, 2025

    @damccorm
    Contributor

    Possibly relevant - #36443 fixed passing pipeline options from Python to Java through external transforms, which may have been the initial issue (sounds like we have more to do here)

  15. removed this from the 2.71.0 Release milestone on Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions