Review main Merged

85672[FEATURE] Add console command to mark upgrade wizards as undone

Till Hörner CR +2 V +2 Normal +134 −0 updated 09/04/24, 18:34

Commit message

A new CLI command `typo3 upgrade:mark:undone` has been introduced
that allows to mark a previously executed upgrade wizard as undone
so it can be run again. This makes the existing functionality
from the install tool also available on CLI.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Simon Praetorius +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Simon Praetorius +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1419

  1. Till Hörner uploaded patch set 1 08/18/24, 09:55

  2. core-ci voted on patch set 1 V +1 08/18/24, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63698

  3. Till Hörner uploaded patch set 2 V +1 08/19/24, 07:14

  4. core-ci voted on patch set 2 V +1 08/19/24, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63752

  5. Garvin Hicking commented on patch set 2 08/19/24, 15:28

    How would you feel about introducing a command to reset wizards instead? Maybe even mark multiple ones as fresh again, with a name matching pattern ("custom*", "*custom*), or even "--all"? I am a bit afraid that a "force" option to a wizard may lead people into thinking the pretequisites of a wizard could be overridden, or they might always add "--force" into script calls and possibly create trouble by executing a wizard a second time. Performing a reset specifically could help to prevent that maybe, and allow chaining of commands, and also re-execute multiple wizards instead of one? Generally I do feel the CLI needs to do some catchup on what the Web GUI allows, so thanks for your effort already! :)
  6. Till Hörner commented on patch set 2 08/19/24, 17:52

    Reply

    Personally I was used to this behaviour from the TYPO3 Console Extension (https://github.com/TYPO3-Console/TYPO3-Console/blob/main/Classes/Console/Command/Upgrade/UpgradeRunCommand.php#L96). But from version 8.0.0 the custom upgrade:run command was removed and replaced with the core command, which does not have this option. So having this in core would be nice and I'd argue that many other developers are already familiar with the force option too, as the extension is quite popular.
  7. Garvin Hicking commented on patch set 2 08/19/24, 19:42

    Reply

    Ah, I see. I didn't knowingly use typo3-console for that. I wonder if it would also make sense then to migrate more of that allow/deny typo3-console functionality, too (could be further patches). Hope we can get some more opinions here :)
  8. Garvin Hicking commented on patch set 2 08/27/24, 19:15

    Reply

    Small update: We discussed this internally without a clear consent. We feel that probably to align with the GUI in the backend it would be more "sane" to reflect functionality there, which means: introduce a "upgrade:markUndone" command. So, the goal would be to replicate the GUI functionality for the CLI, with the same methodology: Either execute a wizard ... or mark a wizard as "I don't want this" (like installing EXT:compatibility in the past) ... or "leave it hanging around" Plus, the GUI allows to mark an executed wizard as undone, so it can be executed again. Adding a "force" option to this command could trick people into thinking "I add this --force command always, to make sure the wizard runs", but then wizards could accidentally run twice. What do you or others think?
  9. Benni Mack commented on patch set 2 08/28/24, 13:26

    please make this a Feature (and let's have it in before v13 Feature Freeze)
  10. Christian Kuhn commented on patch set 2 CR -1 08/28/24, 13:29

    Reply

    i'm in favor of having a mark undone that fails if a wizard is not marked done and not have this 'force' flag. reason: i don't want --force to be used extensively, people should think about why they want to re-run a wizard that is marked as done - it is usually a sign something else is wrong (for instance in deployment, or the wizard itself).
  11. Till Hörner uploaded patch set 3 CR -1 V +1 08/28/24, 18:18

  12. core-ci voted on patch set 3 V +1 08/28/24, 18:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64435

  13. Garvin Hicking uploaded patch set 4 V +1 08/29/24, 15:36

  14. core-ci voted on patch set 4 V -1 08/29/24, 15:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64483

  15. core-ci voted on patch set 4 V +1 08/29/24, 16:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64483

  16. Garvin Hicking commented on patch set 4 CR +1 V +1 08/29/24, 19:16

    Reply

    Done
    Great work, thanks for getting to it directly. I renamed it to go along the other core CLI commands, which do not utilize uppercasing, plus a small wording chsnge, hope that's ok.
  17. Simon Praetorius voted on patch set 4 CR +1 V +1 09/04/24, 17:35

  18. Stefan Bürk commented on patch set 4 CR +2 V +2 09/04/24, 18:34

    @thoerner@3pc.de thanks for the change and taking care of the adoption requested. We still need to move the whole upgrade stuff (cli, interfaces, commands etc) to ext:core, but that should not be a blocker for this feature right now.
  19. Stefan Bürk merged patch set 5 09/04/24, 18:34