Skip to content

delete source widgets for current sync update - #1114

Merged
kushaldas merged 6 commits into
masterfrom
fix-sourcelist-update-bug
Jun 23, 2020
Merged

delete source widgets for current sync update#1114
kushaldas merged 6 commits into
masterfrom
fix-sourcelist-update-bug

Conversation

@sssoleileraaa

@sssoleileraaa sssoleileraaa commented Jun 16, 2020

Copy link
Copy Markdown
Contributor

Description

Test Plan

Regression test

  1. run make dev
  2. run the client
  3. log into the Journalist Interface
  4. get a source ready for deletion by having the deletion popup confirmation in a separate window
  5. have a message ready to that source
  6. (you can do this without adding a sleep in the code if you act fairly fast) delete the source and send the message right after
  7. see that the message fails to send and that the source widget and conversation are deleted next sync (this is also the current behavior)

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 master and confirmed that the migration applies cleanly
  • I have written a migration but have not upgraded a test database based on master and would like the reviewer to do so
  • I need help writing a database migration
  • No database schema changes are needed

@sssoleileraaa
sssoleileraaa force-pushed the fix-sourcelist-update-bug branch from d2a6f46 to 844a683 Compare June 17, 2020 06:41
@sssoleileraaa
sssoleileraaa force-pushed the fix-sourcelist-update-bug branch from 844a683 to 95a0670 Compare June 17, 2020 07:05

@redshiftzero redshiftzero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced #1113 #1116 #1117 on master branch, confirming that they no longer result in crashes (for #1116 #1117) and that the widget deletion occurs in a single sync period for #1113 with the changes on this branch ✨ . A couple of thoughts/findings inline, lmk what you think!

Comment thread securedrop_client/gui/widgets.py Outdated
Comment thread securedrop_client/gui/widgets.py
Comment thread securedrop_client/gui/widgets.py Outdated
@redshiftzero
redshiftzero dismissed their stale review June 18, 2020 21:44

Dismissing my review so other folks can take over review. Most of my comments were addressed already!

@sssoleileraaa
sssoleileraaa force-pushed the fix-sourcelist-update-bug branch from 9b0c1fb to e2d9fab Compare June 19, 2020 00:55
@sssoleileraaa

Copy link
Copy Markdown
Contributor Author

Even though everything is green and passes, I'd like to work on adding regression tests around widgets not getting added to the cache to prevent the issue that @redshiftzero found earlier from happening again: #1114 (review)

@sssoleileraaa

Copy link
Copy Markdown
Contributor Author

Dismissing my review so other folks can take over review. Most of my comments were addressed already!

I believe at this point, I've addressed all of @redshiftzero's review comments. So this is ready for a second pass.

@kushaldas kushaldas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the following:

  • Verify #1113 is fixed by following the STR there
  • Verify #1117 is fixed by following the STR there
  • Verify #1116 is fixed by following the STR
  • Verify that we surround all access of db object properties in try-catch blocks in the SourceList.update method to confirm second half of issue 1 and 8 documented here: #906 (comment)
  • Verify that test test_SourceList_update_when_source_deleted passes and that the rewrite makes sense (because if this makes sense then the refactor I made will make sense)

@kushaldas
kushaldas merged commit c78d309 into master Jun 23, 2020
@kushaldas
kushaldas deleted the fix-sourcelist-update-bug branch June 23, 2020 09:05
@eloquence eloquence mentioned this pull request Jul 8, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants