Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Patch defer.inlineCallbacks to check logcontexts in tests #4205

Merged
merged 3 commits into from
Dec 4, 2018

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Nov 19, 2018

This is a pretty grim hack, but it helped me find a bunch of the issues fixed in #4204 / #4209 (on which this PR is based, otherwise it would fail CI). Hopefully the intention is clear. If anybody has any ideas for how to do it in a less awful fashion, I'd like to hear.

@richvdh richvdh requested a review from a team November 19, 2018 17:35
@richvdh richvdh force-pushed the rav/patch_inline_callbacks branch from c751ac2 to 8a325ae Compare November 27, 2018 11:01
@richvdh
Copy link
Member Author

richvdh commented Nov 27, 2018

[rebased on develop now that #4204 and #4209 have been merged]

@codecov-io
Copy link

codecov-io commented Nov 27, 2018

Codecov Report

Merging #4205 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #4205   +/-   ##
========================================
  Coverage    66.65%   66.65%           
========================================
  Files          299      299           
  Lines        29798    29798           
  Branches      4871     4871           
========================================
  Hits         19863    19863           
  Misses        8501     8501           
  Partials      1434     1434
Impacted Files Coverage Δ
synapse/handlers/user_directory.py 70.42% <0%> (-0.31%) ⬇️
synapse/handlers/presence.py 76.06% <0%> (-0.21%) ⬇️
synapse/state/v1.py 89.14% <0%> (+1.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 944d524...8a325ae. Read the comment docs.

Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

That is pretty awful, but also probably fine.

import tests.patch_inline_callbacks

# attempt to do the patch before we load any synapse code
tests.patch_inline_callbacks.do_patch()
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should print/log that we're replacing inlineCallbacks? Just so that if we accidentally end up importing the tests package there will be some indication that this has happened

Copy link
Member Author

Choose a reason for hiding this comment

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

could do. I'm unconvinced such a warning would be noticed.

@richvdh richvdh merged commit 48972ce into develop Dec 4, 2018
@richvdh richvdh deleted the rav/patch_inline_callbacks branch December 4, 2018 10:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants