Skip to content

Migration 100 guided#3356

Draft
peb-adr wants to merge 13 commits intoOpenSlides:mainfrom
peb-adr:migration-100-guided
Draft

Migration 100 guided#3356
peb-adr wants to merge 13 commits intoOpenSlides:mainfrom
peb-adr:migration-100-guided

Conversation

@peb-adr
Copy link
Copy Markdown
Member

@peb-adr peb-adr commented Feb 23, 2026

No description provided.

@peb-adr peb-adr marked this pull request as draft February 23, 2026 17:14
Copy link
Copy Markdown
Member

@hjanott hjanott left a comment

Choose a reason for hiding this comment

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

I like the general approach and have some suggestions. :)


#raise MigrationException(
# f"pre check for migration {module_name} failed."
#)
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.

I would honestly expect the modules function to already do so. No need for the flag.

Comment on lines +74 to +76
# TODO: removed commented out lines after review
# MigrationHelper.write_line is hardly usable when only the last
# line is output.
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.

We can change this, but we would need to empty the streams buffer each time reading with truncate(0) and seek(0).

peb-adr added 2 commits March 16, 2026 16:14
Still open:
- StringIO stream: replace `getvalue` with appropriate `read` / `truncate`
- Replace LINK
@peb-adr
Copy link
Copy Markdown
Member Author

peb-adr commented Mar 17, 2026

The PR for documentation of the Update to 4.3.0 is now open in main repo

https://github.com/OpenSlides/OpenSlides/pull/7091/changes

It Includes the file UPDATE_TO_4.3.md.
So LINK can presumably be replaced with https://github.com/OpenSlides/OpenSlides/blob/main/UPDATE_TO_4.3.md.

After that the only remaining TODO is:

  • StringIO stream: replace getvalue with appropriate read / truncate
  • reset route: return 501 Not Implemented

@peb-adr
Copy link
Copy Markdown
Member Author

peb-adr commented Mar 20, 2026

When calling migrate and the pre-check (check_prerequisites function) fails, this will already cause all subsequent requests to be answered with internal server error.

Originally I was intending to do the pre-check early enough so this wouldn't happen.
Maybe this is connected to the exception thrown, but I am not sure about this.

@hjanott if you find a way for pre-check to fail more gracefully, such that one could just add the missing env vars and call migrate again, that would be awesome.
Because currently you would have to completely reset the DB and re-import the dump, which is not very user-friendly.

@rrenkert
Copy link
Copy Markdown
Member

Please ping @m-schieder if this gets merged.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants