-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Objectstore transfer #36326
Objectstore transfer #36326
Conversation
2df0849
to
9d45834
Compare
To be double-checked:
|
We'll have to decide what to do with the versions. They'll likely need special handling because they aren't moved or copied by default, and you'll need to copy the versions one by one (and delete them also one by one if you want to move them). |
Codecov Report
@@ Coverage Diff @@
## master #36326 +/- ##
============================================
- Coverage 64.86% 64.84% -0.02%
- Complexity 19775 19785 +10
============================================
Files 1271 1271
Lines 74707 74738 +31
Branches 1309 1309
============================================
+ Hits 48455 48462 +7
- Misses 25866 25890 +24
Partials 386 386
Continue to review full report at Codecov.
|
I'm not sure if we can add unittest here. There are a couple of problems:
We might need to pull off the new unittests. |
Removed the unittests from the list of changes due to problems with the code. We'll rely on the integration tests to verify this works properly using multibucket. |
2489934
to
0054ed1
Compare
I don't think I can raise the code coverage. Unittests problems are described in #36326 (comment) and the acceptance tests already tests what is expected. |
|
As the docs say (https://doc.owncloud.com/server/admin_manual/configuration/server/occ_command.html#the-filestransfer-ownership-command), the command never transfers file versions. So this should be fine for objectstore as well. |
If it fixed the problem from https://github.com/owncloud/enterprise/issues/3520 I'm ok with it ;) |
Sadly a different test fails in the multi-bucket environment: #36266 (comment) |
Description
Fix
files:transfer-ownership
command for multibucket objectstores (checked with files_primary_s3 app against a scality server, with multibucket configuration)NOTE Only files are moved between buckets if needed. Thumbnails and versions remain in the old bucket. The owncloud's filecache also keeps the thumbnails and versions in the same storages (to be investigated further)
Related Issue
https://github.com/owncloud/enterprise/issues/3520
Motivation and Context
transfer-ownership was causing problems with the shares because the fileid of the transferred files was changing. This PR aims to prevent the fileid change so the shares are still bound to valid ids (the files are transferred anyway)
How Has This Been Tested?
occ files:transfer-ownership user1 user2
(user2 must exists and be valid)The transfer happens. The admin can still access to the previously shared files. Shares are visible for user2 (user2 owns the shares)
Screenshots (if appropriate):
Types of changes
Checklist: