osf.io
osf.io copied to clipboard
[PLAT-701] Allow duplicate file names Google Drive
Purpose
Current when our API tries to retrieve a GoogleDrive file using it's name as a path it doesn't have enough information to distinguish two files of the same name in the same directory, so it errors. This PR corrects that.
Changes
- adds date modified/created to FileNode filter
QA Notes
The failing route here is /v2/nodes/<node_id>/files/googledrive/
Documentation
🐞 fix, no docs.
Side Effects
This is a little bit of a band-aid because conceivably two Google Drive files could have the same name, date created and date modified, even the same hash etc. But without WB sending GD's internal ID this is the best we can do, and will work in 99% of situations. We should probably do a search on prod to see that no identical twin file nodes exisit in GD already, if there are we'll have to make changes to WB.
Edit: a search revealed there are 16 files with the same path, name, date created and date modified, which is way less then 1% of gdrive files, but still concerning.
Ticket
https://openscience.atlassian.net/projects/PLAT/issues/PLAT-701?