Installing a plugin is done in place, with nothing to go back to #246
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#246
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out of #228, which fixed the four defects in that issue and deliberately left this
one alone: it is a piece of building rather than a repair, and half of it would be worse
than none.
run_installruns--target <the live plugins directory> --upgrade, so an upgradeoverwrites the working version before anything has checked that the new one even imports.
There is no staging directory, no import check, and no previous version kept — an upgrade
that fails leaves an instance with a plugin that cannot load and no way back except finding
the old wheel again.
remove()deletes only the files listed in the plugin's ownRECORD, so its dependenciesstay on the volume and stay importable for ever. Nothing counts who else is using them.
And
install_wheelwrites a constraint file holding only the core environment's pins, soinstalling one plugin can move a dependency another plugin is using. Nothing refuses it and
nothing says it happened; the other plugin simply starts failing.
Proposal
declares, in a subprocess, and swap only if that succeeds.
can roll back one that installed cleanly and turned out to be wrong.
dependencieslists before removing any.being installed, so a conflict is a refusal naming the plugin that owns the pin rather
than a silent breakage.
Touches
installing.run_install,install_wheel,remove,_paths_ofandconstraints.The record's
dependenciesfield already exists and is what the reference count should bebuilt from.