Review main Merged

83944[BUGFIX] Mitigate invalid exit code for UpgradeWizard without updates

Stefan Bürk CR +2 V +2 Normal +127 −33 updated 04/23/24, 22:30

Commit message

Wizards not marked as done, but not having updates, display a
notice `No changes applied, marking wizard as done.` when using
the CLI command `bin/typo3 upgrade:run <wizard-identifier>` and
return an error exit code. This also happen when not specifying
a single wizard, but running all available ones.

The GUI based upgrade execution behaves different, as it does not
return an exit code and does not display information about
`no changes applied`, like its CLI counterpart.

This change:

* Adds new concrete exception classes for the `upgrade:run`
  command.

* Modifies `UpgradeWizardCommand::getUpgradeWizard()` to
  throw now one of the new concrete exception or return a
  wizard instance to run.

* Skips available upgrade wizards not eligible to be executed.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1827

Show 2 earlier messages
  1. Stefan Bürk uploaded patch set 1 04/20/24, 23:55

  2. Stefan Bürk uploaded patch set 2 04/20/24, 23:58

  1. core-ci voted on patch set 1 V -1 04/21/24, 00:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56396

  2. core-ci voted on patch set 2 V +1 04/21/24, 00:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56397

  3. Stefan Bürk updated the commit message in patch set 3 V +1 04/21/24, 00:17

  4. core-ci voted on patch set 3 V +1 04/21/24, 00:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56398

  5. Garvin Hicking updated the commit message in patch set 4 V +1 04/21/24, 17:53

  6. core-ci voted on patch set 4 V +1 04/21/24, 17:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56437

  7. Thomas Hohn voted on patch set 4 CR +1 04/23/24, 09:21

  8. Christian Kuhn uploaded patch set 5 CR +1 V +1 04/23/24, 12:50

  9. core-ci voted on patch set 5 V +1 04/23/24, 12:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56577

  10. Christian Kuhn commented on patch set 5 CR -1 04/23/24, 12:58

    stefan will change another detail.
  11. Stefan Bürk uploaded patch set 6 CR -1 V +1 04/23/24, 14:31

  12. core-ci voted on patch set 6 V +1 04/23/24, 14:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56588

  13. Stefan Bürk commented on patch set 6 04/23/24, 14:40

    Reply

    nullable return for the getWizard() was not reasonable to communicate different things, thus replaced it with concrete and handled exceptions. That makes that now cleaner and more understandable.
  14. Christian Kuhn commented on patch set 6 04/23/24, 15:31

    WizardCreationError.php:18

    we often move exceptions to an own sub-folder, and exception classes always are like "SomethingException". i guess we should follow this scheme here as well?
  15. Stefan Bürk uploaded patch set 7 V +1 04/23/24, 16:17

  16. Stefan Bürk commented on patch set 7 04/23/24, 16:17

    WizardCreationError.php:18 Reply

    Done
  17. core-ci voted on patch set 7 V +1 04/23/24, 16:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56593

  18. Stefan Bürk uploaded patch set 8 V +1 04/23/24, 16:25

  19. core-ci voted on patch set 8 V +1 04/23/24, 16:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56594

  20. Stefan Bürk uploaded patch set 9 V +1 04/23/24, 16:31

  21. Christian Kuhn commented on patch set 9 CR +1 V +1 04/23/24, 16:32

    Reply

    Done
  22. core-ci voted on patch set 9 V +1 04/23/24, 16:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56595

  23. Benni Mack voted on patch set 9 CR +1 V +1 04/23/24, 20:18

  24. Stefan Bürk voted on patch set 9 CR +2 V +2 04/23/24, 22:17

  25. Stefan Bürk merged patch set 10 04/23/24, 22:30