Review main Merged

85101[BUGFIX] Ignore existing nested processing folder on creation

Mathias Brodala CR +2 V +2 Easy +18 −15 updated 01/14/25, 18:25

Commit message

The nested processing folder can be created by a parallel request
between check and creation. For this reason it is safe to ignore an
error if the folder already exists when attempting to create it. This
makes the folder creation idempotent.

Review

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

Issues 2

Files 2

Review log 2128

Show 23 earlier messages
  1. Mathias Brodala uploaded patch set 1 07/04/24, 10:01

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

  3. Garvin Hicking voted on patch set 1 CR +1 V +1 07/04/24, 10:37

  1. Mathias Brodala uploaded patch set 2 CR +1 V +1 07/05/24, 06:56

  2. core-ci voted on patch set 2 V +1 07/05/24, 07:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61018

  3. Benni Mack updated the commit message in patch set 3 V +1 10/18/24, 13:37

  4. Mathias Brodala updated the commit message in patch set 4 10/18/24, 14:22

  5. core-ci voted on patch set 3 V -1 10/18/24, 22:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68003

  6. Mathias Brodala rebased onto patch set 5 01/13/25, 11:50

  7. core-ci voted on patch set 5 V +1 01/13/25, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72326

  8. Christian Kuhn commented on patch set 5 01/13/25, 13:30

    ResourceStorage.php:2843

    catching global exceptions is almost always a code smell (except in error/exception handlers): doing this may hide other exceptions that should bubble up when they are true programming errors, or may lead to wrong handling. fal code suffers from various violations like this. in this case, i suggest to have a pre-patch that changes to a specific fal exception in getSubfolder() (i think we should do this anyway, but probably not in v12 (13?) anymore, at least if there is no hasSubFolder()), or to test subfolder existance using $processingFolder->getStorage()->hasFolderInFolder() here instead, or implement hasSubfolder() in Folder (which may give issues with parallel requests again?). what do you think?
  9. Mathias Brodala commented on patch set 5 01/13/25, 13:56

    ResourceStorage.php:2843 Reply

    Totally fine with me and desirable in the long term. I've seen you have started this here and commented: 87718: [WIP][TASK] Throw specific exception in Folder->getSubFolder() | https://review.typo3.org/c/Packages/TYPO3.CMS/+/87718
  10. Christian Kuhn commented on patch set 5 01/13/25, 14:06

    ResourceStorage.php:2843 Reply

    yeah. if we bring this in first, this patch can become clean in this regard in v14/main, and for v13/v12 we keep it "unclean", or use one of the other options.
  11. Mathias Brodala commented on patch set 5 01/13/25, 14:12

    ResourceStorage.php:2843 Reply

    A workaround for v13/v12 could be catching the \InvalidArgumentException as is and checking the exception code. Anything besides 1329836110 as thrown in Folder::getSubfolder() should be re-thrown.
  12. Christian Kuhn uploaded patch set 6 V +1 01/13/25, 18:10

  13. Christian Kuhn commented on patch set 6 01/13/25, 18:12

    ResourceStorage.php:2843 Reply

    guess this is fine in main now, is it? note we'll have to deal with v13/v12 differences when we settled on the main incarnation in this case.
  14. Christian Kuhn updated the commit message in patch set 7 01/13/25, 18:13

  15. core-ci voted on patch set 6 V +1 01/13/25, 18:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72374

  16. core-ci voted on patch set 7 V +1 01/13/25, 18:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72375

  17. Mathias Brodala commented on patch set 7 01/14/25, 09:17

    ResourceStorage.php:2843 Reply

    Acknowledged
  18. Mathias Brodala commented on patch set 8 V +1 01/14/25, 09:21

    Published edit on patch set 7.
  19. Mathias Brodala voted on patch set 8 CR +1 01/14/25, 09:22

  20. core-ci voted on patch set 8 V +1 01/14/25, 09:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72410

  21. Christian Kuhn voted on patch set 8 CR +1 V +1 01/14/25, 10:11

  22. Benni Mack voted on patch set 8 CR +1 V +1 01/14/25, 14:38

  23. Stefan Bürk voted on patch set 8 CR +1 V +1 01/14/25, 17:48

  24. Christian Kuhn voted on patch set 8 CR +2 V +2 01/14/25, 18:25

  25. Christian Kuhn merged patch set 9 01/14/25, 18:25