Skip to content

gracefully shut down builder process #3251

@syphar

Description

@syphar

Right now when you would just restart the builder, we would just

  • stop tracking the background docker run call
  • after restart, pick up the build again from the queue (or another builder does)
  • and start from scratch.

This means some time after a "simple" restart, we still have the old build running and consuming resources (cpu, memory, disk).

The current workaround is

  1. lock the queue
  2. wait until all in-progress builds are finished
  3. restart the server processes
  4. unlock the queue

What woud actually be the best option is:

  • extend https://github.com/rust-lang/rustwide so it supports cancelling an in-progress build (probably just SIGTERM or SIGKILL the docker run process.
  • change the builder so it can listen to the signals,
  • update the in-progress records in the builds table
  • kill the in-progress builds on shutdown

See also #3250

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-buildsArea: Building the documentation for a crateE-mediumEffort: This requires a fair amount of workP-mediumMedium priority

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions