Skip to content

Protect migration connection from direct commits - #3731

Open
rajvveer wants to merge 1 commit into
OpenSlides:mainfrom
rajvveer:fix/3657-protect-migration-connection
Open

Protect migration connection from direct commits#3731
rajvveer wants to merge 1 commit into
OpenSlides:mainfrom
rajvveer:fix/3657-protect-migration-connection

Conversation

@rajvveer

Copy link
Copy Markdown

Summary

  • add a MigrationCursor subclass that prevents migration code from retrieving its connection and committing directly
  • pass the protected cursor to prerequisite, migration, and cleanup hooks while the framework retains its real cursor
  • add a focused regression test for connection access

Validation

  • Black formatting check passed
  • Python compilation check passed
  • standalone migration-cursor protection check passed
  • the repository pytest harness requires its configured PostgreSQL service; the local run stopped at database authentication before collecting this test

Closes #3657

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

For now we stall this PR since we are waiting for changes from feature/dammi which are necessary for this PR. It is important to understand that the migrations will have to be executed on a single transaction which is a part of feature/dammi.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create commit protection for migration connection

2 participants