-
Notifications
You must be signed in to change notification settings - Fork 690
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
Make gpg
not check the trustdb as we do not use the WoT
#6390
Conversation
GPG automatically checks the trustdb on the fly, an operation that can take a long time with very large keyrings as they sometimes exist on large instances. We don't use the Web of Trust at all though so we want to tell GPG to skip these checks by default.
Codecov Report
@@ Coverage Diff @@
## develop #6390 +/- ##
===========================================
- Coverage 83.98% 82.72% -1.27%
===========================================
Files 61 40 -21
Lines 4302 3855 -447
Branches 523 503 -20
===========================================
- Hits 3613 3189 -424
+ Misses 565 537 -28
- Partials 124 129 +5
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
As source key deletion is a synchronous operation, let's ensure there's no unintended long-running trustdb check.
I updated test plan above to reflect the new commit adding |
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.
Source key generation:
- During make dev startup, run while true; do grep "--no-auto-check-trustdb"<<<$(ps a); sleep 1; done and confirm that --no-auto-check-trustdb is actually passed to gpg2
- With a fresh install, run loaddata.py often enough to generate keys for 10-20k sources
- Repeatedly generate new sources manually and see response times stay approximately the same (tested on dev environment with ~3k sources and prod environment with ~20k sources with diff manually applied)
Source deletion:
- Log into journalist interface
- Run while true; do grep "--no-auto-check-trustdb"<<<$(ps a); done (no sleep as this operation is faster than generating a key)
- Delete source account and ensure --no-auto-check-trustdb is in the the grep loop output
LGTM, no side-effects noted during exploratory testing on prod or dev either.
Status
Ready for review
Description of Changes
GPG automatically checks the trustdb on the fly, an operation that can take a long time with very large keyrings as they sometimes exist on large instances. We don't use the Web of Trust at all though so we want to tell GPG to skip these checks by default.
Fixes #6389
Testing
make dev
startup, runwhile true; do grep "--no-auto-check-trustdb"<<<$(ps a); sleep 1; done
and confirm that--no-auto-check-trustdb
is actually passed togpg2
loaddata.py
to generate keys for 10-20k sourceswhile true; do grep "--no-auto-check-trustdb"<<<$(ps a); done
(no sleep as this operation is faster than generating a key)--no-auto-check-trustdb
is in the thegrep
loop outputChecklist
make lint
) and tests (make test
) pass in the development containerand validated it for this PR