Skip to content
Snippets Groups Projects
  1. Feb 03, 2023
    • Patrick Cloke's avatar
      Reload the pyo3-log config when the Python logging config changes. (#14976) · 8e9fc28c
      Patrick Cloke authored
      Since pyo3-log is initialized very early in the Python start-up
      it caches the state of the loggers before they're fully initialized
      (and thus are essentially disabled). Whenever we reload the
      logging configuration we now also tell pyo3-log to discard
      any cached logging configuration it has; it will refetch the
      current logging configuration from Python at the next point
      it logs.
      
      This fixes Rust log lines not appearing in the homeserver logs.
      8e9fc28c
  2. Feb 02, 2023
  3. Feb 01, 2023
  4. Jan 31, 2023
    • H. Shay's avatar
      Merge branch 'master' into develop · 41d177ca
      H. Shay authored
      41d177ca
    • H. Shay's avatar
    • H. Shay's avatar
      update changelog · e4bf5f3b
      H. Shay authored
      e4bf5f3b
    • H. Shay's avatar
      1.76.0 · 9cb25b20
      H. Shay authored
      9cb25b20
    • Patrick Cloke's avatar
      58518059
    • David Robertson's avatar
      Tag /send_join responses to detect faster joins (#14950) · 3b8574b4
      David Robertson authored
      * Tag /send_join responses to detect faster joins
      
      * Changelog
      
      * Define a proper SynapseTag
      
      * isort
      3b8574b4
    • Sean Quah's avatar
      Fix "Re-starting finished log context" spam when creating events (#14947) · 805b641f
      Sean Quah authored
      
      `run_in_background` calls re-use the current logging context. When they
      are not awaited, they can complete after the current logging context has
      been marked as finished, which leads to log spam. Use
      `run_as_background_process` instead.
      
      Fixes one of the instances of #13090.
      
      Signed-off-by: default avatarSean Quah <seanq@matrix.org>
      805b641f
    • Sean Quah's avatar
      Make sqlite database migrations transactional again, part two (#14926) · 6d14fdc2
      Sean Quah authored
      
      #14910 fixed the regression introduced by #13873 where sqlite database
      migrations would no longer run inside a transaction. However, it
      committed the transaction before Synapse updated its bookkeeping of
      which migrations have been run, which means that migrations may be run
      again after they have completed successfully.
      
      Leave the transaction open at the end of `executescript`, to restore the
      old, correct behaviour. Also make the PostgreSQL behaviour consistent
      with SQLite.
      
      Fixes #14909.
      
      Signed-off-by: default avatarSean Quah <seanq@matrix.org>
      6d14fdc2
    • David Robertson's avatar
      Reject boolean power levels (#14944) · a134e626
      David Robertson authored
      * Better test for bad values in power levels events
      
      The previous test only checked that Synapse didn't raise an exception,
      but didn't check that we had correctly interpreted the value of the
      dodgy power level.
      
      It also conflated two things: bad room notification levels, and bad user
      levels. There _is_ logic for converting the latter to integers, but we
      should test it separately.
      
      * Check we ignore types that don't convert to int
      
      * Handle `None` values in `notifications.room`
      
      * Changelog
      
      * Also test that bad values are rejected by event auth
      
      * Docstring
      
      * linter scripttttttttt
      
      * Test boolean values in PL content
      
      * Reject boolean power levels
      
      * Changelog
      a134e626
    • David Robertson's avatar
      Prefer `type(x) is int` to `isinstance(x, int)` (#14945) · 796a4b74
      David Robertson authored
      * Perfer `type(x) is int` to `isinstance(x, int)`
      
      This covered all additional instances I could see where `x` was
      user-controlled.
      The remaining cases are
      
      ```
      $ rg -s 'isinstance.*[^_]int'
      tests/replication/_base.py
      576:        if isinstance(obj, int):
      
      synapse/util/caches/stream_change_cache.py
      136:        assert isinstance(stream_pos, int)
      214:        assert isinstance(stream_pos, int)
      246:        assert isinstance(stream_pos, int)
      267:        assert isinstance(stream_pos, int)
      
      synapse/replication/tcp/external_cache.py
      133:        if isinstance(result, int):
      
      synapse/metrics/__init__.py
      100:        if isinstance(calls, (int, float)):
      
      synapse/handlers/appservice.py
      262:        assert isinstance(new_token, int)
      
      synapse/config/_util.py
      62:        if isinstance(p, int):
      ```
      
      which cover metrics, logic related to `jsonschema`, and replication and
      data streams. AFAICS these are all internal to Synapse
      
      * Changelog
      796a4b74
  5. Jan 30, 2023
  6. Jan 27, 2023
  7. Jan 26, 2023
Loading