Skip to content

[WIP] Introducing metadata collections in dav#29214

Closed
sharidas wants to merge 5 commits into
masterfrom
dav-changes-for-metadata
Closed

[WIP] Introducing metadata collections in dav#29214
sharidas wants to merge 5 commits into
masterfrom
dav-changes-for-metadata

Conversation

@sharidas

@sharidas sharidas commented Oct 12, 2017

Copy link
Copy Markdown
Contributor

This change is to have metadata collection
in dav app. This will help users to:

  1. Create fileid with a UUID
  2. Create subfolder "p" inside "meta" folder
  3. Create subfolder "v" inside "meta" folder
    The "p" folder stands for preview and "v"
    folder stands for version.

Signed-off-by: Sujith H sharidasan@owncloud.com

Description

Lets focus on versions for now

Related Issue

Todo

  • write behat tests to test dav api @Peter-Prochaska

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@sharidas sharidas self-assigned this Oct 12, 2017
@sharidas sharidas added this to the development milestone Oct 12, 2017
@sharidas sharidas force-pushed the dav-changes-for-metadata branch 7 times, most recently from 0bb390a to 4d80d3f Compare October 12, 2017 07:45
@DeepDiver1975 DeepDiver1975 self-requested a review October 12, 2017 07:47
Comment thread apps/dav/lib/MetaData/MetaDataHome.php Outdated
*
* @param array $principalInfo
*/
public function __construct($principalInfo, IMetaData $metaData) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there should be no principalInfo here - this collection is not user based

use Sabre\DAVACL\AbstractPrincipalCollection;
use Sabre\DAVACL\IPrincipal;

class RootCollection extends AbstractPrincipalCollection {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no principal collection - there is no user involved.

we want 'meta/$fileid/v' not 'meta/$user/$fileId/v

* @return MetaDataHome
*/
function getChildForPrincipal(array $principalInfo) {
$metaData = \OC::$server->getMetaData();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please have a look at #29207

$metaNodeOfFile = \OC::$server->getRootFolder()->get("meta/{$info->getId()}/v");

Comment thread lib/public/IMetaData.php Outdated

/**
* This class provides avatar functionality
* @since 6.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

10.0.4 ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this class will go away ... dont worry

Comment thread lib/public/IMetaData.php Outdated
use OCP\Files\NotFoundException;

/**
* This class provides avatar functionality

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not avatar

@sharidas sharidas force-pushed the dav-changes-for-metadata branch 3 times, most recently from e4b2618 to db5f0ce Compare October 12, 2017 10:26

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

???

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed. Got added to PR by mistake.

@sharidas sharidas force-pushed the dav-changes-for-metadata branch 9 times, most recently from e74c028 to d7afba9 Compare October 13, 2017 06:12
Comment thread lib/private/Files/Storage/Local.php Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TODO:

  • try to move this to class Common

@sharidas sharidas force-pushed the dav-changes-for-metadata branch 2 times, most recently from 00f9a6d to ef5676f Compare October 13, 2017 07:19
@sharidas sharidas force-pushed the dav-changes-for-metadata branch 5 times, most recently from b9ba5c5 to f7b6cb4 Compare October 16, 2017 14:16
@codecov

codecov Bot commented Oct 16, 2017

Copy link
Copy Markdown

Codecov Report

Merging #29214 into master will increase coverage by 0.02%.
The diff coverage is 64.95%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #29214      +/-   ##
============================================
+ Coverage     59.56%   59.59%   +0.02%     
- Complexity    17156    17291     +135     
============================================
  Files          1029     1038       +9     
  Lines         57211    57529     +318     
============================================
+ Hits          34076    34282     +206     
- Misses        23135    23247     +112
Impacted Files Coverage Δ Complexity Δ
lib/private/AvatarManager.php 58.33% <ø> (-1.67%) 8 <0> (ø)
apps/dav/lib/RootCollection.php 100% <100%> (ø) 1 <0> (ø) ⬇️
lib/private/Files/Storage/Local.php 79.89% <100%> (ø) 86 <2> (ø) ⬇️
lib/private/Files/Node/AbstractFile.php 100% <100%> (ø) 6 <6> (?)
apps/files_versions/lib/Storage.php 69.12% <100%> (+0.08%) 103 <0> (ø) ⬇️
lib/private/Files/Node/Root.php 55.33% <100%> (+6.45%) 41 <3> (+4) ⬆️
apps/dav/lib/MetaData/MetaDataNode.php 28.57% <28.57%> (ø) 14 <14> (?)
lib/private/Files/Meta/MetaRootNode.php 28.94% <28.94%> (ø) 17 <17> (?)
lib/private/Files/Meta/MetaFileIdNode.php 32.5% <32.5%> (ø) 18 <18> (?)
lib/private/Files/Meta/MetaVersionCollection.php 75% <75%> (ø) 11 <11> (?)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59509e7...d9f799d. Read the comment docs.

Comment thread apps/dav/lib/MetaData/MetaDataHome.php Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

unused

Comment thread apps/dav/lib/MetaData/MetaDataHome.php Outdated

@DeepDiver1975 DeepDiver1975 Oct 17, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

name ignored?

Comment thread apps/dav/lib/MetaData/MetaDataNode.php Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

public?

Comment thread apps/dav/lib/MetaData/MetaDataNode.php Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

as discussed - meta sub tree is read only

@sharidas sharidas force-pushed the dav-changes-for-metadata branch 2 times, most recently from 846fe03 to dd16f79 Compare October 17, 2017 09:57
@sharidas sharidas force-pushed the dav-changes-for-metadata branch 8 times, most recently from ce1c776 to de41350 Compare October 18, 2017 08:15
This change is to have metadata collection
in dav app. This will help users to:
1) Create fileid with a UUID
2) Create subfolder "p" inside "meta" folder
3) Create subfolder "v" inside "meta" folder
The "p" folder stands for preview and "v"
folder stands for version.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
@sharidas sharidas force-pushed the dav-changes-for-metadata branch from de41350 to d9f799d Compare October 18, 2017 08:16
@DeepDiver1975

Copy link
Copy Markdown
Member

closing this in favor of #29281

@DeepDiver1975 DeepDiver1975 deleted the dav-changes-for-metadata branch October 19, 2017 08:29
@lock

lock Bot commented Aug 2, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants