Skip to content

Commit

Permalink
Merge pull request Sage-Bionetworks#717 from hallieswan/SWC-6676
Browse files Browse the repository at this point in the history
SWC-6676: S3 files stored in Synapse Storage have had their storageLocationId backfilled
  • Loading branch information
hallieswan authored Feb 19, 2024
2 parents e2f01ed + 577e731 commit 86c77bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,6 @@ describe('File Handle Utils', () => {
expect(result).toEqual('Synapse Storage')
})

it("Returns 'Synapse Storage' for a file with a null storage location id", () => {
const fileHandle: S3FileHandle = {
...mockFileHandle,
storageLocationId: null,
concreteType: S3_FILE_HANDLE_CONCRETE_TYPE_VALUE,
}
const result = getStorageLocationName(fileHandle, undefined)
expect(result).toEqual('Synapse Storage')
})
it('Returns an s3 path for an S3 file handle in a custom storage location', () => {
const fileHandle: S3FileHandle = {
...mockFileHandle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ export function getStorageLocationName(
fileHandle: FileHandle,
storageLocationUploadDestination: UploadDestination | undefined,
) {
// Uploads to Synapse Storage often do not get their storage location field back-filled,
// so null also indicates a Synapse-Stored file
if (
fileHandle.concreteType === S3_FILE_HANDLE_CONCRETE_TYPE_VALUE &&
fileHandle.storageLocationId === null
) {
return SYNAPSE_STORAGE
}

switch (fileHandle.concreteType) {
case PROXY_FILE_HANDLE_CONCRETE_TYPE_VALUE:
return (fileHandle as ProxyFileHandle).filePath
Expand Down

0 comments on commit 86c77bf

Please sign in to comment.