fix(reset): drop stale processed files on the reset target - #49
Open
maikschneider wants to merge 2 commits into
Open
fix(reset): drop stale processed files on the reset target#49maikschneider wants to merge 2 commits into
maikschneider wants to merge 2 commits into
Conversation
sys_file_processedfile sits in the default ignore_tables_out of sourcebroker/deployer-typo3-database, so the dump carries no rows for it and the target keeps its own. After the import those rows point at the old originalfilesha1 while sys_file.sha1 holds the source value, so ProcessedFile::needsReprocessing() flags the record deleted and only updateWithLocalFile() would clear the flag again - which the early return in LocalImageProcessor never reaches. The frontend then dies with "File has been deleted." (1329821486). Projects using ichhabrecht/filefill hit this hardest: filefill re-downloads the processed file inside exists(), so the delete() branch is taken and the leftover file in _processed_ survives every reset (the rclone copy never deletes). Run cleanup:localprocessedfiles --all after the import to drop both the records and the files.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAfter the database import, the reset job runs TYPO3’s Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@reset.yml`:
- Line 147: Review the reset workflow around the cleanup:localprocessedfiles
command and confirm whether the --all scope is intended. If full regeneration is
not required, replace it with a supported targeted reconciliation; otherwise
document or enforce running this destructive operation during a maintenance
window while preserving the existing target selector and non-interactive
options.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sys_file_processedfile sits in the default ignore_tables_out of sourcebroker/deployer-typo3-database, so the dump carries no rows for it and the target keeps its own. After the import those rows point at the old originalfilesha1 while sys_file.sha1 holds the source value, so ProcessedFile::needsReprocessing() flags the record deleted and only updateWithLocalFile() would clear the flag again - which the early return in LocalImageProcessor never reaches. The frontend then dies with "File has been deleted." (1329821486).
Projects using ichhabrecht/filefill hit this hardest: filefill re-downloads the processed file inside exists(), so the delete() branch is taken and the leftover file in processed survives every reset (the rclone copy never deletes).
Run cleanup:localprocessedfiles --all after the import to drop both the records and the files.
Summary by CodeRabbit