Repository navigation
Keep upgrading past a plugin that left the registry - #13
Merged
Merged
Conversation
Without this change, `atk upgrade --all` stops at the first installed registry plugin that the registry index does not list: registry.PluginNotFoundError escapes upgrade_all_plugins, main_cli prints "Unexpected error", and every plugin after it in the manifest is skipped. A plugin whose index entry outlives its directory (RegistryFetchError) stops the run the same way. upgrade_plugin turns both errors into UpgradeError, which both upgrade commands handle: --all counts a failure, upgrades the remaining plugins and exits 1, and the message names the command that removes the plugin.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Once the registry drops openmemory,
atk upgrade --allon a home with openmemory installed stops at that plugin withUnexpected error: Plugin 'openmemory' not found in registry, exits 1, and never reaches the plugins after it in the manifest. This change reports the plugin and carries on.upgrade_pluginwraps the fetch to staging. The registry'sPluginNotFoundErrorbecomes anUpgradeErrorwhose message names the fix,atk remove <dir>. An index entry whose directory is missing (RegistryFetchError) becomes anUpgradeErrorwith the registry's own message.UpgradeErrorand stay untouched.--allcounts the failure, upgrades the remaining plugins, and exits 1 on every run until the plugin is removed. A skip with exit 0 would hide a plugin that can never upgrade again.atk upgrade --allagainst a local registry that droppedremoved-plugin, withhealthy-pluginafter it in the manifest:Three tests in
tests/test_upgrade.py: one runsatk upgrade --allthrough the CLI and checks that the plugin after the removed one reaches its new ref, the summary line, and exit 1; two pin the exact message for each registry error.make checkpasses.Known limit: released atk versions crash the same way, so this needs a release before the registry change merges.