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

Split up event validation between event and builder #4494

Merged
merged 5 commits into from Jan 29, 2019

Conversation

3 participants
@erikjohnston
Copy link
Member

erikjohnston commented Jan 28, 2019

The validator was being run on the EventBuilder objects, and so the
validator only checked a subset of fields. With the upcoming
EventBuilder refactor even fewer fields will be there to validate.

To get around this we split the validation into those that can be run
against an EventBuilder and those run against a fully fledged event.

erikjohnston added some commits Jan 28, 2019

Split up event validation between event and builder
The validator was being run on the EventBuilder objects, and so the
validator only checked a subset of fields. With the upcoming
EventBuilder refactor even fewer fields will be there to validate.

To get around this we split the validation into those that can be run
against an EventBuilder and those run against a fully fledged event.

@erikjohnston erikjohnston requested a review from matrix-org/synapse-core Jan 28, 2019

@erikjohnston erikjohnston added this to To Do in Homeserver Task Board via automation Jan 28, 2019

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

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 28, 2019

Codecov Report

Merging #4494 into develop will increase coverage by 0.02%.
The diff coverage is 86.66%.

@@             Coverage Diff             @@
##           develop    #4494      +/-   ##
===========================================
+ Coverage    74.77%   74.79%   +0.02%     
===========================================
  Files          336      336              
  Lines        34141    34158      +17     
  Branches      5553     5558       +5     
===========================================
+ Hits         25530    25550      +20     
+ Misses        7033     7032       -1     
+ Partials      1578     1576       -2
@richvdh
Copy link
Member

richvdh left a comment

generally seems sane, a few nits/questions

Show resolved Hide resolved synapse/events/validator.py Outdated
Show resolved Hide resolved synapse/events/validator.py Outdated
Show resolved Hide resolved synapse/events/validator.py
Show resolved Hide resolved synapse/events/validator.py Outdated

@erikjohnston erikjohnston requested a review from richvdh Jan 29, 2019

@richvdh
Copy link
Member

richvdh left a comment

lgtm

@erikjohnston erikjohnston merged commit 073f6c2 into develop Jan 29, 2019

4 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
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

@erikjohnston erikjohnston moved this from In progress to Done in Homeserver Task Board Jan 29, 2019

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