Skip to content

Orphaned Assets Fix#4119

Open
yugalkaushik wants to merge 4 commits into
processing:developfrom
yugalkaushik:orphaned-assets
Open

Orphaned Assets Fix#4119
yugalkaushik wants to merge 4 commits into
processing:developfrom
yugalkaushik:orphaned-assets

Conversation

@yugalkaushik
Copy link
Copy Markdown
Contributor

Issue:

Completes #4107

This change adds a pending-upload workflow for user assets so files are not permanently stored until a project is successfully saved. It also adds rollback for failed clones and a scheduled cleanup path for abandoned pending uploads. Uploaded assets now go to a pending S3 prefix first, are committed into the final user/project location on save, and are removed later if they stay pending too long. The cleanup threshold is 7 days, and the server checks for stale pending assets once every 24 hours.

Demo:

preview-orphanedassets.mp4

Changes:

  • Uploads are signed into pending/{userId}/... using the authenticated user id.
  • Project creation and project updates both commit any pending assets after a successful save.
  • Clone failures delete copied S3 assets so partial clone attempts do not leave leftovers behind.
  • A scheduled cleanup job scans for stale pending assets and deletes them after the retention window.
  • Pending uploads are kept for 7 days before they become eligible for cleanup.
  • The cleanup job runs every 24 hours, so stale pending assets are removed automatically without requiring a manual save or manual cleanup.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant