Skip to content

Feature/resume upload from breakpoint#510

Merged
aaperis merged 7 commits intomainfrom
feature/resume-upload-from-breakpoint
Mar 4, 2025
Merged

Feature/resume upload from breakpoint#510
aaperis merged 7 commits intomainfrom
feature/resume-upload-from-breakpoint

Conversation

@aaperis
Copy link
Copy Markdown
Contributor

@aaperis aaperis commented Feb 18, 2025

Related issue(s) and PR(s)
This PR closes #461 .

Description
A new boolean flag --continue is added. If provided, the sda-cli will not throw an error when trying to upload an already uploaded file. Instead, it will return a message that a file is already uploaded and will skip it during upload and continue with the next one.

This is a more generic fix than just implementing the same functionality only for recursive upload of folders since now this works also for a list of files given as arguments. I also chose to name the flag --continue instead of --resume because it seems more accurate since --resume may be understood as resuming partial uploads which is not the case.

I also did some small refactoring to the logic of force-overwrite so that if this flag is used the code will not try to check if files are already uploaded, thus saving some resources here.

How to test
Tests added as integration tests. These should pass.

@aaperis aaperis force-pushed the feature/resume-upload-from-breakpoint branch 2 times, most recently from cbe99bf to 7d08577 Compare February 18, 2025 15:25
@aaperis aaperis marked this pull request as ready for review February 18, 2025 17:01
@aaperis aaperis requested a review from a team February 18, 2025 17:04
@aaperis aaperis self-assigned this Feb 18, 2025
Comment thread upload/upload.go Outdated
Comment thread upload/upload.go Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Copy link
Copy Markdown
Contributor

@nanjiangshu nanjiangshu left a comment

Choose a reason for hiding this comment

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

Work great when I tested manually! I added a few comments about the messages and also the README for potential clarification and improvement.

Copy link
Copy Markdown
Member

@MalinAhlberg MalinAhlberg left a comment

Choose a reason for hiding this comment

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

Great! Except for the comments from @nanjiangshu, I think it looks all good and works well when tested.

@aaperis aaperis force-pushed the feature/resume-upload-from-breakpoint branch from 52ee932 to ade8a1f Compare February 25, 2025 09:38
@aaperis
Copy link
Copy Markdown
Contributor Author

aaperis commented Feb 25, 2025

Work great when I tested manually! I added a few comments about the messages and also the README for potential clarification and improvement.

Thanks for the suggestions @nanjiangshu! I added all of them and I think the text is now much improved.

@aaperis aaperis force-pushed the feature/resume-upload-from-breakpoint branch from ade8a1f to e203e49 Compare February 25, 2025 09:41
@aaperis aaperis requested a review from nanjiangshu February 25, 2025 09:42
Copy link
Copy Markdown
Contributor

@nanjiangshu nanjiangshu left a comment

Choose a reason for hiding this comment

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

Looks great now!

@aaperis aaperis force-pushed the feature/resume-upload-from-breakpoint branch from e203e49 to 000fb34 Compare March 4, 2025 11:44
@aaperis aaperis added this pull request to the merge queue Mar 4, 2025
Merged via the queue into main with commit 4b12245 Mar 4, 2025
6 checks passed
@aaperis aaperis deleted the feature/resume-upload-from-breakpoint branch March 4, 2025 11:49
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.

[Upload] Resume from the previous breakpoint when recursively uploading a folder

3 participants