Skip to content

Conversation

@hjanott
Copy link
Member

@hjanott hjanott commented Sep 23, 2025

Continuation of #2520

@hjanott hjanott added this to the 4.x milestone Sep 23, 2025
@hjanott hjanott self-assigned this Sep 23, 2025
Copy link
Member

@luisa-beerboom luisa-beerboom left a comment

Choose a reason for hiding this comment

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

Only looked at some of it so far


def setup_migration_relations(self) -> None:
"""Sets the tables and views used within the migration and copies their data."""
# TODO this method needs to be tested.
Copy link
Member

Choose a reason for hiding this comment

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

Is it even possible to test this before the first post-relDB Migration happens? If it isn't, perhaps write an issue?

).fetchone()
assert (
version_table_exists
), "Something really blew up checking the version tables existence."
Copy link
Member

Choose a reason for hiding this comment

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

lol

Copy link
Member

@luisa-beerboom luisa-beerboom left a comment

Choose a reason for hiding this comment

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

Looked at everything that is there so far

Comment on lines 489 to 496
The test cases initially may seem to be spartanic caused by the lack of testing of integrity
after transfering the data from the key-value-store into their respective tables.
What is tested is the correct creation of intermediate tables and simple relations exemplary as we
can trust that it works for other tables if it worked for one.
Also it is tested that the new tables are created on top of an old basis and the old tables are deleted.
It should be only used like this in this migration test since it leads to a performance problem
once the actual connection context is entered the first time after the database was dropped and recreated.
Copy link
Member

Choose a reason for hiding this comment

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

This comment seems to be under every single test case. Isn't there a more central place this could be put? The check_data function or the top of the file maybe?

Also the text seems to suggest that the integrity of the complete instance is not checked. That breaks with our previous MO as not everything that is changed is also checked. Thinking in terms of what this would mean in the old system: It would risk missing bugs in something as critical as this migration and getting corrupt data as a result. Or missing data. Idk how well that philosophy translates into the new system, but if the risk exists, considering how important this is, I'd suggest testing the content of the new tables more thoroughly in at least one test.

Copy link
Member

Choose a reason for hiding this comment

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

In the old system, as far as I recall, the database check was always called automatically after every finalize call in in the test of whatever migration was currently the most recent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will move it to the class declaration.
As for what is tested I think that as long as one sample for a certain kind works in this migration that should be sufficient. If I would test the complete data set this could be done in all tests but needed much more development time without giving much more security that everything works well.
In future migration tests the previous MO should be the standard again. For that we can have a similar behaviour where the data is checked directly by pulling it through the database adapter or so.

@luisa-beerboom luisa-beerboom removed their assignment Jan 5, 2026
 * do some handling of migration tables
 * use new migration states
 * test improvements (f.e. thread syncing, sequences)
 * update meta
@luisa-beerboom
Copy link
Member

Looked into the relDB branch:
The entire test-class in meeting/test_import.py is skipped to be unskipped when initial migration is in. I think this is the place to do that.
There's also the organization/test_initial_import.py that still has some TODOs dependent on migration index functionality.
You've edited both actions in this PR, I'm guessing you'd want to edit the tests as well, so I thought I'd write it here.

hjanott and others added 3 commits January 18, 2026 00:04
 * requested changes
 * fix setting to running as first action
 * test fixes
 * docs
 * replace trigger
 * hard coded ORIGIN_COLLECTIONS
 * unskip initial import tests
 * update meta
Co-authored-by: luisa-beerboom <[email protected]>
Co-authored-by: peb-adr <[email protected]>
@hjanott
Copy link
Member Author

hjanott commented Jan 17, 2026

Reactivated the initial import tests. Didn't do that for the meeting import, because that has some other implications. Probably better in its own PR.

@hjanott hjanott assigned luisa-beerboom and unassigned hjanott Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature migration Introduces a new migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants