Skip to content

refactor(app): finalize app upgrade state before queueing follow-up jobs#61536

Draft
joshtrichards wants to merge 1 commit into
masterfrom
jtr/appManager-upgrade-ordering
Draft

refactor(app): finalize app upgrade state before queueing follow-up jobs#61536
joshtrichards wants to merge 1 commit into
masterfrom
jtr/appManager-upgrade-ordering

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Jun 23, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

This change adjusts the app upgrade flow in AppManager so that app metadata, config lexicon updates, and the installed_version are finalized before live-migration and background jobs are queued.

This avoids scheduling background repair work while the app is still in an intermediate upgrade state and makes the upgrade sequence more consistent and safer.

With this ordering, installed_version more accurately reflects that synchronous upgrade work completed successfully, and deferred work is clearly treated as follow-up.

TODO

  • Confirm live migrations don't assume pre-upgrade version access in their logic
  • Confirm config lexicon migrations don't assume/need pre-upgrade version

Checklist

AI (if applicable)

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

@joshtrichards joshtrichards changed the title fix(apps): reorder app upgrade steps during app upgrade refactor(app): finalize app upgrade state before queueing follow-up jobs Jun 23, 2026
Comment on lines 1122 to 1123
$this->clearAppsCache();
$this->getAppVersion($appId, false);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe these are necessary, but not being certain I left as-is.

Side note: clearAppsCache() is a bit of a misleading name since it doesn't cover all cached bits.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards force-pushed the jtr/appManager-upgrade-ordering branch from 1aa28b4 to a2ef58c Compare June 23, 2026 20:22
@susnux susnux added the community pull requests from community label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress community pull requests from community feature: apps management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants