Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db migration testing #1068

Closed
redshiftzero opened this issue Apr 23, 2020 · 3 comments · Fixed by #1162
Closed

db migration testing #1068

redshiftzero opened this issue Apr 23, 2020 · 3 comments · Fixed by #1162

Comments

@redshiftzero
Copy link
Contributor

On SecureDrop server we have alembic db migration tests, see this documentation for background/explanation: https://docs.securedrop.org/en/release-1.2.2/development/database_migrations.html?highlight=alembic#unit-testing-migrations

We added the same test runner here but: we haven't been adding the corresponding tests to ensure that the database updates cleanly. I've found these tests pretty useful, so we could start writing them to catch issues with database migrations (otherwise we need to manually upgrade the database from master to test, which we could add to the PR checklist for now).

@eloquence
Copy link
Member

@creviera @emkll I think this would be a good preparatory change in support of read/unread, which will almost certainly require a client DB migration, and other near term new features. What do you think?

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Oct 8, 2020

Yes, this should come first, before #1149 and the migration to move update null journalist_ids in the replies table to that of the deleted user account.

Thinking about order of operations, ideally we would:

  1. start by adding db migration test infrastructure
  2. add the change to prepopulate the user db with a "deleted" user account at setup time
  3. add migrations:

@eloquence eloquence added this to Next sprint candidates in SecureDrop Team Board Oct 13, 2020
@eloquence
Copy link
Member

I've tentatively added this to the next sprint candidates, but per the above it may make sense to start work on this still in the current sprint (ending Thursday), and move #1149 (which is in the current sprint) to the next one.

@eloquence eloquence moved this from Next sprint candidates to SecureDrop Sprint #60 - 10/1-10/15 in SecureDrop Team Board Oct 14, 2020
@sssoleileraaa sssoleileraaa moved this from SecureDrop Sprint #61 - 10/15-10/28 to In Development in SecureDrop Team Board Oct 20, 2020
SecureDrop Team Board automation moved this from In Development to Done Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3 participants