From a983325229973428d641058e4414bac99908859c Mon Sep 17 00:00:00 2001 From: Guillaume Bau Date: Thu, 12 Jun 2025 10:37:31 +0200 Subject: [PATCH 1/2] Tezt/Cloud/Alert_manager: fix config to allow posting via bot_tokens --- tezt/lib_cloud/alert_manager.ml | 8 ++------ tezt/lib_cloud/alert_manager/alert_manager.yml.jingoo | 7 ++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tezt/lib_cloud/alert_manager.ml b/tezt/lib_cloud/alert_manager.ml index 41aaad259997..6dab8deb2e6e 100644 --- a/tezt/lib_cloud/alert_manager.ml +++ b/tezt/lib_cloud/alert_manager.ml @@ -108,12 +108,8 @@ let jingoo_receiver_template receiver = ( "http_config", Tobj [ - ( "authorization", - Tobj - [ - ("type", Tstr "Bearer"); - ("credentials", Tstr bot_token); - ] ); + ("type", Tstr "Bearer"); + ("credentials", Tstr bot_token); ] ); ]) ); ] diff --git a/tezt/lib_cloud/alert_manager/alert_manager.yml.jingoo b/tezt/lib_cloud/alert_manager/alert_manager.yml.jingoo index 6ed2353edc1d..495098fd48f3 100644 --- a/tezt/lib_cloud/alert_manager/alert_manager.yml.jingoo +++ b/tezt/lib_cloud/alert_manager/alert_manager.yml.jingoo @@ -33,13 +33,18 @@ receivers: slack_configs: - channel: '{{ receiver.config.channel }}' api_url: '{{ receiver.config.api_url }}' - {%- if receiver.config.text %} text: '{{ receiver.config.text|safe }}' {%- endif -%} {%- if receiver.config.title %} title: '{{ receiver.config.title }}' {%- endif -%} + {%- if receiver.config.http_config %} + http_config: + authorization: + type: '{{ receiver.config.http_config.type }}' + credentials: '{{ receiver.config.http_config.credentials }}' + {% endif -%} {% endif -%} {% endfor %} -- GitLab From ad72c867a8257daac832e5ca57add88324be5576 Mon Sep 17 00:00:00 2001 From: Guillaume Bau Date: Thu, 12 Jun 2025 10:39:32 +0200 Subject: [PATCH 2/2] Tezt/Cloud/Alert_manager: fix slack api url --- tezt/lib_cloud/alert_manager.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tezt/lib_cloud/alert_manager.ml b/tezt/lib_cloud/alert_manager.ml index 6dab8deb2e6e..498919f10555 100644 --- a/tezt/lib_cloud/alert_manager.ml +++ b/tezt/lib_cloud/alert_manager.ml @@ -58,7 +58,7 @@ let slack_bottoken_receiver ~name ~channel ~bot_token ?title ?text () = { name; channel; - api_url = "https://api.slack.com/methods/chat.postMessage"; + api_url = "https://slack.com/api/chat.postMessage"; bot_token = Some bot_token; title; text; -- GitLab