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

Move SRV magic into an Agent-like thing #4428

Merged
merged 8 commits into from Jan 23, 2019

Conversation

3 participants
@richvdh
Copy link
Member

richvdh commented Jan 21, 2019

(This PR builds on top of #4426 and #4427)

This PR replaces the matrix_federation_endpoint with a thing that is implemented in an Agent instead. This simplifies a bunch of code, and is a prerequisite for .well-known support.

@richvdh richvdh requested a review from matrix-org/synapse-core Jan 21, 2019

@richvdh richvdh added this to To Do in Homeserver Task Board via automation Jan 22, 2019

@richvdh richvdh moved this from To Do to In progress in Homeserver Task Board Jan 22, 2019

@richvdh richvdh force-pushed the rav/matrix_federation_agent branch from 582a504 to 8f23d87 Jan 22, 2019

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 22, 2019

Codecov Report

Merging #4428 into develop will decrease coverage by 0.04%.
The diff coverage is 78.57%.

@@             Coverage Diff             @@
##           develop    #4428      +/-   ##
===========================================
- Coverage     73.7%   73.66%   -0.05%     
===========================================
  Files          300      302       +2     
  Lines        29705    29816     +111     
  Branches      4882     4895      +13     
===========================================
+ Hits         21895    21963      +68     
- Misses        6385     6426      +41     
- Partials      1425     1427       +2

richvdh added some commits Jan 21, 2019

MatrixFederationAgent
Pull the magic that is currently in matrix_federation_endpoint and friends into
an agent-like thing
Make MatrixFederationClient use MatrixFederationAgent
... instead of the matrix_federation_endpoint
Kill off matrix_federation_endpoint
this thing is now redundant.

@richvdh richvdh force-pushed the rav/matrix_federation_agent branch from 8f23d87 to c66f4bf Jan 22, 2019

richvdh added some commits Jan 22, 2019

Require that service_name be a byte string
it is only ever a bytes now, so let's enforce that.
put resolve_service in an object
this makes it easier to stub things out for tests.
@richvdh

This comment has been minimized.

Copy link
Member Author

richvdh commented Jan 22, 2019

sorry about the size of this PR. You might find the individual commits easier to review.

@hawkowl

This comment has been minimized.

Copy link
Contributor

hawkowl commented Jan 23, 2019

https://codecov.io/gh/matrix-org/synapse/pull/4428/diff#D5-104 isn't hit via coverage, which means pick_server_from_list isn't getting any coverage. Is it possible to add a test for this?

@richvdh richvdh merged commit a0ae475 into develop Jan 23, 2019

5 checks passed

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
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@richvdh richvdh deleted the rav/matrix_federation_agent branch Jan 23, 2019

@richvdh richvdh moved this from In progress to Done in Homeserver Task Board Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment