-
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
move metadata sync to api queue #640
Conversation
This line is definitely being executed by test_MetadataSyncJob_success_with_missing_key but curiously it wasn't being shown as executed in our coverage report. Investigating, I discovered the following upstream bug: https://bugs.python.org/issue2506 The cpython peephole optimizer is causing this line to report as uncovered (here's a nice blog explaining this optimizer: https://akaptur.com/blog/2014/08/02/the-cpython-peephole-optimizer-and-you/ this helpfully uses an example (see the section under "Complications arise" where code is reported as uncovered due to peephole optimizations))
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.
This is a very clean migration. I just need to test on Qubes, but looking good so far!
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.
I ran through the normal manual regression testing procedure and found three regressions:
- staring does not immediately sync (it's much slower now)
- ^ same for deleting a source + the UI does not immediately update: you click delete and it just stays there for 30 seconds
- The refresh icon no longer shows that it's syncing during a delete or staring operation. Particularly for delete, I think we should see something happening in the background because it looks like now it just doesn't work for 30 seconds
Looks like staring is not slower afterall so this is safe to ignore
This is an actual issue since the UI used to update immediately to reflect the deletion
This can be ignored. For some reason I thought the refresh icon would go into an active state during a deletion, but that shouldn't be the case and never was. |
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.
This is an actual issue since the UI used to update immediately to reflect the deletion
Looks like this is also an issue on master after more testing. We could continue the conversation of it being slow in this issue or followup issue: #462 (comment)
Also, I created an issue for showing that a deletion is in progress in the UI in case we don't show removal right away clientside: #643
Description
Fixes #461
Fixes #489 (between this change and the pending reply change we should not see that bug any more)
This PR implements the
MetadataSyncJob
. A couple notes:on_sync_failure
which is what is creating the "The SecureDrop server cannot be reached" messages so we can observe over the coming days/weeks how often this is failing (if we still see failures, we can bump up the number of automatic tries in the queue)cpython
bug where a line is incorrectly showing as uncovered, see full explanation in and relevant links in e037080Test Plan
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: