-
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
app: fix conversation refresh/syncing #937
Conversation
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.
Submission deleted via JI
- Login to client, click on a source
- Delete a single submission via the JI for that source
- You should see the submission be deleted from the conversation view after sync
- For good measure, try sending a reply from the JI and ensure it appears in the conversation view
File deleted via JI
Precondition: Submit a file as a source
- Login to client, click on a source
- Delete a single file via the JI for that source
- You should see the file be deleted from the conversation view after sync
- Now submit another file as a source
- You should see the new file appear in the conversation view after sync
- For good measure, try sending a reply from the JI and ensure it appears in the conversation view
- For good measure, try sending a message from the source and ensure it appears in the conversation view
The data directory also looks good, no old files on the disk. Needs a rebase.
c3d840d
to
29e24d0
Compare
thanks for review! rebased/retested/repushed on latest master (4f86a61) |
when we access the replies, messages, and files relationships on Source, a new query is not necessarily emitted by sqlalchemy. This means that we can access objects that have been deleted. To ensure that this is not the case, we can call expire_all on the session.
29e24d0
to
eb76a2b
Compare
rebased/retested/repushed on latest master (8ab6101) |
Suggested by @rmol in private conversation to replace the expire_all
added a commit based on a comment from @rmol (and retested) |
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.
Rereviewed, works as required. Approved.
Description
Fixes #891.
Fixes #939.
Test Plan
Submission deleted via JI
File deleted via JI
Precondition: Submit a file as a source
You should not see any of the behavior reported in freedomofpress/securedrop-workstation#494 (comment): the application should not crash with a SQLAlchemy exception, nor should there be any overlaid file widgets in the conversation view.
Checklist
If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:
If these changes add or remove files other than client code, packaging logic (e.g., the AppArmor profile) may need to be updated. Please check as applicable: