fix(installer): re-enable version-incompatible apps after appstore update#60591
Draft
miaulalala wants to merge 1 commit into
Draft
fix(installer): re-enable version-incompatible apps after appstore update#60591miaulalala wants to merge 1 commit into
miaulalala wants to merge 1 commit into
Conversation
e0eac7b to
2503f7a
Compare
…pdate When a Nextcloud server is upgraded to a new major version, apps incompatible with the old version range are automatically disabled. Previously, updating such an app via the web UI (or occ app:update) would download and upgrade the app files but leave the app disabled, requiring a manual re-enable or reinstall. updateAppstoreApp() now checks whether the app was disabled due to version incompatibility before downloading the update. After a successful upgradeApp(), if those conditions were true, enableApp() is called automatically. Also adds debug logging to previously-silent return paths in isUpdateAvailable() (git-installed apps, no newer version found, app not in store), making update failures diagnosable from debug logs. Signed-off-by: Anna Larch <anna@nextcloud.com>
2503f7a to
ce489a2
Compare
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.
Summary
occ app:updatewould upgrade the files but leave the app disabled, requiring a manual re-enable or reinstall.updateAppstoreApp()now checks whether the app was disabled due to version incompatibility before downloading the update. After a successfulupgradeApp(), if those conditions were true,enableApp()is called automatically.return falsepaths inisUpdateAvailable()(git-installed app, no newer version, app not in store) — this was causing update failures to appear as "keine Hinweise" (no hints) in debug logs.Context
Reported in nextcloud/files_mindmap#269 — users upgrading from NC 31 to NC 32+ had
files_mindmapauto-disabled during the server upgrade (old version declaredmax-version="31"). Clicking "Update" in the web UI downloaded the new compatible release but did not re-enable the app, so it remained invisible/broken until manually re-enabled.cc @AndyScherzinger
Test plan
tests/lib/InstallerTest.phpcover the four cases: re-enable on incompatible-disabled, no re-enable on compatible-disabled (manually disabled), no re-enable on already-enabled, no re-enable when upgrade itself failsmax-versionbelow current NC, trigger server upgrade to auto-disable it, then update via web UI and confirm the app is re-enabledisUpdateAvailable()returns false🤖 Generated with Claude Code