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

Remote controller should clean up after itself #1641

Open
jedevc opened this issue Feb 21, 2023 · 0 comments
Open

Remote controller should clean up after itself #1641

jedevc opened this issue Feb 21, 2023 · 0 comments

Comments

@jedevc
Copy link
Collaborator

jedevc commented Feb 21, 2023

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

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

No branches or pull requests

2 participants