Skip to content

Conversation

@CarlSchwan
Copy link
Member

@CarlSchwan CarlSchwan commented Sep 28, 2025

  • Port away from Files::buildNotExistingFileName
  • Use IUser and IGroup instead of plain string
  • Resolves: #

Summary

TODO

  • ...

Checklist

@CarlSchwan CarlSchwan added this to the Nextcloud 33 milestone Sep 28, 2025
@CarlSchwan CarlSchwan self-assigned this Sep 28, 2025
@CarlSchwan CarlSchwan requested a review from a team as a code owner September 28, 2025 09:27
@CarlSchwan CarlSchwan requested review from Altahrim, icewind1991 and salmart-dev and removed request for a team September 28, 2025 09:27
@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label Sep 28, 2025
@CarlSchwan CarlSchwan requested a review from come-nc September 28, 2025 09:28
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch 2 times, most recently from c3a408f to 0c9834a Compare September 28, 2025 10:01
@CarlSchwan CarlSchwan added technical debt ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) feature: sharing labels Sep 28, 2025
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch from 0c9834a to 4b5ed3f Compare September 28, 2025 10:20
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch from 4b5ed3f to 853ea64 Compare September 28, 2025 10:54
@come-nc
Copy link
Contributor

come-nc commented Sep 28, 2025

According to integation tests you broke federated shares @CarlSchwan

@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch 2 times, most recently from 04fd1d0 to 05935e0 Compare September 29, 2025 10:00
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch 2 times, most recently from c1e8ffc to 46c8632 Compare September 30, 2025 08:24
* @return array|false
*/
protected function tryOCMEndPoint($remoteDomain, $token, $remoteId, $feedback) {
protected function tryOCMEndPoint(string $remoteDomain, string $token, string $remoteId, string $feedback) {
Copy link
Member

@icewind1991 icewind1991 Sep 30, 2025

Choose a reason for hiding this comment

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

missing return type

return $this->cloudFederationProviderManager->sendNotification($remoteDomain, $notification);
try {
$response = $this->cloudFederationProviderManager->sendCloudNotification($remoteDomain, $notification);
} catch (OCMProviderException) {
Copy link
Member

Choose a reason for hiding this comment

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

maybe add this catch block around the switch and have it return false directly instead of relying on the $response staying null bahavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

reverted the whole part, since I suspect this is breaking the integration test

Copy link
Contributor

Choose a reason for hiding this comment

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

still failing 😭

@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch from 7a461a8 to d61da55 Compare October 1, 2025 08:50
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch from d61da55 to 4ff702f Compare October 29, 2025 15:53
@CarlSchwan CarlSchwan changed the title refactor(external-share): Cleanup OCA\FIles_Sharing\External\Manager perf(external-share): Port to Entity and use snowflake Ids Oct 29, 2025
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch from 4ff702f to 0a8012b Compare October 29, 2025 15:56
@CarlSchwan CarlSchwan mentioned this pull request Oct 29, 2025
11 tasks
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch 2 times, most recently from e9a5835 to 86518ae Compare October 29, 2025 16:19
Copy link
Member

Choose a reason for hiding this comment

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

These changes will break the clients

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't really see a way around that. Using an int will fails as JSON doesn't support such big numbers, particularly on 32bits machine

Copy link
Collaborator

Choose a reason for hiding this comment

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

It can already fail on 32 bit systems as we are using BIGINT as unique keys. PHP is using signed int so on 32 bit the maximum is 2^31.

The difference is now even "small" instances will have large IDs. On 32 bits servers, we know PHP fail to keep the right value with float(lose precision) and int (truncate).

I don't know if OpenAPI offers a way to represent large numbers, even for 32 bit systems.

Copy link
Member

Choose a reason for hiding this comment

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

Either way, this change is not allowed 🤷‍♀️

@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch 4 times, most recently from ac27b7e to 71bf292 Compare October 30, 2025 16:54
- Port away from Files::buildNotExistingFileName
- Use IUser and IGroup instead of plain string

Signed-off-by: Carl Schwan <[email protected]>
Move the functionality in the last place it is used OC\Files\Node\Folder

Signed-off-by: Carl Schwan <[email protected]>
This might fixes the test.

Signed-off-by: Carl Schwan <[email protected]>
This removes all the read after write and we don't need to queries all
the time the same share in the same request anymore.

Signed-off-by: Carl Schwan <[email protected]>
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch from 71bf292 to 0312cee Compare November 20, 2025 13:42
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-external-manager branch from 0312cee to d6852c9 Compare November 20, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: sharing ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants