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

Cleanups in the Keyring #5001

Merged
merged 6 commits into from Apr 8, 2019

Conversation

2 participants
@richvdh
Copy link
Member

commented Apr 3, 2019

A few miscellaneous refactors which don't achieve anything on their own, but I'd like to get off my stack.

Check the commits.

@richvdh richvdh force-pushed the rav/keyring_cleanups branch 2 times, most recently from 0349e42 to 4145b05 Apr 3, 2019

@neilisfragile neilisfragile added this to In progress in Homeserver Task Board via automation Apr 4, 2019

@richvdh richvdh force-pushed the rav/keyring_cleanups branch from 4145b05 to ee2c9ed Apr 4, 2019

@codecov

This comment has been minimized.

Copy link

commented Apr 4, 2019

Codecov Report

Merging #5001 into develop will decrease coverage by 0.72%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #5001      +/-   ##
===========================================
- Coverage    61.51%   60.79%   -0.73%     
===========================================
  Files          332      332              
  Lines        34227    34170      -57     
  Branches      5646     5630      -16     
===========================================
- Hits         21056    20772     -284     
- Misses       11661    11923     +262     
+ Partials      1510     1475      -35

@richvdh richvdh force-pushed the rav/keyring_cleanups branch from ee2c9ed to f2004fb Apr 4, 2019

richvdh added some commits Apr 4, 2019

Hoist server_name check out of process_v2_response
It's easier to check it in the caller than to complicate the interface with an
extra param.
Clean up Keyring.process_v2_response
Make this just return the key dict, rather than a single-entry dict mapping the
server name to the key dict. It's easy for the caller to get the server name
from from the response object anyway.

@richvdh richvdh force-pushed the rav/keyring_cleanups branch from f2004fb to b78aac5 Apr 4, 2019

@richvdh richvdh requested a review from matrix-org/synapse-core Apr 4, 2019

@richvdh

This comment has been minimized.

Copy link
Member Author

commented Apr 4, 2019

which don't achieve anything on their own

Actually this isn't quite true. I think it will fix a bug in get_server_verify_key_v2_direct, wherein we call /key/v2/server for each key we require from that server, even if we got all the keys on the first request, due to confusion over what is stored in keys.

@richvdh richvdh merged commit 7fc1e17 into develop Apr 8, 2019

24 checks passed

buildkite/synapse Build #866 passed (13 minutes, 25 seconds)
Details
buildkite/synapse/check-sample-config Passed (1 minute, 16 seconds)
Details
buildkite/synapse/isort Passed (17 seconds)
Details
buildkite/synapse/newspaper-newsfile Passed (14 seconds)
Details
buildkite/synapse/packaging Passed (17 seconds)
Details
buildkite/synapse/pep-8 Passed (54 seconds)
Details
buildkite/synapse/pipeline Passed (2 seconds)
Details
buildkite/synapse/python-2-dot-7-slash-postgres-9-dot-4 Passed (11 minutes, 40 seconds)
Details
buildkite/synapse/python-2-dot-7-slash-postgres-9-dot-5 Passed (11 minutes, 50 seconds)
Details
buildkite/synapse/python-2-dot-7-slash-sqlite Passed (7 minutes)
Details
buildkite/synapse/python-2-dot-7-slash-sqlite-slash-old-deps Passed (8 minutes, 22 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-postgres-9-dot-4 Passed (12 minutes, 14 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-postgres-9-dot-5 Passed (12 minutes, 24 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite Passed (7 minutes, 27 seconds)
Details
buildkite/synapse/python-3-dot-6-slash-sqlite Passed (7 minutes, 29 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-11 Passed (12 minutes, 4 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-9-dot-5 Passed (12 minutes, 11 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-sqlite Passed (7 minutes, 34 seconds)
Details
ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgresmerged Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 0%)
Details
codecov/project 60.79% (target 0%)
Details

Homeserver Task Board automation moved this from In progress to Done Apr 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.