Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Aug 22, 2024

Backport of PR #2942

@backportbot backportbot bot added bug 3. to review Items that need to be reviewed labels Aug 22, 2024
@come-nc
Copy link
Contributor

come-nc commented Aug 22, 2024

@danxuliu cypress failure, related?

@danxuliu danxuliu force-pushed the backport/2942/stable29 branch from 1e69312 to b61a0d9 Compare August 23, 2024 11:55
@danxuliu
Copy link
Member

danxuliu commented Aug 23, 2024

@danxuliu cypress failure, related?

The failure in files_versions/version_cross_storage_move.cy.ts can be seen in other stable29 pull requests, and for the other failure (files_versions/version_naming.cy.ts) I run the test locally and it passed, so they should™ not be related.

Independently of that I amended the PHP stubs with an extra field that was not included in them (although it was already included in the stubs of stable30).

These tests should be written as integration tests instead, but for
practical reasons, as the integration tests have not been setup yet in
the groupfolders app, they were written as E2E tests.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Jail wrappers reuse the cache of the wrapped storage even if another
storage is explicitly given. Due to that, when the cache is got from an
storage and that storage has a Jail all the wrappers above it are not
known to the cache, and only those wrapped by the Jail are taken into
account.

In general that works fine, as in most cases the cache does not need to
know the details of a storage. However, it needs to know if an
Encryption wrapper is present in the storage when moving files into it,
as the file cache explicitly clears the "encrypted" flag when moving a
file from an encrypted storage to a non encrypted storage.

As the Encryption wrapper of groupfolders was not known to the cache all
files moved from an encrypted storage to an encrypted groupfolder ended
wrongly marked as not encrypted.

To solve that now the Jail used by groupfolders does not reuse the inner
cache when encryption is enabled, and instead passes the given storage.
This is applied only when encryption is enabled, as reusing the inner
cache was done as a performance optimization.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@skjnldsv skjnldsv force-pushed the backport/2942/stable29 branch from b61a0d9 to 155be22 Compare August 28, 2024 12:00
@skjnldsv skjnldsv enabled auto-merge August 28, 2024 12:01
@skjnldsv
Copy link
Member

Fixed cypress on master, 30 and 29

@skjnldsv skjnldsv added 4. to release Items that are ready for releasing and removed 3. to review Items that need to be reviewed labels Aug 28, 2024
@skjnldsv skjnldsv merged commit 0562bdd into stable29 Aug 28, 2024
@skjnldsv skjnldsv deleted the backport/2942/stable29 branch August 28, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Items that are ready for releasing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants