Skip to content

[ENG-11727] Corrupted file versions are unpreviewable, undownloadable, and undeletable#11820

Open
mkovalua wants to merge 3 commits into
CenterForOpenScience:feature/pbs-26-13from
mkovalua:fix/ENG-11727
Open

[ENG-11727] Corrupted file versions are unpreviewable, undownloadable, and undeletable#11820
mkovalua wants to merge 3 commits into
CenterForOpenScience:feature/pbs-26-13from
mkovalua:fix/ENG-11727

Conversation

@mkovalua

@mkovalua mkovalua commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Ticket

Purpose

A pattern of file version corruption has emerged across multiple projects. After a new version is uploaded, the file becomes unpreviewable, undownloadable, and impossible to delete — by the user and by support. Uploading additional versions doesn't fix it; metadata updates (date modified) but the file remains unretrievable. The broken versions are stuck and block users from recovering a working file.

Looks like what’s happening is if you check https://api.osf.io/v2/files/f42sc/ and look at its file versions https://api.osf.io/v2/files/697ec8ac74e08d03dccd76ea/versions/ we have multiple version 2s of the same file that seem identical but have a sliiightly different date_created, and that's causing problems with the system. We need to prevent that from happening and clean the data for the existing issues.

Changes

make create_version to avoid file version duplicates and get_version to return single file version;

create management command to dedupe (delete file versions duplicates);

Side Effects

QE Notes

CE Notes

Documentation

@mkovalua
mkovalua marked this pull request as draft July 20, 2026 14:12
@mkovalua
mkovalua changed the base branch from develop to feature/pbs-26-13 July 20, 2026 14:13
@mkovalua
mkovalua marked this pull request as ready for review July 21, 2026 15:15
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