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

app: reset source pending status upon unexpected source deletion at server #979

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

redshiftzero
Copy link
Contributor

Description

Fixes #966.

Test Plan

  1. First add to the source deletion server API endpoint (above this line):
+            early_fail = random.choice([True, False])
+            if early_fail:
+                abort(404)

such that you get failures half the time.

  1. Delete a source locally.
  2. Upon deletion success, the pending status works as expected: the pending status is shown and the source disappears from the UI.
  3. Upon deletion failure (not due to timeouts), an error message is shown, the pending status is removed from both the SourceWidget in the source list and the conversation wrapper.

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, packaging logic (e.g., the AppArmor profile) may need to be updated. Please check as applicable:

  • I have submitted a separate PR to the packaging repo
  • No update to the packaging logic (e.g., AppArmor profile) is required for these changes
  • I don't know and would appreciate guidance

rmol
rmol previously approved these changes Mar 23, 2020
Copy link
Contributor

@rmol rmol left a comment

Choose a reason for hiding this comment

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

👍

The reset does _not_ occur if the failure was a RequestTimeoutError
or ServerConnectionError
@redshiftzero redshiftzero force-pushed the source-deletion-pending-reset branch from bcd01ce to 38426af Compare March 23, 2020 19:52
@rmol rmol merged commit 4e07ddc into master Mar 23, 2020
@rmol rmol deleted the source-deletion-pending-reset branch March 23, 2020 20:09
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.

remove pending status when a deletion fails due to an unexpected error
2 participants