-
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
health checker/ auto-retry bg sync + adjusted timeouts #612
Conversation
We discussed this at sprint planning today; this does not mitigate the observed problem, so Allie may close the PR, or amend if it is worth increasing the timeout regardless. |
"The SecureDrop server cannot be reached" with Retry link continues to intermittently appear even with this extended timeout. This tells us that the issue is not a securedrop-client/securedrop_client/queue.py Lines 120 to 123 in ff394d5
Also, note that if the API were None then we wouldn't see that Retry link, so that is not the issue: https://github.com/freedomofpress/securedrop-client/blob/master/securedrop_client/logic.py#L275 We already automatically try 5 times in a row to resend a request from the queue if we see |
are you sure it's an |
Ah actually I just realized since If we increased the timeouts for those jobs that would actually work as a quick mitigation if it is a timeout issue. If we're seeing frequent I can verify what the issue is once I get to my Qubes station. |
It does seem like increasing the |
426ae22
to
136163d
Compare
Resolves #181 |
b539b68
to
04289ff
Compare
I updated the PR description to reflect recent changes and added tests after rebasing to include the metadata sync job changes, so this is ready for review! |
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.
some questions about this approach inline
04289ff
to
6235f68
Compare
Resolves #491 |
I just want to mention that when you're ready to re-review that the default api timeouts are:
Changing the MetadataSyncJob api requests from 5 to 20 seconds makes it so I basically never see a network error. I tested this by running the client for 3 hours. At one point I saw the network error message and did nothing and later saw that it had resolved itself. This demonstrated that if a user walks away or is busy reading/ editing a file in a different vm or something, and there are network errors, that they can potentially resolve themselves. So when a user goes back to the client they don't have to see the a red error message that requires a manual retry. Changing the MetadataSyncJob api requests from 5 to 20 seconds does mean that a refresh will take up to 1 minute before telling a user that the server could not be reached. However, other operations will tell the user that the server could not be reached within 25 seconds. So that is the tradeoff, and I opened a followup issue to adjust all the defaults in a smarter way, similar to what we did for download jobs: #648 |
Latest commit removes extra exception logging now that metadata sync is a queue job in order to avoid repetitive retry messages flooding the logs. |
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.
haven't tested yet, two comments on the diff
798b083
to
61eb93a
Compare
61eb93a
to
2326f4a
Compare
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 looking good to me, I think we have one more success callback to update and then I'll approve for merge
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.
OK this looks good to me now, thanks!
Description
Resolves #610
Resolves #181
manual_refresh
option tosync_api
so that if a user clicks the refresh icon and the sync fails, we show an error in the status bar with a retry link