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

Defer source key import #1035

Merged
merged 2 commits into from
Apr 1, 2020
Merged

Defer source key import #1035

merged 2 commits into from
Apr 1, 2020

Conversation

rmol
Copy link
Contributor

@rmol rmol commented Mar 31, 2020

Description

Stop importing source GPG keys during sync. We have a place on Source to store fingerprint and key, which is all we need for the import, and which is what we check when deciding whether to enable the reply box, so let's just update the database here and defer import to the keyring until someone actually wants to reply. It takes milliseconds that won't be noticed then, but do add up during sync.

This is based on and should be reviewed after #1034.

Test Plan

Run the SD core dev server. Run the client with run.sh and a fresh data directory. Ensure that you can still reply to sources. If you can, then deferring the key import until replying is working.

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

@eloquence
Copy link
Member

(Per PR body, labeled blocked until #1034 is merged.)

@rmol rmol force-pushed the defer-source-key-import branch from 0b9bb0c to 06e2801 Compare April 1, 2020 18:05
@rmol rmol removed the blocked label Apr 1, 2020
Copy link
Contributor

@sssoleileraaa sssoleileraaa left a comment

Choose a reason for hiding this comment

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

After removing the unused GpgHelper from update_sources and update_local_storage, I think this is good to go! This change makes a lot of sense. We no longer import the source key until we call encrypt_to_source. In the meantime I'll be checking out how much this improves performance. 🎉

@sssoleileraaa
Copy link
Contributor

Once #1039 is fixed this can be merged.

rmol added 2 commits April 1, 2020 17:18
Stop importing source GPG keys during sync. We have a place on Source
to store fingerprint and key, which is all we need for the import, and
which is what we check when deciding whether to enable the reply box,
so let's just update the database here and defer import to the keyring
until someone actually wants to reply. It takes milliseconds that
won't be noticed then, but do add up during sync.
@rmol rmol force-pushed the defer-source-key-import branch from 2b3717c to 0cef1f5 Compare April 1, 2020 21:18
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.

3 participants