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

Delete source files and records locally when server confirms deletion #1441

Closed

Conversation

rocodes
Copy link
Contributor

@rocodes rocodes commented Mar 15, 2022

Description

WIP

Fixes #1344.

Test Plan (WIP)

  • Setup: ensure your instance has a number (> 5) of sources with files, messages, and replies. For at least one source, save their codename.

Test local deletion: happy path

  • Choose a source in the client and download files/attachments for them.
  • Inspect Sources table and note their id
  • Select "Delete Source"
  • Observe source is deleted from database and source documents are deleted
  • Test with source codename that source cannot log in from Tor browser

Test local deletion right after conversation deletion

  • Choose a source in the client and download files/attachments for them.
  • Inspect Sources table and note their id
  • Select "Delete files and messages"
  • Quickly select "Delete source" (inside same sync period)
  • Observe source is deleted from database and source documents are deleted

Test local deletion: network failure path

  • Choose a source in the client and download files/attachments for them.
  • Inspect Sources table and note their id
  • Select "Delete Source", then once GUI animation completes, quickly kill network connection (sudo service tor stop in sd-whonix, or set netvm to None)
  • Observe source record is deleted from database (query via ID) and source documents are deleted

Regression testing: remote deletion

  • Open the client and observe a source in client conversation view. Download files and messages for the source.
  • Delete the source via Journalist Interface/Tor Browser
  • Wait for sync
  • Source is not present in the client conversation view and source files are removed from data directory.

Regression testing: remote updates to deleted source

  • Open the JI and compose, but do not send, a reply to a source
  • Open the client and navigate to that source in conversation pane
  • Send the reply via the JI and then quickly select "delete source" in the client
  • Wait for sync
  • Reply and source messages are not visible in the client

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:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:

  • I have updated the AppArmor profile
  • No update to the AppArmor profile is required for these changes
  • I don't know and would appreciate guidance

If these changes modify the database schema, you should include a database migration. Please check as applicable:

  • I have written a migration and upgraded a test database based on main and confirmed that the migration applies cleanly
  • I have written a migration but have not upgraded a test database based on main and would like the reviewer to do so
  • I need help writing a database migration
  • No database schema changes are needed

@rocodes rocodes force-pushed the 1344-source-account-delete branch from bf4edd1 to b16f845 Compare April 4, 2022 17:24
@rocodes
Copy link
Contributor Author

rocodes commented Apr 4, 2022

Closing in favour of #1458

@rocodes rocodes closed this Apr 4, 2022
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.

Update "Entire source account" deletion to complete when server reports success
1 participant