Repository navigation
Conversation
yuezengwu
left a comment
There was a problem hiding this comment.
The new transient worker fixes the npm reify window, but it removes the existing service-unit refresh from managed Linux updates. systemctl stop terminates the daemon that is awaiting systemd-run; consequently createExecuteUpdate cannot reach refreshServiceUnit() after installation. A release that changes the systemd unit (especially ExecStart, the regression daemon refresh-unit was introduced to prevent) is then started using the old definition and can fail or crash-loop. Please run the newly installed binary’s unit-drift refresh from the surviving worker before starting the daemon, and cover that handoff in a test. I verified this against head 92c5bc0; pnpm check, pnpm typecheck, and 63 focused local tests passed, and the current 15 CI checks are green. The local host is macOS, so the new Linux-only tests did not execute locally.
| "trap finish EXIT", | ||
| "trap 'exit 143' HUP INT TERM", | ||
| `npm_command="$1"; shift; package_name=${packageName}; bin_name=${binName}; alias_name=${aliasName}`, | ||
| `${systemctl} stop ${serviceUnit}`, |
There was a problem hiding this comment.
Stopping this unit kills the old daemon before createExecuteUpdate can reach its existing refreshServiceUnit() call in update-glue.ts. The worker later starts the service without rewriting a drifted unit from the newly installed binary. If a release changes ExecStart (for example, the historical client start to daemon start migration), the old unit can boot the new CLI with an obsolete command. Please move the unit-drift refresh into this surviving worker before restart and test that path.
Fixes #2394
What changed
systemd-rununit outside the daemon service cgroup.Validation
pnpm check— passed (repository baseline warnings remain).pnpm typecheck— passed.