-
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
Ensure that sources are properly refreshed on sync #916
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmol
requested review from
sssoleileraaa,
kushaldas and
redshiftzero
as code owners
March 11, 2020 21:17
sssoleileraaa
previously approved these changes
Mar 11, 2020
rmol
force-pushed
the
888-unstar-db-lock
branch
from
March 12, 2020 19:47
86e293d
to
49b533a
Compare
Rebased, reworked, ready for rereview. |
rmol
force-pushed
the
888-unstar-db-lock
branch
from
March 12, 2020 20:48
49b533a
to
9c3c171
Compare
I still see this blocked because of #919 happening on |
rmol
force-pushed
the
888-unstar-db-lock
branch
from
March 13, 2020 20:20
9c3c171
to
f53f9a9
Compare
rmol
force-pushed
the
888-unstar-db-lock
branch
from
March 13, 2020 20:42
f53f9a9
to
8dcbaaf
Compare
In widgets.SourceList.update, make sure that existing SourceWidgets are updated. This requires refreshing each source's state in the controller session. On sync, sources were being properly updated in the database via storage.update_sources, but without this refresh, a source being unstarred on the server, for example, wouldn't be reflected in the UI until some other operation caused the source to be refreshed in the controller's session. Commit after updating a source's is_starred field in widgets.StarToggleButton.on_update, preventing a sqlite3.OperationalError saying "database is locked". In sync.ApiSync.on_sync_failure, keep syncing no matter the error, and have the log message say less about the cause. Log more details about API job failure in api_jobs.base.ApiJob._do_call_api.
rmol
force-pushed
the
888-unstar-db-lock
branch
from
March 13, 2020 21:45
8dcbaaf
to
6dd0155
Compare
sssoleileraaa
approved these changes
Mar 13, 2020
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.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #888.
In
widgets.SourceList.update
, make sure that existingSourceWidget
s are updated. This requires refreshing each source's state in the controller session. On sync, sources were being properly updated in the database viastorage.update_sources
, but without this refresh, a source being unstarred on the server, for example, wouldn't be reflected in the UI until some other operation caused the source to be refreshed in the controller's session.Commit after updating a source's
is_starred
field inwidgets.StarToggleButton.on_update
, preventing asqlite3.OperationalError
saying "database is locked".In
sync.ApiSync.on_sync_failure
, keep syncing no matter the error, and have the log message say less about the cause.Log more details about API job failure in
api_jobs.base.ApiJob._do_call_api
.Test Plan
Follow #888 STR. You should not get a "database locked" error and when the source is unstarred in the journalist interface, it should also be unstarred in the client after the very next sync.
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:
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: