91316[BUGFIX] Prevent CLI cleanup:localprocessedfiles cleaning all files
Commit message
Review
-
Code review CR +2 Done
- Helmut Hummel +2
- Garvin Hicking +1
-
Verified V +2 Done
- Helmut Hummel +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 4
- Bug #107864cleanup:localprocessedfiles always wipes all processed files
- Bug #107892Fix paths in CleanUpLocalProcessedFilesTest fixture
- Task #102582Command cleanup:localprocessedfiles should be able to cleanup all records
- Bug #106002PathUtility::stripPathSitePrefix generates invalid paths for symlinked document root
Files 4
- typo3/sysext/lowlevel/Classes/Service/CleanUpLocalProcessedFilesService.php+1 −5
- typo3/sysext/lowlevel/Tests/Functional/Clean/CleanUpLocalProcessedFilesTest.php+2 −4
- typo3/sysext/lowlevel/Tests/Functional/Fixtures/DataSet/sys_file_processedfile.csv5+3 −2
- typo3/sysext/lowlevel/Tests/Functional/Fixtures/Modify/oneDeleted.csv+2 −0
Review log 1724
-
Česlav Przywara uploaded patch set 1 10/28/25, 17:23
-
core-ci voted on patch set 1 V +1 10/28/25, 17:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87869
-
Garvin Hicking commented on patch set 1 10/28/25, 19:23
we should dig deeper here, fixing the fixture like this patxh without any failures is definitely a bad smell, we should rather fix the test including the fixture - or use completely obvious faked paths if they don't matter do not give the impression the paths are properly built and evaluated -
Česlav Przywara commented on patch set 1 10/29/25, 09:32
Reply
I too expected some failure to pop up... I'll try to spin up the functional tests locally and see whether I can wrap my head around the test and then maybe come with some improvements. -
Česlav Przywara uploaded patch set 2
V +110/29/25, 10:22 -
core-ci voted on patch set 2 V -1 10/29/25, 10:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87934
-
Česlav Przywara commented on patch set 2 10/29/25, 10:47
Reply
I found out that not only processed image path was incorrect in fixture data, but also storage UID. I fixed both, updated fixture data for databaseRecordForMissingFileIsDeleted test and also updated related asserts in two other test methods. The functional tests suite fails now, but the failure is due to the issue #107864 that got me investigating the test in the first place. Patch incoming. -
Česlav Przywara uploaded patch set 3
V -110/29/25, 11:07 -
core-ci voted on patch set 3 V +1 10/29/25, 11:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87946
-
Garvin Hicking updated the commit message in patch set 4
V +110/29/25, 13:14 -
Garvin Hicking updated the commit message in patch set 5 10/29/25, 13:16
-
Garvin Hicking commented on patch set 5 10/29/25, 13:18
sys_file_processedfile.csv:4What about this path, this is also having an "invalid" path? Will need to wrap my head around this, but thanks already for investigating and proposing a patch! Since the tests were introduced with my "--all" patch I really need to figure this out and remember :-) -
core-ci voted on patch set 4 V +1 10/29/25, 13:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87967
-
core-ci voted on patch set 5 V +1 10/29/25, 13:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87969
-
Česlav Przywara commented on patch set 5 10/29/25, 14:56
sys_file_processedfile.csv:4ReplyThis entry has an "invalid" path on purpose. As the filename suggests, it refers to non-existing file. The databaseRecordForMissingFileIsDeleted test runs the clean-up command without --all option, so only entries for which there are no processed files found (ie. with missing files like this one) should be deleted from database. In the databaseRecordForMissingFileIsDeleted test, database state is compared against oneDeleted.csv fixture - as the filename suggests, one entry should be deleted in comparison to sys_file_processed.csv fixture. This wasn't the case before this patch, because the two "ReferencedImage" entries has been deleted as well due to invalid storage UID and path. That is why after fixing storage UID and path I had added both entries to oneDeleted.csv as well. I hope this is clearer now. The tests as such are well thought-out, the problem was likely introduced due copy-paste with haste :-) -
Garvin Hicking updated the commit message in patch set 6
V +110/29/25, 19:43 -
Garvin Hicking commented on patch set 6 CR +1 V +1 10/29/25, 19:45
sys_file_processedfile.csv:4ReplyYou are great! That helped me so much and I could finally find a few minutes to really go through it all. This works well. I hope you don't mind that I rephrased the commit message a bit with details for other reviewers and writing helps me a bit to process things. -
Stefan Bürk commented on patch set 6 10/29/25, 19:54
sys_file_processedfile.csv:4ReplyMaybe we should add a `#` comment above the line to explicitly state that the "path" is "invalid" by intention (explaining it). Just to avoid that at some one some what to update this to a valid one. -
core-ci voted on patch set 6 V +1 10/29/25, 19:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88037
-
Garvin Hicking commented on patch set 7
CR +1V +110/29/25, 20:51Published edit on patch set 6. -
Garvin Hicking commented on patch set 7 CR +1 V +1 10/29/25, 20:51
sys_file_processedfile.csv:4ReplyYeah sure, good idea! -
core-ci voted on patch set 7 V +1 10/29/25, 21:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88049
-
Helmut Hummel voted on patch set 7 CR +2 V +2 10/30/25, 07:16
-
Helmut Hummel merged patch set 8 10/30/25, 07:25