Skip to content

Commit

Permalink
Merge pull request #414 from canonical/kf-6343-fix-alert-backport
Browse files Browse the repository at this point in the history
backport(fix): Comment out firing alert rule from #412
  • Loading branch information
orfeas-k authored Nov 7, 2024
2 parents d27c792 + cf3b2ea commit 8e44c65
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Uncomment the alert below and modify the file's extension to be `.rule`
# once https://github.com/canonical/notebook-operators/issues/409 is fixed
# alert: JupyterControllerRuntimeReconciliationErrorsExceedThreshold
# expr: rate(controller_runtime_reconcile_errors_total[5m]) > 0
# for: 0m
# labels:
# severity: critical
# annotations:
# summary: Total number of reconciliation errors per controller
# description: >
# Total number of reconciliation errors per controller
# LABELS = {{ $labels }}

This file was deleted.

8 changes: 5 additions & 3 deletions charms/jupyter-controller/tests/unit/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ def test_prometheus_data_set(self, harness: Harness, mocker):
# there 2 alert rules in host_resources.rules
for rule in file_alert["groups"][0]["rules"]:
test_alerts.append(rule["alert"])
with open("src/prometheus_alert_rules/model_errors.rule") as f:
file_alert = yaml.safe_load(f.read())
test_alerts.append(file_alert["alert"])
# Uncomment once https://github.com/canonical/notebook-operators/issues/409
# is fixed.
# with open("src/prometheus_alert_rules/model_errors.rule") as f:
# file_alert = yaml.safe_load(f.read())
# test_alerts.append(file_alert["alert"])
with open("src/prometheus_alert_rules/KubeflowJupyterControllerServices.rules") as f:
file_alert = yaml.safe_load(f.read())
# there 2 alert rules in host_resources.rules
Expand Down

0 comments on commit 8e44c65

Please sign in to comment.