OpenSlides / OpenSlides/openslides-backend
Create commit protection for migration connection
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9
- Forks
- 40
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 19
Description
Our migrations rely on a singular transaction that can be rolled back if an error occurs.
Currently if a dev was to commit on the connection stored in the cursor it could potentially damage data.
To prevent that my idea is to subclass the psycopg connection/cursor and pass this object to the MigrationHandler. This subclassed connection/cursor could then prevent any commit or retrieval of the connection. Therefore it should only be created by the MigrationManager.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the existing MigrationManager and MigrationHandler entry points, then trace how the psycopg connection and cursor are created and passed between them. Define completion as migration code being unable to commit or retrieve the underlying connection, while the MigrationManager can still create and provide the protected objects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100