Review main Merged

64509[BUGFIX] Report database migration errors in upgrade wizard

Benjamin Franzke CR +2 V +2 Normal +42 −16 updated 10/01/21, 17:57

Commit message

When errors occur during the upgradeWizardsBlockingDatabaseExecute
ajax action, we now report SQL errors that occurred to the
integrator and pause further processing of upgrade wizards as some
wizards depend on an updated database structure.

The integrator may then decide to retry the migration
or to continue despite of errors.

An example:
If `slug` can not be added to the `pages` table, the
PopulatePageSlugs wizard will fail in updateNeccessary().
This causes all upgrades to be blocked but the cause
of the problem – why pages.slug is missing (e.g. because row size
is too large) – is not presented to the integrator.

Rather report these errors now and stop further processing
(which likely leads to a followup-error which is then hard to debug).

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Markus Klein +1
    • Oliver Hader +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Markus Klein +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 2127

Show 12 earlier messages
  1. Benjamin Franzke uploaded patch set 1 05/18/20, 05:10

  2. TYPO3com voted on patch set 1 V -1 05/18/20, 05:23 Completed build in 12m 50s on Mon, 18 May, 05:23 AM Test Summary: 1 of 74212 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3415

  1. TYPO3com voted on patch set 1 V +1 05/18/20, 06:47 Completed build in 12m 57s on Mon, 18 May, 06:47 AM Test Summary: 73727 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3417

  2. Oliver Hader commented on patch set 1 05/18/20, 10:46

    UpgradeController.php:1000

    What do you think about keep the boolean for success, but introduce a new messages key. ``` success => false, messages => $messages ?? [] ```
  3. Benjamin Franzke commented on patch set 1 05/18/20, 11:50

    UpgradeController.php:1000 Reply

    Actually success is still boolean (as calculated by `count($errors) === 0`). 'messages' would be a better name for 'status', yea, but we're then only talking about a naming change, right? As all the actions in UpgradeController already use 'success' => (bool) and 'status' => (array), I would rather not change this in this commit, as that would be a global naming change instead.
  4. Oliver Hader commented on patch set 1 05/18/20, 12:38

    UpgradeController.php:1000 Reply

    My bad... I overlooked that... please ignore my previous comments :/
  5. Oliver Hader voted on patch set 1 CR +1 05/18/20, 12:42

  6. Benni Mack updated the commit message in patch set 2 05/25/20, 18:52

  7. Benjamin Franzke uploaded patch set 3 06/04/20, 08:55

    Rebase
  8. TYPO3com voted on patch set 3 V +1 06/04/20, 09:09 Completed build in 13m 43s on Thu, 4 Jun, 09:09 AM Test Summary: 72835 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3811

  9. Benjamin Franzke uploaded patch set 4 09/16/21, 23:03

  10. Benjamin Franzke commented on patch set 4 09/16/21, 23:03

    UpgradeController.php:1000 Reply

    Ack
  11. Benjamin Franzke commented on patch set 4 09/16/21, 23:04

    I have now updated this patch to be more user friendly and robust: The error is printed and the user may choose to retry the migration or to proceed to upgrade wizards dispite of errors. This is useful if the sql error is actually non-fatal for the upgrade, but it is still very important for the user to *see* that error. This patch can be easily tested by adding a table to an ext_table.sql that exceeds the rowsize. Example: CREATE TABLE dummy_table ( dummy_field01 varchar(1024) DEFAULT '' NOT NULL, dummy_field02 varchar(1024) DEFAULT '' NOT NULL, dummy_field03 varchar(1024) DEFAULT '' NOT NULL, dummy_field04 varchar(1024) DEFAULT '' NOT NULL, dummy_field05 varchar(1024) DEFAULT '' NOT NULL, dummy_field06 varchar(1024) DEFAULT '' NOT NULL, dummy_field07 varchar(1024) DEFAULT '' NOT NULL, dummy_field08 varchar(1024) DEFAULT '' NOT NULL, dummy_field09 varchar(1024) DEFAULT '' NOT NULL, dummy_field10 varchar(1024) DEFAULT '' NOT NULL, dummy_field11 varchar(1024) DEFAULT '' NOT NULL, dummy_field12 varchar(1024) DEFAULT '' NOT NULL, dummy_field13 varchar(1024) DEFAULT '' NOT NULL, dummy_field14 varchar(1024) DEFAULT '' NOT NULL, dummy_field15 varchar(1024) DEFAULT '' NOT NULL, dummy_field16 varchar(1024) DEFAULT '' NOT NULL, dummy_field17 varchar(1024) DEFAULT '' NOT NULL, dummy_field18 varchar(1024) DEFAULT '' NOT NULL, dummy_field19 varchar(1024) DEFAULT '' NOT NULL, dummy_field20 varchar(1024) DEFAULT '' NOT NULL, dummy_field21 varchar(1024) DEFAULT '' NOT NULL, dummy_field22 varchar(1024) DEFAULT '' NOT NULL, dummy_field23 varchar(1024) DEFAULT '' NOT NULL, dummy_field24 varchar(1024) DEFAULT '' NOT NULL, dummy_field25 varchar(1024) DEFAULT '' NOT NULL, dummy_field26 varchar(1024) DEFAULT '' NOT NULL, dummy_field27 varchar(1024) DEFAULT '' NOT NULL, dummy_field28 varchar(1024) DEFAULT '' NOT NULL, dummy_field29 varchar(1024) DEFAULT '' NOT NULL, dummy_field30 varchar(2024) DEFAULT '' NOT NULL );
  12. Benjamin Franzke updated the commit message in patch set 5 09/16/21, 23:05

  13. core-ci voted on patch set 5 V +1 09/16/21, 23:27 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16840

  14. Markus Klein updated the commit message in patch set 6 09/17/21, 06:15

  15. Markus Klein commented on patch set 6 09/17/21, 06:17

    UpgradeController.php:1081

    instead of this check we could use the filtered array from 1073 here as well
  16. core-ci voted on patch set 6 V +1 09/17/21, 06:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16849

  17. Benjamin Franzke uploaded patch set 7 09/17/21, 06:30

  18. Benjamin Franzke commented on patch set 7 09/17/21, 06:30

    UpgradeController.php:1081 Reply

    Ack (done)… And thanks for fixing those blatant typos…
  19. core-ci voted on patch set 7 V +1 09/17/21, 06:45 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16851

  20. Markus Klein commented on patch set 7 V +1 CR +1 09/17/21, 07:10

    I don't have a way to test this currently. But the change is rather small and easy to understand, hence I vote v+1 as well.
  21. Benjamin Franzke commented on patch set 7 09/17/21, 09:34

    Reply

  22. Benni Mack voted on patch set 7 V +1 CR +1 10/01/21, 10:00

  23. Benjamin Franzke voted on patch set 7 V +2 CR +2 10/01/21, 17:55

  24. Benjamin Franzke merged patch set 8 10/01/21, 17:55

  25. Oliver Hader voted on patch set 8 CR +1 10/01/21, 17:57