Add crash-recoverable image storage maintenance for moving existing images into the active image_subfolder_strategy#9165
Conversation
Findings
Open Questions
|
|
Summary of changes made after the most recent findings report and our Discord conversation:
|
99ed6fd to
56e6858
Compare
…ches/195698-1779142089/30883b334aa53bef1fcd4436ae272514940fd244
…ches/203614-1779142542/30883b334aa53bef1fcd4436ae272514940fd244
…ches/223674-1779144135/30883b334aa53bef1fcd4436ae272514940fd244
…ches/254629-1779146653/30883b334aa53bef1fcd4436ae272514940fd244
…ches/260019-1779147418/30883b334aa53bef1fcd4436ae272514940fd244
|
Recovery resumes the in-flight job only — pending un-planned items do not auto-continue While exercising the recovery path against a real image library, I noticed the following:
This may well be intentional — the PR description says "crash-recoverable", not "auto-resume" — but I'd suggest making the behavior explicit, since the UI returns to an idle/committed state after recovery and gives no hint that more work remains. Options:
Either way, it would prevent users from believing their migration is done when in fact only the in-flight batch was finalized. Everything else is going great so far. |
|
Implemented the incomplete-after-recovery signal. What changed:
|
…ches/270817-1779149406/30883b334aa53bef1fcd4436ae272514940fd244
…ches/470617-1779836147/30883b334aa53bef1fcd4436ae272514940fd244
…ches/474568-1779845939/30883b334aa53bef1fcd4436ae272514940fd244
…ches/490877-1779916988/30883b334aa53bef1fcd4436ae272514940fd244
…ches/16354-1780052531/30883b334aa53bef1fcd4436ae272514940fd244
…ches/38083-1780844042/30883b334aa53bef1fcd4436ae272514940fd244
…ches/2033130-1781242544/30883b334aa53bef1fcd4436ae272514940fd244
…ches/2411-1782087107/30883b334aa53bef1fcd4436ae272514940fd244
…ches/7563-1782183112/30883b334aa53bef1fcd4436ae272514940fd244
…ches/23272-1782233863/30883b334aa53bef1fcd4436ae272514940fd244
…ches/29270-1782263884/30883b334aa53bef1fcd4436ae272514940fd244
…ches/50049-1782323385/30883b334aa53bef1fcd4436ae272514940fd244
…ches/53346-1782332848/30883b334aa53bef1fcd4436ae272514940fd244
…ches/57122-1782342202/30883b334aa53bef1fcd4436ae272514940fd244
…ches/61563-1782382852/30883b334aa53bef1fcd4436ae272514940fd244
Summary
Adds crash-recoverable image storage maintenance for moving existing images into the active
image_subfolder_strategy.The feature includes:
scripts/image_storage_maintenance.py.docs/src/content/docs/features/image-storage-maintenance.mdx.Related Issues / Discussions
#8969
QA Instructions
Validated with focused backend and frontend checks.
To test manually, use a development install with a temporary InvokeAI root. Do not test this against an existing image library. You have been warned.
image_subfolder_strategy: flat.image_subfolder_strategyininvokeai.yamltodate,type, orhash.outputs/images/andoutputs/images/thumbnails/according to the configured strategy.External script path:
statusexits successfully when no job needs attention.moveis idempotent after the UI move has already completed.Recovery smoke test:
Expected behavior:
Merge Plan
No special merge sequencing expected. This adds a SQLite migration, so use the normal InvokeAI DB migration path.
Known limitation: the external script does not yet take an interprocess lock against a running InvokeAI process. Operators should run
scripts/image_storage_maintenance.pyonly while InvokeAI is stopped. The code includes a TODO to add this guard in a follow-up.An additional follow-up may also display a "busy" interface in the UI or allow chunked move operations to be safely performed in the background, synchronized with the UI.
Checklist
What's Newcopy (if doing a release after this PR)