Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix submission of Dataflow jobs #711

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

damccorm
Copy link

Today, if you try to submit dataflow jobs with a mix of normal pipeline options and dataflow pipeline options, it does not get submitted correctly.

This is because cfg.command is quoted, so the final command ends up looking like this after adding dataflow_flags:

'
    python3 -m apache_beam.examples.wordcount             --input=gs://dataflow-samples/shakespeare/kinglear.txt         --output=gs://ttl-30d-us-central2/axlearn/users/remyw/dataflow/wordcount' --dataflow_service_options=enable_google_cloud_heap_sampling --dataflow_service_options=enable_secure_boot --experiments=use_network_tags=allow-internet-egress --experiments=use_runner_v2 --machine_type=n2-standard-8 --no_use_public_ips --project=abc --region=us-central1 --runner=DataflowRunner --sdk_container_image=my_container

Note the leading quote as well as the trailing quote after output=gs://ttl-30d-us-central2/axlearn/users/remyw/dataflow/wordcount'

This breaks the processing of this command, and all the subsequent dataflow_flags are ignored, so it gets run locally instead of on Dataflow.

To fix this, we just need to strip the quotes around cfg.command before adding it to our full command.

Copy link
Contributor

@markblee markblee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! cc @zhiyun

@damccorm
Copy link
Author

Thanks! I reformatted to fix the precommit check since it looks like it was failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants