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

feat: Implement support for chunking v2 API #925

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

juliusknorr
Copy link
Contributor

@juliusknorr juliusknorr commented Sep 5, 2023

Implements #924

Tested locally to work with S3 primary storage with server master

@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #925 (8457782) into master (7f72e2d) will increase coverage by 0.55%.
The diff coverage is 90.00%.

❗ Current head 8457782 differs from pull request most recent head 9da6748. Consider uploading reports for the commit 9da6748 to get more accurate results

@@            Coverage Diff             @@
##           master     #925      +/-   ##
==========================================
+ Coverage   91.54%   92.10%   +0.55%     
==========================================
  Files           3        3              
  Lines          71       76       +5     
  Branches       11       14       +3     
==========================================
+ Hits           65       70       +5     
+ Misses          4        3       -1     
- Partials        2        3       +1     
Files Changed Coverage Δ
lib/utils/upload.ts 92.00% <75.00%> (+0.69%) ⬆️
lib/upload.ts 90.24% <100.00%> (ø)
lib/utils/config.ts 100.00% <100.00%> (ø)

Copy link
Contributor

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Nice! I like how small the changes look! Makes me feel good about the first implementation in the first place! 🚀

@skjnldsv
Copy link
Contributor

skjnldsv commented Sep 5, 2023

  • Coverage is a bit down, feel free to add a few more tests
  • A few typescripts issues:
Type 'undefined' is not assignable to type 'number'.

1 export const getMaxChunksSize = function(fileSize: number = undefined): number {
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lib/utils/upload.ts:15:129 - error TS2322: Type 'undefined' is not assignable to type 'string'.

15 export const uploadData = async function(url: string, uploadData: UploadData, signal: AbortSignal, onUploadProgress = () => {}, destinationFile: string = undefined): Promise<AxiosResponse> {
                                                                                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lib/utils/upload.ts:63:50 - error TS2322: Type 'undefined' is not assignable to type 'string'.

@skjnldsv skjnldsv added enhancement New feature or request 3. to review Waiting for reviews technical debt Technical issue labels Sep 5, 2023
@juliusknorr
Copy link
Contributor Author

Pushed type fixes and two more tests covering the relevant headers

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Sep 5, 2023
@skjnldsv skjnldsv merged commit 6ba4844 into master Sep 5, 2023
14 of 15 checks passed
@skjnldsv skjnldsv deleted the feat/chunking-v2 branch September 5, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request technical debt Technical issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants