You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remote-host sweep treats a tombstoned project's or workroom's hosts as unknown #296
ContainerHostDriver.sweep(keeping:grace:) runs rm --force --volumes on every labelled container, and removes every labelled image, that isn't in known and is older than grace (20 minutes).
A project in deletingProjects (#294), or a workroom in deletingWorkrooms (#116), is missing from fresh. If the sweep's first run happens during that delete, the sweep treats the item's hosts as unrecorded and removes them.
When it bites
All of these must happen together:
The sweep hasn't run yet this launch. For example, the remote-workrooms preview was turned on after launch, so no adopt had found anything to record.
A delete of a project or workroom with remote hosts is in flight, and a reload runs during it.
A host is older than 20 minutes.
The delete then fails before taking that host down. Config still records the host, but the sweep has destroyed it.
If the delete succeeds, the sweep only removes what was being removed anyway.
Fix options
Build the keep-set from the unfiltered list. For example, pass sorted to adopt, or a separate known set built from it. The tombstone should hide the item from the UI, not from host bookkeeping. Check that adopting a tombstoned item's hosts is harmless. adopt only registers hosts it doesn't already hold, so it looks safe.
Or defer the sweep while any tombstone is set, and let the next adopt run it.
Activity
fix(macapp): hold the remote-host sweep while a delete is in flight
fix(macapp): run a held remote-host sweep once the last delete ends
fix(macapp): run a held remote-host sweep once the last delete ends
fix(macapp): a runtime down at launch is swept on a later reload (#284)