fix: shim the headless Playwright binary too - #1540
Open
geodro wants to merge 3 commits into
Open
Conversation
Enabling a worker armed its systemd unit for login start no matter what the autostart switch said. Turning autostart off disabled every unit on disk at that moment, but anything written afterwards, a worker enabled in the dashboard, a unit rewritten by lerd start, went back to being wanted by default.target. At the next boot systemd started it, BindsTo pulled the FPM container up with it, and nothing pulled up the databases and caches behind it, so the worker died on a connection error and Restart=always looped it for as long as the session lasted. Arming a worker unit now goes through one place that consults the autostart flag and disarms instead when it is off, which also clears an arming left behind by an older build. The unit is still started by whoever asked for it, so a worker that should be running now still runs. On macOS launchctl enable is also what lifts the flag that blocks bootstrapping a label at all, so the gate stays out of that path and the platform keeps its current behaviour. Two places read "is the unit enabled" as "does the user want this worker", which that flag no longer answers once a running worker can be disarmed. The PHP image rebuild now snapshots which workers were up before it restarts FPM and brings exactly those back, rather than trusting the enable state it had just invalidated. A node runtime switch regenerates the unit of a worker that is merely running, not only an armed one.
The arming guard now treats a running worker as installed, so it reaches for IsActive whenever IsEnabled comes back false. The double in the regeneration test only answered IsEnabled and embedded a nil manager for everything else, which left that second call landing on the nil interface and taking the process down with it.
The chromium_headless_shell build ships its executable as headless_shell, a name the shim never looked for, so it stayed the glibc binary Playwright downloaded and musl could not exec it. The count guard did not notice because chrome still matched and the count stayed above zero, so the install reported success while shimming half of what it downloaded. The failure surfaced as PlaywrightOutdatedException, which reads as a stale Playwright and sends people to reinstall it, so the wrong half of the setup got blamed. The extractor learns the same name, otherwise the binary arrives without its executable bit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pest browser testing has been failing on a fresh setup with current Playwright. The chromium_headless_shell build ships its executable as headless_shell, a name the shim never looked for, so it stayed the glibc binary Playwright downloaded and musl could not exec it. The count guard did not notice because chrome still matched and the count stayed above zero, so the install reported success while shimming half of what it downloaded.
The failure surfaced as PlaywrightOutdatedException, which reads as a stale Playwright and sends people to reinstall it, so the wrong half of the setup got blamed.
The extractor learns the same name, otherwise the binary arrives without its executable bit.
Refs #1539