Review main Merged

70829[BUGFIX] Add uid sorting only if needed in impexp export

Stefan Bürk CR +2 V +2 Easy +6 −4 updated 08/31/21, 11:02

Commit message

Add uid as sorting criteria, if not already there for
export data retrievement to get determistic sorting
across dbms and dbms versions.

$ Build/Scripts/runTests.sh -s functional -d mssql \
  typo3/sysext/impexp/Tests/Functional/ImportExportTest.php

Review

  • Code review CR +2 Done
    • Tymoteusz Motylewski +2
    • Jonas Eberle +1
    • Alexander Nitsche +1
  • Verified V +2 Done
    • Tymoteusz Motylewski +2
    • Jonas Eberle +1
    • Alexander Nitsche +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1114

  1. Stefan Bürk uploaded patch set 1 08/31/21, 07:48

  2. Stefan Bürk updated the commit message in patch set 2 08/31/21, 07:49

  3. core-ci voted on patch set 1 V +1 08/31/21, 08:01 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15909

  4. core-ci voted on patch set 2 V +1 08/31/21, 08:09 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15910

  5. Jonas Eberle voted on patch set 2 V +1 CR +1 08/31/21, 08:22

  6. Andreas Kienast voted on patch set 2 CR +1 08/31/21, 08:59

  7. Alexander Nitsche commented on patch set 2 08/31/21, 09:50

    Would you be fine with adapting the code to ``` $orderBys = QueryHelper::parseOrderBy((string)$orderBy); foreach ($orderBys as $orderPair) { [$field, $order] = $orderPair; $queryBuilder->addOrderBy($field, $order); } // Ensure deterministic sorting if (!in_array('uid', array_column($orderBys, 0))) { $queryBuilder->addOrderBy('uid', 'ASC'); } ``` or ``` $isOrderedByUid = false; foreach (QueryHelper::parseOrderBy((string)$orderBy) as $orderPair) { [$field, $order] = $orderPair; $queryBuilder->addOrderBy($field, $order); if ($field === 'uid') { $isOrderedByUid = true; } } // Ensure deterministic sorting if (!$isOrderedByUid) { $queryBuilder->addOrderBy('uid', 'ASC'); } ``` ? (1) is removing temporary local variable (2) is renaming local variable to common "OrderedByX" scheme.
  8. Stefan Bürk uploaded patch set 3 08/31/21, 10:05

  9. Stefan Bürk commented on patch set 3 08/31/21, 10:08

    Reply Unresolved

    Fully fine with adapting it (1). Thank you for mentioning it. Was not happy with that local variable, too.
  10. core-ci voted on patch set 3 V +1 08/31/21, 10:20 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15919

  11. Alexander Nitsche commented on patch set 3 V +1 CR +1 08/31/21, 10:31

    tested by ``` Build/Scripts/runTests.sh -s functional -d mssql typo3/sysext/impexp/Tests/Functional Build/Scripts/runTests.sh -s functional -d postgres -k 12 typo3/sysext/impexp/Tests/Functional Build/Scripts/runTests.sh -s functional -d postgres -k 13 typo3/sysext/impexp/Tests/Functional ```
  12. Jonas Eberle voted on patch set 3 V +1 CR +1 08/31/21, 10:52

  13. Tymoteusz Motylewski voted on patch set 3 V +2 CR +2 08/31/21, 10:57

  14. Tymoteusz Motylewski merged patch set 4 08/31/21, 11:02