diff --git a/pg_backup_api/news.md b/pg_backup_api/news.md index 1dc1476..b1be5e8 100644 --- a/pg_backup_api/news.md +++ b/pg_backup_api/news.md @@ -2,6 +2,14 @@ © Copyright EnterpriseDB UK Limited 2021-2023 - All rights reserved. +## 2.1.0 (2024-01-25) + +### Notable changes + +- Barman now supports changes in the configuration whilst it's running. This + pg-backup-api release adds the required endpoints to trigger that switch + when requested. + ## 2.0.0 (2023-10-03) ### Notable changes diff --git a/pg_backup_api/news.yml b/pg_backup_api/news.yml index f3d2cf2..277a4a1 100644 --- a/pg_backup_api/news.yml +++ b/pg_backup_api/news.yml @@ -3,6 +3,15 @@ # pg-backup-api News - History of user-visible changes pg-backup-api release notes: + - version: "2.1.0" + date: "20240125" + changes: + Notable changes: + - | + Barman now supports changes in the configuration whilst it's running. This + pg-backup-api release adds the required endpoints to trigger that switch + when requested. + - version: "2.0.0" date: "20231003" changes: diff --git a/pg_backup_api/pg_backup_api/logic/utility_controller.py b/pg_backup_api/pg_backup_api/logic/utility_controller.py index 46b0858..2fd4688 100644 --- a/pg_backup_api/pg_backup_api/logic/utility_controller.py +++ b/pg_backup_api/pg_backup_api/logic/utility_controller.py @@ -73,10 +73,18 @@ def diagnose() -> 'Response': else: server_dict[server] = Server(conf) + available_models = barman.__config__.model_names() + model_dict = {} + for model in available_models: # pyright: ignore + model_dict[model] = barman.__config__.get_model(model) + # errors list with duplicate paths between servers errors_list = barman.__config__.servers_msg_list - barman_diagnose.exec_diagnose(server_dict, errors_list) + barman_diagnose.exec_diagnose(server_dict, + model_dict, + errors_list, + show_config_source=False) # new outputs are appended, so grab the last one stored_output = json.loads(output._writer.json_output["_INFO"][-1]) diff --git a/pg_backup_api/version.txt b/pg_backup_api/version.txt index 227cea2..7ec1d6d 100644 --- a/pg_backup_api/version.txt +++ b/pg_backup_api/version.txt @@ -1 +1 @@ -2.0.0 +2.1.0