Skip to content

Serialization issue with non-bool 'streaming' value #19127

@kennknowles

Description

@kennknowles

Hi all,

Just want to start out with that this was my own fault and I'm only reporting because it took me a while to figure out and the library could prevent it.

I'm using the python 2.8.0 beam library pushing to Google dataflow.

Based on the options that were presented to the application I set streaming or not like:

    streaming = options.topic or options.subscription
    options.view_as(StandardOptions).streaming = streaming

This was working fine with the direct runner, but when i push to dataflow the container wasn't starting. In python (str or str) is a string, which works great for truth-y ness and local dev, but at some point we serialize this value and send it to dataflow which tries to deserialize this string as a boolean and the harness crashes.

Anyway, my fault, however if we're serializing values that are going to be decoded by golang it'd be nice to be stricter about this on the client side as it's easy to screw up.

Thanks for your help.

Imported from Jira BEAM-6121. Original Jira may contain additional context.
Reported by: jamielennox.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions