Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

DDS-974 enforce upload chunk size #1075

Conversation

dmann
Copy link
Contributor

@dmann dmann commented Sep 15, 2017

No description provided.

mgardnerpsu and others added 15 commits September 15, 2017 15:40
  - chunk_max_number: integer
  - chunk_max_size_bytes:integer
  - :chunk_max_number
  - :chunk_max_size_byte
StorageProvider meets spec

:storage_providers factory creates storage_provider with these values set for both default and :swift

swift.local.env sets these to standard values
…ber and max_chunk_size_bytes

expects ENV to be set accordingly only if there are bad storage providers
…rialize StorageProvider with

chunk_max_number and chunk_max_size_bytes
StorageProviderSerializer meets spec
  - implement max_size_bytes (storage_provider.chunk_max_number * storage_provider.chunk_max_size_bytes)
  - validate that size is_less_than max_size_bytes
  - implement minimum_chunk_size ((size.to_f / storage_provider.chunk_max_number).ceil)

Upload meets spec

Chunks Factory creates Chunks with size between a sensible range

ChunkSpec expects Chunk to:
  - delegate chunk_max_size_bytes to storage_provider
  - delegate minimum_chunk_size to upload
  - validate size
     - presence
     - < chunk_max_size_bytes
     - >= minimum_chunk_size
     - produce custom validation message
Chunk meets spec
  - implement total_chunks method which returns the current number of upload.chunks
  - validate that a chunk must not increase the total_chunks beyond the
    storage_provider.chunk_max_number
Chunk meets spec
@dmann dmann requested a review from dmlond September 15, 2017 20:27
Copy link
Contributor

@dmlond dmlond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@dmlond dmlond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dmann dmann merged commit b8d3c26 into Duke-Translational-Bioinformatics:ua_test Sep 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants