When looking for upgradeable installed plugins, check only on name #3125
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.
Fixes #3124
This addresses a situation where a plugin is in the registry, but a user has a plugin version that is not in the plugins registry (such as a canary or preview release installed from a URL). Such a plugin can be upgraded using an explicit name (
spin plugins upgrade befunge2wasm
), but is not displayed in the multiselect experience (spin plugins upgrade
with no arguments). This is surprising and unhelpful - especially since the badger does detect the available upgrade and tells the user about it.The incorrect behaviour occurs because the "which installed plugins have upgrades" routine starts by looking for installed plugin manifests which also appear in the registry. For a version that was never in the registry, that check fails, so the plugin is not even checked for upgradability. The correct check is likely on "which installed plugin names also appear in the registry." This seems to align with badger and named upgrade behaviour.
The existing behaviour does not seem to be by design - I can find no discussion on the original PR arguing for why full manifest match rather than name match. So I don't think we'll be breaking any assumptions by aligning the multiselect to the name check.
Come at me, Hubris, I'm ready.