Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve user experience of the Updater by changing order of operations (WIP/RFC) #525

Open
joshtrichards opened this issue Jan 9, 2024 · 1 comment

Comments

@joshtrichards
Copy link
Member

  • Some steps are more likely to take longer than others
  • Some steps make others unnecessary if they fail (e.g. if the update can't be downloaded or extracted)

e.g.

  1. checkForExpectedFilesAndFolders()
  2. checkWritePermissions()
  3. downloadUpdate()
  4. verifyIntegrity()
  5. extractDownload()
  6. createBackup() <---- moves here from step 3
  7. setMaintenanceMode()
  8. replaceEntryPoints()
  9. deleteOldFiles()
  10. moveNewVersionInPlace()
  11. setMaintenanceMode
  12. finalize

The current order is as follows:

updater/index.php

Lines 1335 to 1372 in 4d660d8

switch ($step) {
case 1:
$updater->checkForExpectedFilesAndFolders();
break;
case 2:
$updater->checkWritePermissions();
break;
case 3:
$updater->createBackup();
break;
case 4:
$updater->downloadUpdate();
break;
case 5:
$updater->verifyIntegrity();
break;
case 6:
$updater->extractDownload();
break;
case 7:
$updater->setMaintenanceMode(true);
break;
case 8:
$updater->replaceEntryPoints();
break;
case 9:
$updater->deleteOldFiles();
break;
case 10:
$updater->moveNewVersionInPlace();
break;
case 11:
$updater->setMaintenanceMode(false);
break;
case 12:
$updater->finalize();
break;
}

Other considerations:

  • maintenance mode / end-users hitting the server
  • entrypoint replacement timing
@joshtrichards
Copy link
Member Author

Related: #386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant