Skip to content

fix(core): improve app:update feedback and error handling - #63100

Draft
joshtrichards wants to merge 1 commit into
masterfrom
jtr/fix-occ-appUpdate-output
Draft

fix(core): improve app:update feedback and error handling#63100
joshtrichards wants to merge 1 commit into
masterfrom
jtr/fix-occ-appUpdate-output

Conversation

@joshtrichards

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Improve occ app:update's user-facing messages and per-app error handling, without changing its existing option contract.

Changes

  • Clarify command and option descriptions and improve messages for:
    • disabled app-store access;
    • an unavailable default app store;
    • missing apps or command targets;
    • available updates;
    • successful and failed updates;
    • apps that are already up to date.
  • Preserve explicit app-ID precedence over --all, as well as the legacy behavior where --showonly or --showcurrent without an app ID inspect all apps.
  • Catch exceptions escaping Installer::isUpdateAvailable() so one failed check no longer aborts an all-app run; remaining apps continue processing.
  • Return a nonzero exit code when an update check or update operation fails.
  • Avoid duplicate failure messages when an update throws an exception.

Known limitation: ordinary app-store fetch failures are still collapsed upstream into an empty result by AppFetcher and/or false by Installer. Consequently, this command still cannot distinguish those cases from a genuinely up-to-date app or another valid empty result, such as an administrator-configured app allowlist filtering out all apps. Improving that distinction is out of scope here and can be addressed later as part of an AppFetcher/result-model refactor.

Output examples

Scenario Before After
Already up to date calendar is up-to-date or no updates could be found App "calendar" is already up to date
Update available, --showcurrent calendar new version available: 5.3.0 (current version: 5.2.1) App "calendar": 5.2.1 → 5.3.0 available
Successful update calendar new version available: 5.3.0
calendar updated
App "calendar": update available (5.3.0)
App "calendar" updated successfully
Update failure calendar new version available: 5.3.0
Error: Download failed
calendar couldn't be updated
App "calendar": update available (5.3.0)
App "calendar" could not be updated: Download failed
Failed check during all-app run (uncaught exception; remaining apps not processed) App "calendar" could not be checked for updates: App store unavailable
App "contacts": update available (2.0.0)
App "contacts" updated successfully

The command returns exit code 1 when an update check or update operation fails, even if other apps succeed.

Compatibility: existing options remain unchanged.

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant