Skip to content

Fix valid storages removed when cleaning remote storages - #25331

Merged
MorrisJobke merged 2 commits into
masterfrom
fix-valid-storages-removed-when-cleaning-remote-storages
Mar 18, 2021
Merged

Fix valid storages removed when cleaning remote storages#25331
MorrisJobke merged 2 commits into
masterfrom
fix-valid-storages-removed-when-cleaning-remote-storages

Conversation

@danxuliu

Copy link
Copy Markdown
Member

The remote URL of a share is always stored in the database with a trailing slash. However, when a cloud ID is generated trailing slashes are removed.

The ID of a remote storage is generated from the cloud ID, but the cleanup-remote-storage command directly used the remote URL stored in the database. Due to this, even if the remote storage was valid, its ID did not match the ID of the remote share generated by the command and ended being removed.

Now the command generates the ID of remote shares using the cloud ID instead, just like done by the remote storage, so there is no longer a mismatch.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu

Copy link
Copy Markdown
MemberAuthor

/backport to stable20

@danxuliu

Copy link
Copy Markdown
MemberAuthor

/backport to stable19

@rullzerrullzer mentioned this pull request Jan 27, 2021
19 tasks
The remote URL of a share is always stored in the database with a
trailing slash. However, when a cloud ID is generated trailing slashes
are removed.
The ID of a remote storage is generated from the cloud ID, but the
"cleanup-remote-storage" command directly used the remote URL stored in
the database. Due to this, even if the remote storage was valid, its ID
did not match the ID of the remote share generated by the command and
ended being removed.
Now the command generates the ID of remote shares using the cloud ID
instead, just like done by the remote storage, so there is no longer a
mismatch.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu
danxuliuforce-pushed the fix-valid-storages-removed-when-cleaning-remote-storages branch from 91ff735 to 9ccabffCompareJanuary 28, 2021 20:43
@rullzerrullzer mentioned this pull request Jan 29, 2021
@rullzerrullzer modified the milestones: Nextcloud 21, Nextcloud 22Feb 2, 2021
@rullzer

Copy link
Copy Markdown
Member

/backport to stable21

@MorrisJobkeMorrisJobke 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 makes sense 👍

@PVince81

Copy link
Copy Markdown
Member

so after just merging this, psalm is unhappy about the merge: https://github.com/nextcloud/server/actions/runs/664180405

@MorrisJobke

Copy link
Copy Markdown
Member

Bildschirmfoto 2021-03-18 um 11 30 10

Is this triggered by our change?

@PVince81

Copy link
Copy Markdown
Member

seems not, probably a hiccup from Github.
just had a unicorn page even recently...

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@danxuliu@rullzer@PVince81@MorrisJobke