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

Added searchByTags to view, storage and cache #12617

Closed
wants to merge 5 commits into from
Closed

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Dec 4, 2014

Needed to be able to get a flat result list of all favorites.

@icewind1991 @schiesbn @nickvergessen please review

@PVince81 PVince81 added this to the 8.0-current milestone Dec 4, 2014
* Logout the current user and tear down the filesystem.
*/
static protected function logout() {
\OC_Util::tearDownFS();
Copy link
Contributor

Choose a reason for hiding this comment

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

check whether we are already logged out, since this might be expensive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked into its impl, it just clears a few arrays so shoulnd't be expensive.
Also we don't do it every time automatically, the test writers must decide whether to use it or not. (encryption/sharing have their own helpers which can be redirected to this later)

@ghost
Copy link

ghost commented Dec 9, 2014

💣 Test FAILed. 💣
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/4138/

Build result: FAILURE

[...truncated 16 lines...]Fetching upstream changes from https://github.com/owncloud/core.gitusing GIT_SSH to set credentials using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git5763326909978540880.credentials # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/12617/merge^{commit} # timeout=10 > git branch -a --contains 053c152a47dced5a3ff784aed6ae3aa9120dc1da # timeout=10 > git rev-parse remotes/origin/pr/12617/merge^{commit} # timeout=10Checking out Revision 053c152a47dced5a3ff784aed6ae3aa9120dc1da (origin/pr/12617/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 053c152a47dced5a3ff784aed6ae3aa9120dc1daFirst time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second
💣 Test FAILed. 💣

@PVince81
Copy link
Contributor Author

  • add back the $user argument on searchByTags
  • fix tagmanager to be able to load tags for a specified user

@PVince81
Copy link
Contributor Author

@ghost
Copy link

ghost commented Dec 10, 2014

💣 Test FAILed. 💣
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/4199/

Build result: FAILURE

[...truncated 18 lines...]using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git2065754973029294132.credentials # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/12617/merge^{commit} # timeout=10 > git branch -a --contains 0db54fc8c7e4ff66e08fc6c5e5268c53a5e678d9 # timeout=10 > git rev-parse remotes/origin/pr/12617/merge^{commit} # timeout=10Checking out Revision 0db54fc8c7e4ff66e08fc6c5e5268c53a5e678d9 (origin/pr/12617/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 0db54fc8c7e4ff66e08fc6c5e5268c53a5e678d9First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » SLAVETriggering pull-request-analyser-ng-simple » vm-slave-03pull-request-analyser-ng-simple » SLAVE completed with result FAILUREpull-request-analyser-ng-simple » vm-slave-03 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 49 second
💣 Test FAILed. 💣

@PVince81
Copy link
Contributor Author

Had to add an argument when loading the tags to make it possible to load tags for a different user than the one who is logged in: https://github.com/owncloud/core/pull/12617/files#diff-53358c86f0b4846db05fafd172a73d56R56

Also I fixed searchByTags and added unit tests.

Please review @icewind1991 @nickvergessen @LukasReschke

* @return \OCP\ITags
*/
public function load($type, $defaultTags=array(), $includeShared=false) {
return new Tags($this->mapper, $this->user, $type, $defaultTags, $includeShared);
public function load($type, $defaultTags = array(), $includeShared = false, $user = null) {
Copy link
Member

Choose a reason for hiding this comment

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

Enforce type? \OCP\IUser $user

@ghost
Copy link

ghost commented Dec 10, 2014

💣 Test FAILed. 💣
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/4232/

Build result: FAILURE

[...truncated 16 lines...]Fetching upstream changes from https://github.com/owncloud/core.gitusing GIT_SSH to set credentials using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git1939264008145441972.credentials # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/12617/merge^{commit} # timeout=10 > git branch -a --contains 130ba7367b54730e14dc003f5dd6b5612fee330e # timeout=10 > git rev-parse remotes/origin/pr/12617/merge^{commit} # timeout=10Checking out Revision 130ba7367b54730e14dc003f5dd6b5612fee330e (origin/pr/12617/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 130ba7367b54730e14dc003f5dd6b5612fee330eFirst time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » SLAVEpull-request-analyser-ng-simple » SLAVE completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 20 second
💣 Test FAILed. 💣

@ghost
Copy link

ghost commented Dec 10, 2014

💣 Test FAILed. 💣
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/4235/

Build result: FAILURE

[...truncated 16 lines...]Fetching upstream changes from https://github.com/owncloud/core.gitusing GIT_SSH to set credentials using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git1046696498170140206.credentials # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/12617/merge^{commit} # timeout=10 > git branch -a --contains cfd3791913bd93bfb5f0086248b35a9e9be4e52a # timeout=10 > git rev-parse remotes/origin/pr/12617/merge^{commit} # timeout=10Checking out Revision cfd3791913bd93bfb5f0086248b35a9e9be4e52a (origin/pr/12617/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f cfd3791913bd93bfb5f0086248b35a9e9be4e52aFirst time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » SLAVEpull-request-analyser-ng-simple » SLAVE completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second
💣 Test FAILed. 💣

@ghost
Copy link

ghost commented Dec 11, 2014

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/4275/

Build result: FAILURE

[...truncated 17 lines...]using GIT_SSH to set credentials using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git1231165357666126773.credentials # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/12617/merge^{commit} # timeout=10 > git branch -a --contains 5cca59171d211ce0d35fb662a28b644f061cece1 # timeout=10 > git rev-parse remotes/origin/pr/12617/merge^{commit} # timeout=10Checking out Revision 5cca59171d211ce0d35fb662a28b644f061cece1 (origin/pr/12617/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 5cca59171d211ce0d35fb662a28b644f061cece1 > git rev-list 130ba7367b54730e14dc003f5dd6b5612fee330e # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » SLAVEpull-request-analyser-ng-simple » SLAVE completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second
💣 Test FAILed. 💣

@PVince81
Copy link
Contributor Author

Superseded by #12778

@PVince81 PVince81 deleted the searchbytags branch December 11, 2014 11:23
@scrutinizer-notifier
Copy link

The inspection completed: 16 new issues, 13 updated code elements

@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 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.

6 participants