Skip to content

Migrate disabled spaces - #649

Merged
rhafer merged 5 commits into
opencloud-eu:mainfrom
aduffeck:migrate-disabled-spaces
May 26, 2026
Merged

rhafer merged 5 commits into
opencloud-eu:mainfrom
aduffeck:migrate-disabled-spaces

Conversation

@aduffeck

Copy link
Copy Markdown
Member

aduffeck added 3 commits May 22, 2026 15:43
WithDisabledSpaces() make the lookup return disabled spaces too instead
of returning NotFound. This can be helpful when running migrations on
all spaces, not just the enabled ones for example.

@rhafer rhafer 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.

Looks good to me. But IMO we should rename the migration to 0002_... and set the version to "2". To force it being rerun on system that already ran the 0001 migration.

AFAICT that "should just work (™️)"

@aduffeck

Copy link
Copy Markdown
Member Author

+1 for the version "2" approach.

@rhafer

rhafer commented May 26, 2026

Copy link
Copy Markdown
Member

Hm, this is currently crashing with:

"interface conversion: *middleware.FS is not storage.SpaceDisabledListableFS: missing method WithDisabledSpaces;

I am still investigating.

@aduffeck

Copy link
Copy Markdown
Member Author

Hm, this is currently crashing with:

"interface conversion: *middleware.FS is not storage.SpaceDisabledListableFS: missing method WithDisabledSpaces;

I am still investigating.

Strange, I already added that to middleware.FS, it must have gotten lost during the rebase. Thanks for bringing it back.

The 0001 migraton contained a bug that caused disable space to be
skipped during the migration. By renaming the migration to 0002 we
ensure that the migration is re-run on system that already ran the
faulty 0001 migration. (As the migration itself is idempotent, running
it twice is not an issue).

@rhafer rhafer 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.

Approving after @aduffeck reviewed my last two commits.

@rhafer
rhafer merged commit 774b3a8 into opencloud-eu:main May 26, 2026
19 checks passed
@openclouders openclouders mentioned this pull request May 26, 2026
1 task
Sign up for free to 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.

Migrating space membership to share manager fails for disabled spaces

2 participants