Skip to content

Releases: cloudflare/pint

v0.69.1

10 Dec 12:23
11f0788
Compare
Choose a tag to compare

Fixed

  • # pint file/owner comments were not validated properly for files with no rules.
    This is now fixed.

v0.69.0

09 Dec 11:34
76b9706
Compare
Choose a tag to compare

Added

  • Added schema option to the parser configuration block for setting rule validation
    schema. This option is only used when files are parsed in strict mode - which is when
    rule file path does NOT match any of the parser:relaxed regex values or when simply
    parser:relaxed is not set at all.
    Default value is prometheus and tells pint to expect rule files with the schema
    expected by Prometheus itself. If you use pint to validate rules loaded into Thanos Rule
    component then set schema to thanos in your pint config file:

    parser {
      schema = "thanos"
    }

    File schema when using schema: prometheus (default):

    groups:
      - name: example
        rules:
          - record: ...
            expr: ...
          - alert: ...
            expr: ...

    When using schema: thanos:

    groups:
      - name: example
        partial_response_strategy: abort
        rules:
          - record: ...
            expr: ...
          - alert: ...
            expr: ...
  • Rules configured in pint config can now be locked - when a rule is locked it cannot
    be disabled by users by adding a # pint disable ... or # pint snooze ... comments.

Fixed

  • The console reporter won't color the output if --no-color flag is set.

v0.68.0

28 Nov 16:04
c5ff536
Compare
Choose a tag to compare

Added

Changed

  • pint now uses Prometheus 3.0 libraries
    for parsing PromQL, which adds support for new query syntax that allows for dots and UTF-8 chars
    in metric/label names, example:

    {"status.üp"} == 0
  • promql/rate will now report a warning if it detects a rate(sum(...))
    but doesn't have metadata to confirm if ... is a counter or not.

v0.67.3

31 Oct 15:39
dd9cea9
Compare
Choose a tag to compare

Fixed

  • Fixed a crash when parsing vector() calls with non-number arguments.

v0.67.2

31 Oct 10:37
e9cce03
Compare
Choose a tag to compare

Fixed

v0.67.1

29 Oct 12:57
870a7cd
Compare
Choose a tag to compare

Fixed

v0.67.0

29 Oct 11:07
bbca330
Compare
Choose a tag to compare

Added

  • Added --checkstyle flag to pint lint & pint ci for writing XML report file
    in checkstyle format - #1129.

  • Added --json flag to both pint lint and pint ci commands, this enables writing a JSON file
    with the report of all problems #606.

  • promql/fragile will now warn when alerting rules are using
    one of the aggregation operation that can return different series on every evaluation,
    which can cause alert floppiness - #820.

  • promql/regexp check now supports extra configuration options
    to disable reports on smelly selector - #1096.

  • Checks can be enabled or disabled specifically for some Prometheus rules via rule {} config blocks.
    Adding enable or disable option with a list of checks names allows to selectively enable or disable
    checks only for Prometheus rules that match given rule {} definition.
    Enabling checks only for matching rules will only work if these checks are disabled globally via
    check { disabled = [] } config block.
    For example to disable promql/rate check for all rules except alerting rules in the rules/critical folder:

    checks {
      // This will disable promql/rate by default.
      disabled = [ "promql/rate" ]
    }
    rule {
      match {
        path = "rules/critical/.*"
        kind = "alerting"
      }
      // This will enable promql/rate only for Prometheus rules matching all our match conditions above.
      enable = [ "promql/rate" ]
    }

Changed

  • alerts/template check was refactored and will now produce more accurate results.
    Messages produced by this check might include details of the PromQL query fragment causing the problem
    if the query is complex enough.

Fixed

  • Don't try to create GitLab comments on unmodified lines - #1147.

v0.66.1

04 Oct 11:53
4a4d331
Compare
Choose a tag to compare

Fixed

v0.66.0

03 Oct 12:45
9024afa
Compare
Choose a tag to compare

Added

  • Added fallbackTimeout option to the promql/series check
    that controls how much time pint can spend checking other Prometheus servers for missing
    metrics.

Fixed

  • Reverted Fixed colored output on some environments - #1106 change
    as it was breaking GitHub report comments.
  • Fixed panics in rule/duplicate check.

v0.65.3

02 Oct 17:09
c7f9197
Compare
Choose a tag to compare

Fixed

  • Fixed GitHub actions permissions.