-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add pint #958
chore: add pint #958
Conversation
126b238
to
79f3322
Compare
Test run: https://github.com/kubernetes-monitoring/kubernetes-mixin/actions/runs/9982477680/job/27588267056?pr=958#step:4:56. LMK if this looks good and I'll send a patch fixing it. |
LGTM, but some merge conflicts / failing ci 👍 |
0b7cdb8
to
fca4313
Compare
@@ -143,7 +143,7 @@ | |||
{ | |||
expr: ||| | |||
( | |||
max without (revision) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pint suggested a refactor here.
┌[rexagod@nebuchadnezzar] [/dev/ttys000] [pint ⚡] [2]
└[~/repositories/oss/kubernetes-mixin]> make pint-lint
prometheus_alerts.yaml:106-123 Warning: Aggregation using `without()` can be fragile when used inside binary expression because both sides must have identical sets of labels to produce any results, adding or removing labels to metrics used here can easily break the query, consider aggregating using `by()` to ensure consistent labels. (promql/fragile)
106 | "expr": |
107 | (
108 | max without (revision) (
109 | kube_statefulset_status_current_revision{job="kube-state-metrics"}
110 | unless
111 | kube_statefulset_status_update_revision{job="kube-state-metrics"}
112 | )
113 | *
114 | (
115 | kube_statefulset_replicas{job="kube-state-metrics"}
116 | !=
117 | kube_statefulset_status_replicas_updated{job="kube-state-metrics"}
118 | )
119 | ) and (
120 | changes(kube_statefulset_status_replicas_updated{job="kube-state-metrics"}[5m])
121 | ==
122 | 0
123 | )
make: *** [pint-lint] Error 1
Continues #838.