Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File deletion v2 #1254

Merged
merged 7 commits into from
Feb 1, 2024
Merged

File deletion v2 #1254

merged 7 commits into from
Feb 1, 2024

Conversation

jabrah
Copy link
Contributor

@jabrah jabrah commented Jan 31, 2024

Could use an eye on error handling.

Error handling in general is a bit of a mess in pass-ui, but specifically for file deletion, we want to try to handle error cases where the File entity could get into a weird state:

  • Deletion of the file bytes has to be handled separately from removal of the File (metadata) entity in the database
  • File entity has a URI reference to the bytes, pointing to where the file service can operate on the file
  • Getting these two out of sync could be problematic in the Files step, submission review page, or submission details page

Changes

  • Provide custom File model adapter:
    • Call to FIle.destroyRecord will delete file bytes via the File Service before calling standard destroyRecord in the Ember store
  • Update/add tests for workflow-files component

@jabrah jabrah requested a review from jaredgalanis January 31, 2024 14:58
@jabrah jabrah requested a review from jaredgalanis January 31, 2024 18:55
@jabrah jabrah merged commit faada3c into main Feb 1, 2024
3 checks passed
@jabrah jabrah deleted the 514-file-deletion branch February 1, 2024 13:34
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.

2 participants