-
Notifications
You must be signed in to change notification settings - Fork 196
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
[tests-only][full-ci] refactor: Set chunking version 1 as default #10624
Conversation
b069f78
to
9c95a8d
Compare
706ba6f
to
535bbaf
Compare
535bbaf
to
483a649
Compare
c351546
to
b171fbb
Compare
09a1979
to
73a01af
Compare
} | ||
|
||
//prepare chunking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what was done in this preparation?
//prepare chunking | |
//prepare chunking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$chunk
→ Returns array of file chunks(source file split into multiple chunks)
$chunkingId
→ Generates random identifier (e.g., "chunking-4567") and groups related chunks together
$result
→ Initializes variable to store upload response which will be updated during chunk upload process
Given using <dav-path-version> DAV path | ||
When user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API | ||
And user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API | ||
When user "Alice" uploads file "filesForUpload/davtest.txt" to "davtest.txt" with and without chunking using the WebDAV API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why uploading with and without at once?
When user "Alice" uploads file "filesForUpload/davtest.txt" to "davtest.txt" with and without chunking using the WebDAV API | |
When user "Alice" uploads file "filesForUpload/davtest.txt" to "davtest.txt" with and without chunking using the WebDAV API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scenario Outline: upload a file twice and versions are available using various chunking methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actual scenario: #10624 (comment)
); | ||
} | ||
foreach ([false, true] as $chunkingUse) { | ||
$finalDestination = $overwriteMode ? $destination : $destination . ($chunkingUse ? "-chunked" : ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, we should not need this.
$finalDestination = $overwriteMode ? $destination : $destination . ($chunkingUse ? "-chunked" : ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use $destination
directly as param in upload():
First upload (non-chunked):
- Path: davtest.txt
- Creates file: davtest.txt
Second upload (chunked):
- Temporary chunks: davtest.txt-chunking-4320-2-0, davtest.txt-chunking-4320-2-1
- Final assembled file: davtest.txt (overwrites original)
- Creates version because of overwrite
which makes the test fail for the step:
Then the version folder of file "davtest.txt" for user "Alice" should contain "0" elements
But if we use something like $finalDestination
:
First upload (non-chunked):
- Path: davtest.txt
- Creates file: davtest.txt
Second upload (chunked):
- Temporary chunks: davtest.txt-chunked-chunking-8951-2-0, davtest.txt-chunked-chunking-8951-2-1
- Final assembled file: davtest.txt-chunked
- No version created because files are separate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the mentioned step fails, we have to look at what is happening and maybe scenario is not clear.
as per the scenario, I thought the the different upload methods to create same file will not creat file versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's have a look together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After having closer look together with @saw-jan:
- refactored the scenarios from:
Scenario Outline: upload file and no version is available using various chunking methods (except new chunking),
Scenario Outline: upload a file twice and versions are available using various chunking methods (except new chunking)
to:
Scenario Outline: no version is available while uploading a file with multiple chunks
Scenario Outline: versions are available while uploading a file twice with multiple chunks
respectively for providing more clear sense.
- removed
uploadWithAllMechanisms
as it will be unused. - changed return types to
ResponseInterface
for consistency and better error handling.
73a01af
to
d9e2092
Compare
d9e2092
to
9f189d9
Compare
9f189d9
to
e4a8365
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
[tests-only][full-ci] refactor: Set chunking version 1 as default
[tests-only][full-ci] refactor: Set chunking version 1 as default
Description
This PR removes the
chunkingToUse
variable from the code-base which in turn makes the use of existing TUS chunk upload endpoint by default.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: