Skip to content

[stable25] fix: Make sure that rollback hook is triggered on all version backends - #37744

Merged
blizzz merged 6 commits into
stable25from
backport/36690/stable25
Jul 10, 2023
Merged

[stable25] fix: Make sure that rollback hook is triggered on all version backends#37744
blizzz merged 6 commits into
stable25from
backport/36690/stable25

Conversation

@backportbot-nextcloud

@backportbot-nextcloudbackportbot-nextcloudBot commented Apr 14, 2023

Copy link
Copy Markdown
  • ⚠️ This backport had conflicts that were resolved with the 'ours' merge strategy and is likely incomplete

backport of #36690

@backportbot-nextcloudbackportbot-nextcloudBot added this to the Nextcloud 25.0.6 milestone Apr 14, 2023
@skjnldsvskjnldsv mentioned this pull request Apr 18, 2023
7 tasks
@juliusknorr
juliusknorrforce-pushed the backport/36690/stable25 branch from e099546 to 1507635CompareMay 5, 2023 10:31
@juliusknorr
juliusknorr marked this pull request as ready for review May 5, 2023 10:31
$owner = $storage->getOwner('');
$user = $this->userManager->get($owner);

$userFolder = $this->rootFolder->getUserFolder($user->getUID());

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getUID on possibly null value
$user = $this->userManager->get($owner);

$userFolder = $this->rootFolder->getUserFolder($user->getUID());
$nodes = $userFolder->getById($file->getId());

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of OCP\Files\Folder::getById cannot be null, possibly null value provided
@blizzzblizzz mentioned this pull request May 16, 2023
@blizzzblizzz added the 3. to review Waiting for reviews label May 17, 2023
@blizzz

Copy link
Copy Markdown
Member

CI issues, moving to 25.0.8

@juliusknorr

Copy link
Copy Markdown
Member

@icewind1991 The remaining failure puzzles me. As far as my debugging goes it seems the mountpoint is properly setup in the test but when calling getFileById on the user folder it is not found. Any chance you could have a look if you have any clue?


There was 1 error:
1) OCA\Files_Versions\Tests\VersioningTest::testRestoreCrossStorage
Error: Call to a member function getPath() on null
/home/runner/work/server/server/apps/files_versions/lib/Versions/LegacyVersionsBackend.php:74
/home/runner/work/server/server/apps/files_versions/lib/Versions/VersionManager.php:92
/home/runner/work/server/server/apps/files_versions/tests/VersioningTest.php:794
/home/runner/work/server/server/apps/files_versions/tests/VersioningTest.php:652

@blizzzblizzz mentioned this pull request Jun 12, 2023
@blizzz

Copy link
Copy Markdown
Member

moving to 25.0.9

@icewind1991

Copy link
Copy Markdown
Member

The remaining failure puzzles me. As far as my debugging goes it seems the mountpoint is properly setup in the test but when calling getFileById on the user folder it is not found. Any chance you could have a look if you have any clue?

Mounts mounted directly in test cases through Filesystem::mount don't get added the user mount cache.

juliusknorrand others added 5 commits July 7, 2023 18:26
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz
blizzzforce-pushed the backport/36690/stable25 branch from 93d59da to 5121ccaCompareJuly 7, 2023 16:30
@blizzz

Copy link
Copy Markdown
Member

rebased, squashed, and a minor cs fix

@blizzzblizzz mentioned this pull request Jul 10, 2023
@blizzz
blizzz merged commit a4b7bb7 into stable25Jul 10, 2023
@blizzz
blizzz deleted the backport/36690/stable25 branch July 10, 2023 15:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@blizzz@juliusknorr@icewind1991@artonge@github-advanced-security@skjnldsv