-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add DownloadJob #427
Add DownloadJob #427
Conversation
2c3b7af
to
1fef1b4
Compare
Confirming:
|
Base branch here should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
took a look at this - I wasn't able to download files or messages on these latest changes, see comments inline
1fef1b4
to
0521640
Compare
alembic tests are failing - will look into this tomorrow |
heads up that the alembic tests fail here because the removal of constraints from existing tables is not supported in sqlite due to incomplete ALTER table support. However, we can still do these constraint removals via the following steps:
You can follow this example here which is from when I added the new journalist UUID column with a unique constraint on the server-side (also uses sqlite) |
thanks @redshiftzero! worked like a charm 🍀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tested this and read through the updated diff, all my comments were addressed, LGTM 🚀
note that we need packaging change freedomofpress/securedrop-builder#59 to land also, let's wait until that is approved before merging this (good to get in this practice as we always want to leave |
Description
Closes #406
This is part of breaking down a large PR #409
This and following smaller refactors are a way to help us avoid bugs around file management when we download and decrypt, which is tricky.
Summary of changes
Moved
call_api
,_download
, and_check_file_integrity
into a new base class calledDownloadJob
fromFileDownloadJob
andMessageDownloadJob
._decrypt
will also be moved intoDownloadJob
from its derived classes in a followup PR.This also introduces new behavior: checking file integrity of everything that gets downloaded. So now message downloads also get checked.
Test Plan
No need to test in Qubes, but always feel free. This PR doesn't modify how we decrypt or download, and the extra file integrity checks is not qubes-specific.