Review main Merged

75163[FEATURE] Improve performance and usability while editing sys_filemounts

Frank Nägler CR +2 V +2 Hard +284 −132 updated 07/13/22, 19:31

Commit message

This patch combines the two fields base and path into a new field identifier.
In the backend UI, the new TCA type folder is used to select the folder.

This change improves the performance in the backend if the storage contains
a massive amount of folders and subfolders. Besides that, the usability is better
because of the browsing feature of the folder type.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 2

Files 18

Review log 3447

Show 1622 earlier messages
  1. Frank Nägler uploaded patch set 1 07/13/22, 08:57

  2. core-ci voted on patch set 1 V -1 07/13/22, 09:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29042

  3. Frank Nägler uploaded patch set 2 07/13/22, 09:30

  4. core-ci voted on patch set 2 V +1 07/13/22, 09:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29044

  5. Frank Nägler uploaded patch set 3 07/13/22, 10:22

  6. core-ci voted on patch set 3 V +1 07/13/22, 10:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29051

  7. Frank Nägler uploaded patch set 4 07/13/22, 10:33

  8. Frank Nägler marked it ready for review 07/13/22, 10:34

  9. core-ci voted on patch set 4 V +1 07/13/22, 10:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29053

  10. Benni Mack commented on patch set 4 07/13/22, 11:12

    SynchronizeFolderRelations.php:121

    personal preference: I'd just go with a simple string concatenation.

    FilemountsResult.csv.new:2

    strange filename...
  11. Frank Nägler commented on patch set 4 07/13/22, 11:38

    SynchronizeFolderRelations.php:121 Reply

    I hate simple string concatenation :D Anyway, what is the core way here?

    FilemountsResult.csv.new:2 Reply

    that is a mistake, I will fix it.
  12. Benni Mack commented on patch set 4 07/13/22, 12:27

    can you change this to "Resolves: #"
  13. Frank Nägler uploaded patch set 5 07/13/22, 12:28

  14. Frank Nägler commented on patch set 5 07/13/22, 12:29

    SynchronizeFolderRelations.php:121 Reply

    Ack
  15. Frank Nägler updated the commit message in patch set 6 07/13/22, 12:30

  16. Frank Nägler commented on patch set 5 07/13/22, 12:30

    Reply

    Ack
  17. core-ci voted on patch set 5 V +1 07/13/22, 12:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29060

  18. core-ci voted on patch set 6 V +1 07/13/22, 12:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29061

  19. Christian Kuhn commented on patch set 6 07/13/22, 13:08

    could you add a "why?" explanation to the commit message? it's not clear to me why we denormalize these fields. it looks as if base and path are still kept, so the new field now needs to be kept in sync. i think we should have well reasoned explanation to take these additional sync and data duplication risks. will base+path vanish? what do you think?

    FilemountsBase.csv:6

    what happens when there are one or multiple colon in 'path' part? add some dedicated tests to proof that still explodes as expected?
  20. Christian Kuhn commented on patch set 6 CR -1 07/13/22, 13:10

    StoragePermissionsAspect.php:65

    fails when 'path' part has a colon.
  21. Frank Nägler uploaded patch set 7 07/13/22, 14:09

  22. Benni Mack commented on patch set 7 07/13/22, 14:13

    StoragePermissionsAspect.php:65 Reply

    Done

    FilemountsResult.csv.new:2 Reply

    Done
  1. Benni Mack commented on patch set 7 07/13/22, 14:13

    FilemountsBase.csv:6 Reply

    Done
  2. Andreas Kienast commented on patch set 7 CR -1 07/13/22, 14:22

    on it
  3. core-ci voted on patch set 7 V +1 07/13/22, 14:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29066

  4. Andreas Kienast uploaded patch set 8 07/13/22, 14:26

  5. Oli Bartsch commented on patch set 8 07/13/22, 14:34

    sys_filemounts.php:62

    This did actually not work for me. Record could be saved without a folder selected.

    locallang_tca.xlf:286

    Not quite sure about the naming here. What do you think about "Mount point" or sth. like "Base identifier"?

    locallang_tca.xlf:291

    Should we remove the unused labels?

    SysFileMountIdentifierMigration.php:20

    This import is currently unused.

    SysFileMountIdentifierMigration.php:25

    Upgrade wizards should usually be well tested.

    SysFileMountIdentifierMigration.php:51

    We only need those having 'base' and 'path' set, while 'identifier' is not set. Vice versa in updateNecessary().

    SysFileMountIdentifierMigration.php:66

    Is this save on all DBMS? Any reason for not using query builder here?

    SysFileMountIdentifierMigration.php:71

    This could be prevented by checking for the existence of the column, using the schema manager.
  6. core-ci voted on patch set 8 V -1 07/13/22, 14:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29068

  7. Andreas Kienast uploaded patch set 9 07/13/22, 14:36

  8. core-ci voted on patch set 9 V +1 07/13/22, 14:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29070

  9. Christian Kuhn commented on patch set 9 07/13/22, 14:45

    locallang_tca.xlf:291 Reply

    yes please.
  10. Andreas Kienast commented on patch set 9 CR -1 07/13/22, 14:50

    on it again
  11. Andreas Kienast uploaded patch set 10 07/13/22, 15:31

  12. core-ci voted on patch set 10 V +1 07/13/22, 15:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29074

  13. Oli Bartsch uploaded patch set 11 07/13/22, 18:43

  14. Oli Bartsch commented on patch set 11 07/13/22, 18:45

    Reply

    Done

    sys_filemounts.php:62 Reply

    Done

    locallang_tca.xlf:286 Reply

    Done

    locallang_tca.xlf:291 Reply

    Done

    SysFileMountIdentifierMigration.php:20 Reply

    Done

    SysFileMountIdentifierMigration.php:20 Reply

    Done

    SysFileMountIdentifierMigration.php:25 Reply

    Done

    SysFileMountIdentifierMigration.php:51 Reply

    Done

    SysFileMountIdentifierMigration.php:66 Reply

    Done

    SysFileMountIdentifierMigration.php:71 Reply

    Done
  15. core-ci voted on patch set 11 V +1 07/13/22, 18:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29086

  16. Oli Bartsch commented on patch set 11 V +1 CR +1 07/13/22, 18:51

    SysFileMountIdentifierMigration.php:102

    We might want to skip records with base=0 since this is IMO not a valid base for a file mount. However, since we don't do sanity checks here at all, I would also be fine with skipping the following condition (just wanted to mention it): $queryBuilder->expr()->gt('base', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
  17. Benni Mack uploaded patch set 12 07/13/22, 19:11

  18. Benni Mack commented on patch set 12 V +1 CR +1 07/13/22, 19:12

    SysFileMountIdentifierMigration.php:102 Reply

    Done
  19. Oli Bartsch uploaded patch set 13 07/13/22, 19:19

  20. Oli Bartsch voted on patch set 13 V +1 CR +1 07/13/22, 19:19

  21. Christian Kuhn commented on patch set 13 CR +1 07/13/22, 19:20

    this reads good! thx!
  22. core-ci voted on patch set 12 V -1 07/13/22, 19:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29089

  23. core-ci voted on patch set 13 V +1 07/13/22, 19:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29093

  24. Benni Mack voted on patch set 13 V +2 CR +2 07/13/22, 19:31

  25. Benni Mack merged patch set 14 07/13/22, 19:31