Skip to content
Snippets Groups Projects
  1. Feb 04, 2022
  2. Feb 03, 2022
  3. Feb 02, 2022
  4. Feb 01, 2022
  5. Jan 31, 2022
  6. Jan 28, 2022
  7. Jan 27, 2022
  8. Jan 26, 2022
  9. Jan 25, 2022
    • David Robertson's avatar
      Fix another jsonschema typecheck error (#11830) · 74e4419e
      David Robertson authored
      Similar to #11817.
      
      In `_create_power_level_validator` we
      - retrieve `validator`. This is a class implementing the
        `jsonschema.protocols.Validator` interface. In other words,
        `validator: Type[jsonschema.protocols.Validator]`.
      - we then create an second validator class by modifying the original
        `validator`. We return that class, which is also of type
        `Type[jsonschema.protocols.Validator]`.
      
      So the original annotation was incorrect: it claimed we were returning
      an instance of jsonSchema.Draft7Validator, not the class (or a subclass)
      itself. (Strictly speaking this is incorrect, because `POWER_LEVELS_SCHEMA`
      isn't pinned to a particular version of JSON Schema. But there are other
      complications with the type stubs if you try to fix this; I felt like
      the change herein was a decent compromise that better expresses intent).
      
      (I suspect/hope the typeshed project would welcome an effort to improve
      the jsonschema stubs. Let's see if I get some spare time.)
      Unverified
      74e4419e
    • Shay's avatar
      Check that `gc` method is available before using in `synapse/app/_base` (#11816) · b8bf6007
      Shay authored
      
      * add check that gc.freeze is available before calling
      
      * newsfragment
      
      * lint
      
      * Update comment
      
      Co-authored-by: default avatarDan Callahan <danc@element.io>
      
      Co-authored-by: default avatarDan Callahan <danc@element.io>
      Unverified
      b8bf6007
    • Dirk Klimpel's avatar
    • kegsay's avatar
      CI: run Complement on the VM, not inside Docker (#11811) · 0938f32e
      kegsay authored
      * CI: run Complement on the VM, not inside Docker
      
      This requires https://github.com/matrix-org/complement/pull/289
      
      
      
      We now run Complement on the VM instead of inside a Docker container.
      This is to allow Complement to bind to any high-numbered port when it
      starts up its own federation servers. We want to do this to allow for
      more concurrency when running complement tests. Previously, Complement
      only ever bound to `:8448` when running its own federation server. This
      prevented multiple federation tests running at the same time as they would
      fight each other on the port. This did however allow Complement to run
      in Docker, as the host could just port forward `:8448` to allow homeserver
      containers to communicate to Complement. Now that we are using random
      ports however, we cannot use Docker to run Complement. This ends up
      being a good thing because:
       - Running Complement tests locally is closer to how they run in CI.
       - Allows the `CI` env var to be removed in Complement.
       - Slightly speeds up runs as we don't need to pull down the Complement
         image prior to running tests. This assumes GHA caches actions sensibly.
      
      * Changelog
      
      * Full stop
      
      * Update .github/workflows/tests.yml
      
      Co-authored-by: default avatarRichard van der Hoff <1389908+richvdh@users.noreply.github.com>
      
      * Review comments
      
      * Update .github/workflows/tests.yml
      
      Co-authored-by: default avatarRichard van der Hoff <1389908+richvdh@users.noreply.github.com>
      
      Co-authored-by: default avatarRichard van der Hoff <1389908+richvdh@users.noreply.github.com>
      Unverified
      0938f32e
Loading