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

[prism] Add an idle shutdown timout to prism binary. #32276

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

lostluck
Copy link
Contributor

Adding a flag --idle_shutdown_timeout to avoid SDKs leaving dangling prism processes after a job terminates.

  • Operates simply: Tracks the number of terminations, and compares to the number of started jobs. If they're equal, then start the idle timer.
  • Timer is cleared if there's a new job.
  • Initial timer set on start of prism process.
  • Currently only actively running jobs extend the timeout, and other actions (eg. via Job management) do not extend the timeout.
  • Negative durations do not idle shutdown.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@lostluck
Copy link
Contributor Author

R: @jrmccluskey

@lostluck lostluck added this to the 2.59.0 Release milestone Aug 22, 2024
@lostluck
Copy link
Contributor Author

This will end up being cherry picked into the release, along with an associated change to use them with the Java and Python runner wrappers.

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

Copy link
Contributor

@jrmccluskey jrmccluskey left a comment

Choose a reason for hiding this comment

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

LGTM, one docstring change

sdks/go/cmd/prism/prism.go Outdated Show resolved Hide resolved
Co-authored-by: Jack McCluskey <34928439+jrmccluskey@users.noreply.github.com>
@lostluck
Copy link
Contributor Author

Thank you very much!

@lostluck lostluck merged commit 995724d into apache:master Aug 22, 2024
7 checks passed
@lostluck lostluck deleted the prismIdle branch August 22, 2024 14:31
lostluck added a commit that referenced this pull request Aug 22, 2024
* Add an idle shutdown timout to prism binary.

* Correct flag text.

Co-authored-by: Jack McCluskey <34928439+jrmccluskey@users.noreply.github.com>

---------

Co-authored-by: lostluck <13907733+lostluck@users.noreply.github.com>
Co-authored-by: Jack McCluskey <34928439+jrmccluskey@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants