Skip to content

fix(workers): keep a worker that is down in the site's declared set - #1628

Merged
geodro merged 2 commits into
mainfrom
fix/1627-declared-worker-set
Aug 31, 2026
Merged

fix(workers): keep a worker that is down in the site's declared set#1628
geodro merged 2 commits into
mainfrom
fix/1627-declared-worker-set

Conversation

@geodro

@geodro geodro commented Aug 31, 2026

Copy link
Copy Markdown
Member

The workers list in a site's .lerd.yaml is what lerd start brings back, and it was rewritten after every worker action as the set of workers running at that moment. A worker that was merely down when an unrelated one was started or stopped was not in that snapshot and was written out of the file, and nothing put it back, so from then on it never started again.

That is how a crash-looping worker disappeared for good. It is down by definition, so any worker action taken while it was failing, from the CLI or from the dashboard, dropped its declaration, and disarming those units at boot removed the accident that had been starting it. It is the second half of what #1531 reported.

The list is a declaration, so it now follows the units on disk. A worker unit is written when the worker starts and removed when it stops, which makes its presence the honest record of what was asked for, and the running set is still consulted for stripe, the host proxy dev server and orphans, which have no unit the framework definition knows about.

Closes #1627
Refs #1531

The workers list in a site's .lerd.yaml is what lerd start brings back, and it was rewritten after every worker action as the set of workers running at that moment. A worker that was merely down when an unrelated one was started or stopped was not in that snapshot and was written out of the file, and nothing put it back, so from then on it never started again.

That is how a crash-looping worker disappeared for good. It is down by definition, so any worker action taken while it was failing, from the CLI or from the dashboard, dropped its declaration, and disarming those units at boot removed the accident that had been starting it.

The list is a declaration, so it now follows the units on disk. A worker unit is written when the worker starts and removed when it stops, which makes its presence the honest record of what was asked for, and the running set is still consulted for stripe, the host proxy dev server and orphans, which have no unit the framework definition knows about.

Closes #1627
@geodro
geodro requested a review from a team as a code owner August 31, 2026 15:04
The swap helper it borrowed lives in a linux-only test file, so the package failed to build for the macOS job while passing locally. The path under test is the same on both platforms, so the test carries its own.
@geodro
geodro merged commit 9c69b86 into main Aug 31, 2026
3 checks passed
@geodro
geodro deleted the fix/1627-declared-worker-set branch August 31, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A worker that is down when another one is touched drops out of the site's declared set and never starts again

1 participant