Skip to content
Snippets Groups Projects
  1. Sep 22, 2021
    • David Teller's avatar
      Extend ModuleApi with the methods we'll need to reject spam based on …IP - resolves #10832 (#10833) · 80828eda
      David Teller authored
      
      Extend ModuleApi with the methods we'll need to reject spam based on IP - resolves #10832
      
      Signed-off-by: default avatarDavid Teller <davidt@element.io>
      Unverified
      80828eda
    • Richard van der Hoff's avatar
      Include outlier status in `str(event)` for V2/V3 events (#10879) · 4ecf5181
      Richard van der Hoff authored
      I meant to do this before, in #10591, but because I'm stupid I forgot to do it
      for V2 and V3 events.
      
      I've factored the common code out to `EventBase` to save us having two copies
      of it.
      
      This means that for `FrozenEvent` we replace `self.get("event_id", None)` with
      `self.event_id`, which I think is safe. `get()` is an alias for
      `self._dict.get()`, whereas `event_id()` is an `@property` method which looks
      up `self._event_id`, which is populated during construction from the same
      dict. We don't seem to rely on the fallback, because if the `event_id` key is
      absent from the dict then construction of the `EventBase` object will
      fail.
      
      Long story short, the only way this could change behaviour is if
      `event_dict["event_id"]` is changed *after* the `EventBase` object is
      constructed without updating the `_event_id` field, or vice versa - either of
      which would be very problematic anyway and the behavior of `str(event)` is the
      least of our worries.
      Unverified
      4ecf5181
    • David Robertson's avatar
      Track why we're evicting from caches (#10829) · a2d7195e
      David Robertson authored
      So we can see distinguish between "evicting because the cache is too big" and "evicting because the cache entries haven't been recently used".
      Unverified
      a2d7195e
  2. Sep 21, 2021
  3. Sep 20, 2021
  4. Sep 17, 2021
  5. Sep 16, 2021
  6. Sep 15, 2021
  7. Sep 14, 2021
    • reivilibre's avatar
      Make StateFilter frozen so we can hash it (#10816) · 8eb7cb2e
      reivilibre authored
      Also enables Mypy for related tests.
      Unverified
      8eb7cb2e
    • Sean Quah's avatar
      Prevent logging context going missing on federation request timeout (#10810) · 14b8c047
      Sean Quah authored
      In `MatrixFederationHttpClient._send_request()`, we make a HTTP request
      using an `Agent`, wrap that request in a timeout and await the resulting
      `Deferred`. On its own, the `Agent` performing the HTTP request
      correctly stashes and restores the logging context while waiting.
      The addition of the timeout introduces a path where the logging context
      is not restored when execution resumes.
      
      To address this, we wrap the timeout `Deferred` in a
      `make_deferred_yieldable()` to stash the logging context and restore it
      on completion of the `await`. However this is not sufficient, since by
      the time we construct the timeout `Deferred`, the `Agent` has already
      stashed and cleared the logging context when using
      `make_deferred_yieldable()` to produce its `Deferred` for the request.
      
      Hence, we wrap the `Agent` request in a `run_in_background()` to "fork"
      and preserve the logging context so that we can stash and restore it
      when `await`ing the timeout `Deferred`.
      
      This approach is similar to the one used with `defer.gatherResults`.
      
      Note that the code is still not fully correct. When a timeout occurs,
      the request remains running in the background (existing behavior which
      is nothing to do with the new call to `run_in_background`) and may
      re-start the logging context after it has finished.
      Unverified
      14b8c047
    • Patrick Cloke's avatar
      Convert media repo's FileInfo to attrs. (#10785) · b996782d
      Patrick Cloke authored
      This is mostly an internal change, but improves type hints in the
      media code.
      Unverified
      b996782d
    • Andrew Morgan's avatar
      1.43.0rc1 · d725e095
      Andrew Morgan authored
      d725e095
    • David Robertson's avatar
      Name the type of token in "Invalid token" messages (#10815) · 319b8b6b
      David Robertson authored
      I had one of these error messages yesterday and assumed it was an
      invalid auth token (because that was an HTTP query parameter in the
      test) I was working on. In fact, it was an invalid next batch token for
      syncing.
      Unverified
      319b8b6b
  8. Sep 13, 2021
  9. Sep 10, 2021
Loading