Skip to content

Commit

Permalink
fix: Comment out firing alert rule (#412)
Browse files Browse the repository at this point in the history
This comments out an alert rule that's always `Firing` due to kubeflow/notebooks#62

Ref #409
  • Loading branch information
orfeas-k authored Nov 6, 2024
1 parent 25652f3 commit f136b61
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 f136b61

Please sign in to comment.