Skip to content

Python SDK 2.75 Flex Template: RuntimeValueProvider is being stringified #39499

Closed

Description

@raja-guda

After upgrading to Apache Beam Python SDK to 2.75.0, runtime parameters passed to a Dataflow Flex Template are not being resolved correctly.

A parameter defined using add_value_provider_argument() is being interpreted as a string representation of RuntimeValueProvider instead of the actual runtime value. There are few args passed which seems to have no issues, only difference is that there is no default value set in all the args but a value is passed expect for the one which has the issue.

Expected behaviour

When a runtime parameter is defined:

class MyOptions(PipelineOptions): @classmethod def _add_argparse_args(cls, parser): parser.add_value_provider_argument( "--vpt_vp_arg", dest="vpt_vp_arg" required=False )
and accessed inside a DoFn:

vpt_vp_arg = options.vpt_vp_arg.get()

I expect:
None
or the configured runtime value.

Actual behaviour

get() returns:

'RuntimeValueProvider(option_name=vpt_vp_arg, value_type=str, default_value=None)'

Environment
Apache Beam Python SDK: 2.75.0
Runner: Google Cloud Dataflow
Template type: Flex Template

Activity

  1. changed the title [-]Python SDK 2.75 Flex Template: RuntimeValueProvider is being stringified and runtime parameters are treated as unparsed arguments[/-] [+]Python SDK 2.75 Flex Template: RuntimeValueProvider is being stringified[/+] on Jul 27, 2026
  2. Abacn commented on Aug 5, 2026

    @Abacn
    Contributor

    Dataflow client migration happened in #37639, in Beam 2.75.0

    ValueProvider is mainly used for Dataflow classic templates. If you're building flex templates, value providers are actually not needed

  3. added this to the 2.76.0 Release milestone on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions