Repository navigation
A failed profile install is classified but not rolled back — the profile keeps the residue and can fail the same way forever #7673
Ragnoryok1
started this conversation in
General
Replies: 1 comment
|
A fresh reproduction on 0.1.7-rc.2, from an ordinary operation rather than a failed experiment — updating my own published plugin in the profile:
So the defect reproduces on demand from a single ordinary operation, not only after repeated failures, and leaves the same residue every time. The invariants in the report stay the ones to fix: restore the manifest on failure, clear |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary.
runProfilePnpmreads the profile manifest before running pnpm, but that snapshot is used only on success (to reconcile newly activated bundles). On a non-zero exit it returns the classified failure — the taxonomy ininstall-failure.tsis good — and nothing else: no manifest restore, and no cleanup of pnpm's staging directories. Nothing detects the residue on later runs, so the next install can fail identically.Where
packages/boot/plugin-manager/src/operations.ts:105-164—beforeread at:109; used only inreconcile(...)underexitCode === 0at:160; plain return at:164.restoreManifest/rollback/revertdo not appear anywhere in the package (searched).Evidence from my machine. The web profile accumulated 36
_tmp_<pid>_<n>staging directories from six failed attempts.pnpm installthen failed repeatedly with[ERR_PNPM_EPERM] [importPackage ...\node_modules\dsh-mobile-host] EPERM: operation not permitted, rename '...\dsh-mobile-host_tmp_7568_10' -> '...\dsh-mobile-host'— including with the server stopped, i.e. not a file-lock story: pnpm's bookkeeping never settled, so every run tried to re-import the samefile:dependency over the existing directory. Installing an unrelated plugin through the same path hit it too. Recovery was manual: park the target directory aside, let the install run to completion, restore it. The staging residue that survived those attempts I had to delete by hand.Suggested directions
_tmp_*staging directories in afinally, and detect pre-existing ones before starting a run (a single detection makes the "poisoned profile" state visible instead of chronic).Question. Is the manifest intentionally left modified on failure so a retry can resume? And is the
_tmp_*residue expected to be cleaned by a later successful run? On my machine it was not, and the later runs failed the same way.All reactions