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

Feature: Improve graceful termination of the builder #1298

Open
1 task
JKBGIT1 opened this issue Mar 28, 2024 · 0 comments
Open
1 task

Feature: Improve graceful termination of the builder #1298

JKBGIT1 opened this issue Mar 28, 2024 · 0 comments
Labels
feature New feature groomed Task that everybody agrees to pass the gatekeeper

Comments

@JKBGIT1
Copy link
Contributor

JKBGIT1 commented Mar 28, 2024

Motivation

If the builder receives a SIGTERM while there is a running workflow, it first has to wait until all stages of the workflow are finished and only after that it can terminate. This graceful shutdown can be performed faster.

Description

In the new approach, the builder will wait until the current ongoing stage of the workflow finishes. After that, it terminates. In case that wasn't the last stage of the workflow, the builder re-runs the whole workflow.

An example:

  1. builder starts a workflow
  2. terraformer starts to provision the desired infrastructure
  3. builder receives SIGTERM
  4. terraformer hasn't finished the provisioning yet
  5. builder waits until terraformer finishes the provisioning
  6. terraformer finished provisioning
  7. builder terminates
  8. builder re-runs the whole workflow (including the terraformer part)

The re-run will move quickly through the terraformer stage because the infrastructure is already provisioned.

Exit criteria

  • builder works with a new approach to SIGTERM handling.

Anything else to add

@bernardhalas as agreed, please complement me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature groomed Task that everybody agrees to pass the gatekeeper
Projects
None yet
Development

No branches or pull requests

2 participants