From eb3f41c80f7132ff037faee0a63c68dc2da7d333 Mon Sep 17 00:00:00 2001 From: Innokentii Konstantinov Date: Thu, 1 Feb 2024 16:20:47 +0800 Subject: [PATCH] Enable Grafana Alerting v2 integration (#3808) Enables Grafana Alerting v2 feature. It will enable integration dropdown in OnCall Contact point in the Alerting UI. In OSS if user has grafana version which supports this feature it will work as well. If user has old grafana/oncall - nothing will happen. --------- Co-authored-by: Ildar Iskhakov --- CHANGELOG.md | 4 ++++ engine/apps/api/views/features.py | 3 +++ engine/settings/base.py | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d67c24f7..1f2ff4ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Enable Grafana Alerting V2 feature flag by default + ## v1.3.98 (2024-02-01) ### Fixed diff --git a/engine/apps/api/views/features.py b/engine/apps/api/views/features.py index 0d65a560..282cce5b 100644 --- a/engine/apps/api/views/features.py +++ b/engine/apps/api/views/features.py @@ -19,6 +19,9 @@ class Feature(enum.StrEnum): LIVE_SETTINGS = "live_settings" GRAFANA_CLOUD_NOTIFICATIONS = "grafana_cloud_notifications" GRAFANA_CLOUD_CONNECTION = "grafana_cloud_connection" + # GRAFANA_ALERTING_V2 enables advanced OnCall <-> Alerting integration. + # On Alerting side it enables integration dropdown in OnCall contact point. + # On OnCall side it do nothing, just indicating if OnCall API is ready to that integration. GRAFANA_ALERTING_V2 = "grafana_alerting_v2" LABELS = "labels" diff --git a/engine/settings/base.py b/engine/settings/base.py index 9a4c04dd..fa17ab4b 100644 --- a/engine/settings/base.py +++ b/engine/settings/base.py @@ -64,7 +64,7 @@ FEATURE_SLACK_INTEGRATION_ENABLED = getenv_boolean("FEATURE_SLACK_INTEGRATION_EN FEATURE_MULTIREGION_ENABLED = getenv_boolean("FEATURE_MULTIREGION_ENABLED", default=False) FEATURE_INBOUND_EMAIL_ENABLED = getenv_boolean("FEATURE_INBOUND_EMAIL_ENABLED", default=True) FEATURE_PROMETHEUS_EXPORTER_ENABLED = getenv_boolean("FEATURE_PROMETHEUS_EXPORTER_ENABLED", default=False) -FEATURE_GRAFANA_ALERTING_V2_ENABLED = getenv_boolean("FEATURE_GRAFANA_ALERTING_V2_ENABLED", default=False) +FEATURE_GRAFANA_ALERTING_V2_ENABLED = getenv_boolean("FEATURE_GRAFANA_ALERTING_V2_ENABLED", default=True) GRAFANA_CLOUD_ONCALL_HEARTBEAT_ENABLED = getenv_boolean("GRAFANA_CLOUD_ONCALL_HEARTBEAT_ENABLED", default=True) GRAFANA_CLOUD_NOTIFICATIONS_ENABLED = getenv_boolean("GRAFANA_CLOUD_NOTIFICATIONS_ENABLED", default=True) # Enable labels feature fo all organizations. This flag overrides FEATURE_LABELS_ENABLED_FOR_GRAFANA_ORGS