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

Have a --wait_until_finish=[True|False] pipeline option #20964

Closed
damccorm opened this issue Jun 4, 2022 · 1 comment · Fixed by #32409
Closed

Have a --wait_until_finish=[True|False] pipeline option #20964

damccorm opened this issue Jun 4, 2022 · 1 comment · Fixed by #32409

Comments

@damccorm
Copy link
Contributor

damccorm commented Jun 4, 2022

Currently, if we use the with statement to run a pipeline, it waits until finish by default with no way to configure it. The only way to run without waiting is by calling pipeline.run() explicitly without the with statement context. This is not consistent and users now have to be aware of two different ways of calling.

Ideally, we would like to define pipelines with the with statement always to have a "single way to do things". Running without waiting is useful, for example, to run a pipeline in Cloud Build, Cloud Run, templates, or other serverless frameworks.

Right now the only way to do it is by changing the code to remove the with statement and calling pipeline.run() manually, which might not be always possible. With a pipeline option we can just pass that from the command line arguments, or even when testing.

I'm opening this for Python since many Python samples would greatly benefit from this, but I can see this being useful in Java and Go as well.

Imported from Jira BEAM-12455. Original Jira may contain additional context.
Reported by: dcavazos.

@liferoad
Copy link
Collaborator

liferoad commented Apr 10, 2023

.take-issue

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

Successfully merging a pull request may close this issue.

2 participants