Skip to content

E5515 feature/wopi locks - #486

Merged
mrow4a merged 14 commits into
masterfrom
e5515-feature/wopi-locks
Mar 20, 2023
Merged

mrow4a merged 14 commits into
masterfrom
e5515-feature/wopi-locks

Conversation

@mrow4a

@mrow4a mrow4a commented Feb 28, 2023 •

Copy link
Copy Markdown
Contributor

implements https://github.com/owncloud/enterprise/issues/5515

NOTE: for reviewing, much of the code is carried over and refactored from past implementation (DocumentController -> WopiController)

@mrow4a mrow4a self-assigned this Feb 28, 2023
@mrow4a
mrow4a force-pushed the e5515-feature/wopi-locks branch 6 times, most recently from b7caba3 to 626e8d8 Compare March 10, 2023 14:23
@mrow4a
mrow4a requested review from jvillafanez and phil-davis and removed request for phil-davis March 10, 2023 14:34
@mrow4a
mrow4a marked this pull request as ready for review March 10, 2023 14:34
@mrow4a
mrow4a requested a review from phil-davis March 10, 2023 14:38
Comment thread lib/AppInfo/Application.php Resolved
Comment thread lib/Controller/WopiController.php Resolved
Comment thread lib/Controller/WopiController.php Resolved
Comment thread lib/Controller/WopiController.php Resolved
Comment thread lib/Controller/WopiController.php Resolved
Comment thread lib/Controller/WopiController.php Resolved
Comment thread lib/Controller/WopiController.php Resolved
Comment thread lib/Controller/WopiController.php Resolved
Comment thread lib/FileService.php Resolved
Comment thread lib/FileService.php Resolved
@mrow4a
mrow4a force-pushed the e5515-feature/wopi-locks branch from 626e8d8 to 9f33a5a Compare March 17, 2023 13:08
@mrow4a
mrow4a force-pushed the e5515-feature/wopi-locks branch from 9f33a5a to 7383479 Compare March 17, 2023 13:17
@mrow4a
mrow4a force-pushed the e5515-feature/wopi-locks branch from 69a065f to a0862e8 Compare March 17, 2023 13:36
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 70 Code Smells

0.0% 0.0% Coverage
25.4% 25.4% Duplication

@mrow4a
mrow4a requested a review from jvillafanez March 17, 2023 13:46
@mrow4a

mrow4a commented Mar 17, 2023

Copy link
Copy Markdown
Contributor Author

@jvillafanez adjusted to the review

@jnweiger jnweiger mentioned this pull request Mar 17, 2023
8 of 42 tasks
@jvillafanez

Copy link
Copy Markdown
Member

I expected something like:

$container->registerService('WopiController', function (SimpleContainer $c) {
			$server = $c->getServer();
			return new WopiController(
				$c->query('AppName'),
.....
				$c->query('FileService'),
				$server->getRootFolder(),
				$server->getURLGenerator(),
				$server->getUserManager()
			);
		});

I'm not sure if there is any drawback with any of the approaches. Maybe in your code, the server will be fixed (it won't change) when the constructor is run, so if the server changes later it could be a problem (the reference will still point to the old server, not the new one), but this shouldn't be a realistic scenario because there is no reason to change the server reference.
Could you check other apps in order to homogenize the behavior? If there isn't any common ground, you can keep this.

In terms of memory usage, I guess it could be a couple of additional references that need to stay in memory, but the object itself can't be freed, so this shouldn't be a problem.

@jvillafanez jvillafanez left a comment

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.

Code looks fine, just minor things.

@mrow4a

mrow4a commented Mar 20, 2023

Copy link
Copy Markdown
Contributor Author

Could you check other apps in order to homogenize the behavior? If there isn't any common ground, you can keep this.

In fact this is what has been done

@mrow4a
mrow4a merged commit 5b5da3c into master Mar 20, 2023
@delete-merged-branch
delete-merged-branch Bot deleted the e5515-feature/wopi-locks branch March 20, 2023 14:45
@jnweiger jnweiger mentioned this pull request Jul 7, 2023
31 of 42 tasks
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.

2 participants