cloudflare/pint

Public

mirrored from https://github.com/cloudflare/pintAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.12.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

docs/changelog.md

363lines · modecode

1# Changelog
2
3## v0.12.0
4
5### Added
6
7- Added `pint_last_run_time_seconds` and `pint_rules_parsed_total` metrics when running `pint watch`.
8
9### Changed
10
11- `promql/comparison` only applies to alerts, so it was renamed to
12 `alerts/comparison`.
13- Online documentation hosted at [cloudflare.github.io/pint](https://cloudflare.github.io/pint/)
14 was reworked.
15- `alerts/count` check will now retry range queries with shorter time window
16 on `found duplicate series for the match group ...` errors from Prometheus.
17
18## v0.11.1
19
20### Fixed
21
22- `pint_prometheus_queries_total` and `pint_prometheus_query_errors_total` metrics
23 were not incremented correctly.
24
25## v0.11.0
26
27### Added
28
29- Added `promql/regexp` check that will warn about unnecessary regexp matchers.
30- Added `pint_prometheus_queries_total` and `pint_prometheus_query_errors_total`
31 metric when running `pint watch`.
32
33## v0.10.1
34
35### Fixed
36
37- Fixed a number of bug with `promql/vector_matching` check.
38
39## v0.10.0
40
41### Changed
42
43- `query/series` check was renamed to `promql/series`.
44
45### Fixed
46
47- Improved the logic of `promql/vector_matching` check.
48
49## v0.9.0
50
51### Changed
52
53- Removed `lines` label from `pint_problem` metric exported when running `pint watch`.
54- Multiple `match` and `ignore` blocks can now be specified per each `rule`.
55
56## v0.8.2
57
58### Added
59
60- Export `pint_version` metric when running `pint watch`.
61- Added `--min-severity` flag to `pint watch` command.
62
63## v0.8.1
64
65### Added
66
67- Added `--max-problems` flag to `pint watch` command.
68
69### Changed
70
71- Updated Prometheus modules to [v2.33.0](https://github.com/prometheus/prometheus/releases/tag/v2.33.0).
72 This adds support for `stripPort` template function.
73
74## v0.8.0
75
76### Added
77
78- Added new `promql/fragile` check.
79- BitBucket reports will now include a link to documentation.
80
81## v0.7.3
82
83### Added
84
85- `--workers` flag to control the number of worker threads for running checks.
86
87## v0.7.2
88
89### Changed
90
91- More aggressive range reduction for `query processing would load too many samples into memory`
92 errors when sending range queries to Prometheus servers.
93
94## v0.7.1
95
96### Added
97
98- Added `command` filter to `match` / `ignore` blocks. This allows to include
99 skip some checks when (for example) running `pint watch` but include them
100 in `pint lint` run.
101
102## v0.7.0
103
104### Added
105
106- Cache each Prometheus server responses to minimize the number of API calls.
107- `pint watch` will start a daemon that will continuously check all matching rules
108 and expose metrics describing all discovered problems.
109
110### Changed
111
112- `alerts/annotation` and `rule/label` now include `required` flag value in
113 `# pint disable ...` comments.
114 Rename `# pint disable alerts/annotation($name)` to
115 `# pint disable alerts/annotation($name:$required)` and
116 `# pint disable rule/label($name)` to `# pint disable rule/label($name:$required)`.
117- `--offline` and `--disabled` flags are now global, use `pint --offline lint` instead
118 of `pint lint --offline`.
119
120### Fixed
121
122- `promql/rate`, `query/series` and `promql/vector_matching` checks were not enabled
123 for all defined `prometheus {}` blocks unless there was at least one `rule {}` block.
124- `annotation` based `match` blocks didn't work correctly.
125
126## v0.6.6
127
128### Fixed
129
130- File renames were not handled correctly when running `git ci` on branches with
131 multiple commits.
132
133## v0.6.5
134
135### Added
136
137- Allow disabling `query/series` check for individual series using
138 `# pint disable query/series(my_metric_name)` comments.
139
140## v0.6.4
141
142### Fixed
143
144- Fixed docker builds.
145
146## v0.6.3
147
148### Fixed
149
150- `aggregate` check didn't report stripping required labels on queries
151 using aggregation with no grouping labels (`sum(foo)`).
152- `aggregate` check didn't test for name and label matches on alert rules.
153
154## v0.6.2
155
156### Changed
157
158- `template` check will now include alert query line numbers when reporting issues.
159
160## v0.6.1
161
162### Fixed
163
164- Labels returned by `absent()` are only from equal match types (`absent(foo="bar")`,
165 not `absent(foo=~"bar.+")` but `alerts/template` didn't test for match type when
166 checking for labels sourced from `absent()` queries.
167
168## v0.6.0
169
170### Changed
171
172- `aggregate` check was refactored and uses to run a single test for both
173 `by` and `without` conditions. As a result this check might now find issues
174 previously undetected.
175 Check suppression comments will need to be migrated:
176 * `# pint disable promql/by` becomes `# pint disable promql/aggregate`
177 * `# pint disable promql/without` becomes `# pint disable promql/aggregate`
178 * `# pint ignore promql/by` becomes `# pint ignore promql/aggregate`
179 * `# pint ignore promql/without` becomes `# pint ignore promql/aggregate`
180
181## v0.5.3
182
183### Fixed
184
185- Fixed false positive reports in `aggregate` check.
186
187## v0.5.2
188
189### Added
190
191- `--no-color` flag for disabling output colouring.
192
193### Fixed
194
195- Fixed duplicated warnings when multiple `rule {...}` blocks where configured.
196
197## v0.5.1
198
199### Fixed
200
201- Specifying multiple `# pint disable ...` comments on a single rule would only apply
202 last comment. This now works correctly and all comments will be applied.
203
204## v0.5.0
205
206### Added
207
208- Added `alerts/for` check that will look for invalid `for` values in alerting rules.
209 This check is enabled by default.
210
211### Changed
212
213- `comparison` check is now enabled by default and require no configuration.
214 Remove `comparison{ ... }` blocks from pint config file when upgrading.
215- `template` check is now enabled by default and require no configuration.
216 Remove `template{ ... }` blocks from pint config file when upgrading.
217- `rate` check is now enabled by default for all configured Prometheus servers.
218 Remove `rate{ ... }` blocks from pint config file when upgrading.
219- `series` check is now enabled by default for all configured Prometheus servers.
220 Remove `series{ ... }` blocks from pint config file when upgrading.
221- `vector_matching` check is now enabled by default for all configured Prometheus servers.
222 Remove `vector_matching{ ... }` blocks from pint config file when upgrading.
223
224## v0.4.4
225
226### Added
227
228- Support `parseDuration` function in alert templates added in Prometheus 2.32.0
229
230## v0.4.3
231
232### Fixed
233
234- Fixed `series` check handling of queries with `{__name__="foo"}` selectors.
235
236## v0.4.2
237
238### Fixed
239
240- Fixed `template` check handling of `absent` calls on aggregated metrics, like
241 `absent(sum(nonexistent{job="myjob"}))`.
242
243## v0.4.1
244
245### Added
246
247- `template` check will now warn if any template is referencing a label that is not passed to
248 `absent()`.
249 Example:
250
251 {% raw %}
252 ```yaml
253 - alert: Foo
254 expr: absent(foo{env="prod"})
255 annotations:
256 summary: 'foo metric is missing for job {{ $labels.job }}'
257 ```
258 {% endraw %}
259
260 Would generate a warning since `absent()` can only return labels that are explicitly
261 passed to it and the above call only passes `env` label.
262 This can be fixed by updating the query to `absent(foo{env="prod", job="bar"})`.
263
264## v0.4.0
265
266### Added
267
268- `comparison` check will now warn when alert query uses
269 [bool](https://prometheus.io/docs/prometheus/latest/querying/operators/#comparison-binary-operators)
270 modifier after condition, which can cause alert to always fire.
271 Example:
272
273 ```yaml
274 - alert: Foo
275 expr: rate(error_count[5m]) > bool 5
276 ```
277
278 Having `bool` as part of `> 5` condition means that the query will return value `1` when condition
279 is met, and `0` when it's not. Rather than returning value of `rate(error_count[5m])` only when
280 that value is `> 5`. Since all results of an alerting rule `expr` are considered alerts such alert
281 rule could always fire, regardless of the value returned by `rate(error_count[5m])`.
282
283### Fixed
284
285- `comparison` check will now ignore `absent(foo)` alert queries without any condition.
286
287## v0.3.1
288
289### Added
290
291- `--offline` flag for `pint ci` command.
292
293### Fixed
294
295- Fixed `template` check panic when alert query had a syntax error.
296
297## v0.3.0
298
299### Added
300
301- `rule` block can now specify `ignore` conditions that have the same syntax as `match`
302 but will disable `rule` for matching alerting and recording rules #48.
303- `match` and `ignore` blocks can now filter alerting and recording rules by name.
304 `record` will be used as name for recording rules and `alert` for alerting rules.
305
306## v0.2.0
307
308### Added
309
310- `--offline` flag for `pint lint` command. When passed only checks that don't send
311 any live queries to Prometheus server will be run.
312- `template` check will now warn if template if referencing a label that is being
313 stripped by aggregation.
314 Example:
315
316 {% raw %}
317 ```yaml
318 - alert: Foo
319 expr: count(up) without(instance) == 0
320 annotations:
321 summary: 'foo is down on {{ $labels.instance }}'
322 ```
323 {% endraw %}
324
325 Would generate a warning since `instance` label is being stripped by `without(instance)`.
326
327## v0.1.5
328
329### Fixed
330
331- Fixed file descriptor leak due to missing file `Close()` #69.
332
333## v0.1.4
334
335### Changed
336
337- Retry queries that error with `query processing would load too many samples into memory`
338 using a smaller time range.
339
340## v0.1.3
341
342### Added
343
344- `vector_matching` check for finding queries with incorrect `on()` or `ignoring()`
345 keywords.
346
347### Fixed
348
349- `comparison` check would trigger false positive for rules using `unless` keyword.
350
351## v0.1.2
352
353### Fixed
354
355- `# pint skip/line` place between `# pint skip/begin` and `# pint skip/end` lines would
356 reset ignore rules causing lines that should be ignored to be parsed.
357
358## v0.1.1
359
360### Changed
361
362- `value` check was replaced by `template`, which covers the same functionality and more.
363 See [docs](/docs/CONFIGURATION.md#template) for details.
364