Skip to content

Remote controller should clean up after itself #1641

Open
@jedevc

Description

@jedevc

Raised in #1626 (comment), we need to make sure that the buildx remote controller tidily cleans up after itself, instead of leaking resources forever.

I think we need to work out exactly what the lifetime semantics of the debugging session should be, but generally, I think we should follow:

  • Processes are terminated up 1. when they exit, or 2. when their parent session terminates
  • A session should terminate 1. when it is explicitly terminated by the user, 2. when its parent controller is terminated (for local, when the calling process ends, for remote, when the server terminates), or 3. after a deadline during which no user interaction has occurred
    • The deadline is useful, so that a user can run a build, watch it fail, and then connect to the session to investigate and invoke, without needing to re-trigger the build.
  • The remote server should terminate itself when 1. the user requests it to using kill, or 2. it has no more sessions (so that after the deadlines of all the sessions have expired, we can cleanly exit).

cc @ktock

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions