cloudflare/pint

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.13.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

docs/changelog.md

396lines · modecode

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