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

Fix synapse.config module "read" command #11145

Merged
merged 6 commits into from
Oct 22, 2021
Merged

Commits on Oct 21, 2021

  1. Fix synapse.config module "read" command

    `synapse.config.__main__` has the possibility to read a config item. This can be used to conveniently also validate the config is valid before trying to start Synapse.
    
     The "read" command broke in #10916 as it now requires passing in "server.server_name" for example.
    
     Also made the read command optional so one can just call this with just the confirm file reference and get a "Config parses OK" if things are ok.
    
    Signed-off-by: Jason Robinson <jasonr@matrix.org>
    jaywink committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    38abbe0 View commit details
    Browse the repository at this point in the history
  2. Update synapse/config/__main__.py

    Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
    jaywink and babolivier committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    757b1a5 View commit details
    Browse the repository at this point in the history
  3. Add more informative error on no key found

    Signed-off-by: Jason Robinson <jasonr@matrix.org>
    jaywink committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    d53d65e View commit details
    Browse the repository at this point in the history
  4. Add tests for synapse.config.__main__

    Few basic tests to parse a config file when no arguments and config key read success/fail. Refactor test_load.py a bit to provide a common test case class for the config tests using a generated config file to parse.
    
    Signed-off-by: Jason Robinson <jasonr@matrix.org>
    jaywink committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    f5952d2 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2021

  1. Update changelog.d/11145.bugfix

    Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
    jaywink and babolivier committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    bb5477f View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary methods from ConfigLoadingFileTestCase

    Signed-off-by: Jason Robinson <jasonr@matrix.org>
    jaywink committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    94767cb View commit details
    Browse the repository at this point in the history