Review main Merged

89041[TASK] Mitigate database difference in json field test assertion

Stefan Bürk CR +2 V +2 Normal +68 −0 updated 04/10/25, 18:15

Commit message

Database vendors has different ways to work with native json
fields, so long supported, which includes different behaviours.
For example, `MariaDB` removes spaces between keys and values
in json data, while MySQL seems to resort json data in a weird
way or related behaviour.

This makes it hard, if not impossible, to assert database values
based on a single CSV set across different databases.

With #106532 tests have been added to verify the working state of
the upgrade wizard transforming serialized scheduler task data
into json fields and a nightly-test run would fail executing MySQL,
which pre-merge does not and revealed to manual nightly run
for another change.

This change overrides `FunctionalTestCase::getDifferentFields()`
to call added methods decoding, sorting and encoding hardcoded
scheduler table column json data to provide comparable datasets
for the tests. Not an ideal solution, but a legit and working
one for the meanwhile.

Can be tested isolated with/without this change using:

> Build/Scripts/runTests.sh -s functional -d mysql -- \
    --filter 'SchedulerDatabaseStorageMigrationTest'
> Build/Scripts/runTests.sh -s functional -d mariadb -- \
    --filter 'SchedulerDatabaseStorageMigrationTest'
> Build/Scripts/runTests.sh -s functional -d sqlite -- \
    --filter 'SchedulerDatabaseStorageMigrationTest'
> Build/Scripts/runTests.sh -s functional -d postgres -- \
    --filter 'SchedulerDatabaseStorageMigrationTest'

Review

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

Issues 2

Files 1

Review log 1217

  1. Stefan Bürk uploaded patch set 1 04/10/25, 16:04

  2. Stefan Bürk uploaded patch set 2 04/10/25, 16:09

  3. core-ci voted on patch set 1 V -1 04/10/25, 16:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77445

  4. core-ci voted on patch set 2 V +1 04/10/25, 16:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77446

  5. Stefan Bürk commented on patch set 2 04/10/25, 16:24

    Failing nightly job revealing this: https://git.typo3.org/typo3/CI/cms/-/jobs/4372616
  6. core-ci commented on patch set 2 04/10/25, 16:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77447

  7. Stefan Bürk commented on patch set 2 04/10/25, 17:09

    Reply

    Done
  8. Benni Mack voted on patch set 2 CR +1 V +1 04/10/25, 17:13

  9. Benni Mack updated the commit message in patch set 3 CR +1 V +1 04/10/25, 17:14

  10. Benni Mack voted on patch set 3 CR +1 V +1 04/10/25, 17:14

  11. Stefan Bürk updated the commit message in patch set 4 CR +1 V +1 04/10/25, 17:18

  12. Benni Mack voted on patch set 4 CR +1 V +1 04/10/25, 17:19

  13. core-ci voted on patch set 3 V +1 04/10/25, 17:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77451

  14. core-ci voted on patch set 4 V +1 04/10/25, 17:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77452

  15. Wouter Wolters voted on patch set 4 CR +1 V +1 04/10/25, 17:31

  16. Stefan Bürk voted on patch set 4 CR +2 V +2 04/10/25, 18:15

  17. Stefan Bürk merged patch set 5 04/10/25, 18:15