Skip to content

Migrate to go-yaml v4 - #2038

Merged
prymitive merged 2 commits into
mainfrom
yaml
Nov 19, 2026
Merged

prymitive merged 2 commits into
mainfrom
yaml

Conversation

@prymitive

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request was validated by pint.

❗ Problems found.

Severity Number of problems
Information 5
Stats

Stat Value
Version v0.90.0-10-g9b4ff6e2
Number of rules parsed 22
Number of rules checked 22
Number of problems found 5
Number of offline checks 5
Number of online checks 0
Checks duration 3ms

Problems

Information: problem reported by config rule (rule/report)
  ---> .github/pint/rules/reject.yml:4-10 -> `Bad Label Key` [+4 duplicates]
4 |   - alert: Bad Label Key
               ^^^^^^^^^^^^^ Rules in this file are intentionally broken for testing.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2f6544b) to head (9b4ff6e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2038   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          115       115           
  Lines        13923     13968   +45     
=========================================
+ Hits         13923     13968   +45     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Benchmark diff:

goos: linux
goarch: amd64
pkg: github.com/cloudflare/pint/cmd/pint
cpu: AMD EPYC 9V74 80-Core Processor                
                             │   old.txt    │               new.txt               │
                             │    sec/op    │    sec/op     vs base               │
GlobFinder                     31.09m ± ∞ ¹   31.39m ± ∞ ¹        ~ (p=0.699 n=6)
GitFinder                      479.3m ± ∞ ¹   483.8m ± ∞ ¹        ~ (p=0.132 n=6)
Check/promql/regexp            1.242m ± ∞ ¹   1.291m ± ∞ ¹   +3.99% (p=0.041 n=6)
Check/promql/impossible        72.03µ ± ∞ ¹   72.64µ ± ∞ ¹        ~ (p=0.065 n=6)
Check/rule/duplicate           12.45m ± ∞ ¹   12.46m ± ∞ ¹        ~ (p=0.937 n=6)
Check/promql/features          66.35µ ± ∞ ¹   66.61µ ± ∞ ¹        ~ (p=0.093 n=6)
Check/alerts/count             9.760m ± ∞ ¹   9.320m ± ∞ ¹   -4.51% (p=0.002 n=6)
Check/rule/reject              131.9µ ± ∞ ¹   131.4µ ± ∞ ¹        ~ (p=0.058 n=6)
Check/promql/series            931.8m ± ∞ ¹   937.9m ± ∞ ¹        ~ (p=1.000 n=6)
Check/promql/syntax            9.440µ ± ∞ ¹   9.487µ ± ∞ ¹   +0.50% (p=0.002 n=6)
Check/alerts/comparison        26.63µ ± ∞ ¹   26.87µ ± ∞ ¹   +0.87% (p=0.026 n=6)
Check/alerts/template          194.0m ± ∞ ¹   201.4m ± ∞ ¹   +3.85% (p=0.041 n=6)
Check/promql/fragile           75.63µ ± ∞ ¹   78.19µ ± ∞ ¹   +3.38% (p=0.041 n=6)
Check/group/interval           3.486µ ± ∞ ¹   3.519µ ± ∞ ¹   +0.96% (p=0.002 n=6)
Check/promql/rate              4.774m ± ∞ ¹   4.890m ± ∞ ¹   +2.44% (p=0.041 n=6)
Check/labels/conflict          1.685m ± ∞ ¹   1.754m ± ∞ ¹   +4.05% (p=0.002 n=6)
Check/promql/vector_matching   15.84m ± ∞ ¹   18.29m ± ∞ ¹  +15.45% (p=0.002 n=6)
Check/promql/offset            2.556m ± ∞ ¹   2.589m ± ∞ ¹        ~ (p=0.132 n=6)
Check/alerts/absent            53.88µ ± ∞ ¹   53.68µ ± ∞ ¹        ~ (p=1.000 n=6)
Check/alerts/annotation        454.4µ ± ∞ ¹   455.0µ ± ∞ ¹        ~ (p=1.000 n=6)
Check/rule/label               1.158m ± ∞ ¹   1.231m ± ∞ ¹   +6.30% (p=0.009 n=6)
Check/query/cost               13.94m ± ∞ ¹   14.59m ± ∞ ¹   +4.70% (p=0.002 n=6)
Check/rule/dependency          18.29m ± ∞ ¹   18.75m ± ∞ ¹   +2.56% (p=0.041 n=6)
Check/promql/nan               2.062m ± ∞ ¹   2.093m ± ∞ ¹        ~ (p=0.065 n=6)
Check/promql/range_query       2.615m ± ∞ ¹   2.662m ± ∞ ¹   +1.80% (p=0.002 n=6)
Check/alerts/external_labels   39.13m ± ∞ ¹   39.87m ± ∞ ¹   +1.90% (p=0.015 n=6)
Check/promql/counter           2.485m ± ∞ ¹   2.659m ± ∞ ¹   +7.03% (p=0.002 n=6)
Check/alerts/for               118.6µ ± ∞ ¹   127.2µ ± ∞ ¹   +7.24% (p=0.002 n=6)
RuleIsIdentical                11.86m ± ∞ ¹   11.95m ± ∞ ¹        ~ (p=0.093 n=6)
GetChecksForEntry              162.0m ± ∞ ¹   162.7m ± ∞ ¹        ~ (p=0.589 n=6)
geomean                        2.102m         2.150m         +2.27%
¹ need >= 8 samples for confidence interval at level 0.99

                             │    old.txt    │                new.txt                │
                             │     B/op      │     B/op       vs base                │
GlobFinder                     12.77Mi ± ∞ ¹   12.84Mi ± ∞ ¹  +0.55% (p=0.002 n=6)
GitFinder                      26.05Mi ± ∞ ¹   26.16Mi ± ∞ ¹  +0.45% (p=0.002 n=6)
Check/promql/regexp            491.7Ki ± ∞ ¹   491.7Ki ± ∞ ¹  -0.00% (p=0.015 n=6)
Check/promql/impossible          704.0 ± ∞ ¹     704.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/duplicate             0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/features            0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/count             1.379Mi ± ∞ ¹   1.379Mi ± ∞ ¹  -0.00% (p=0.002 n=6)
Check/rule/reject                0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/series            98.54Mi ± ∞ ¹   98.54Mi ± ∞ ¹       ~ (p=0.727 n=6)
Check/promql/syntax              0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/comparison          352.0 ± ∞ ¹     352.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/template          113.1Mi ± ∞ ¹   113.1Mi ± ∞ ¹       ~ (p=0.387 n=6)
Check/promql/fragile           15.50Ki ± ∞ ¹   15.50Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/group/interval             0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/rate              406.6Ki ± ∞ ¹   406.6Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/labels/conflict          275.8Ki ± ∞ ¹   275.8Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/vector_matching   8.245Mi ± ∞ ¹   8.245Mi ± ∞ ¹       ~ (p=0.937 n=6)
Check/promql/offset            418.5Ki ± ∞ ¹   418.5Ki ± ∞ ¹       ~ (p=1.000 n=6)
Check/alerts/absent            3.812Ki ± ∞ ¹   3.812Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/annotation          0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/label               685.7Ki ± ∞ ¹   685.7Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/query/cost               525.0Ki ± ∞ ¹   525.0Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/dependency          15.90Mi ± ∞ ¹   15.90Mi ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/nan               191.6Ki ± ∞ ¹   191.6Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/range_query       418.0Ki ± ∞ ¹   418.0Ki ± ∞ ¹       ~ (p=1.000 n=6)
Check/alerts/external_labels   18.67Mi ± ∞ ¹   18.67Mi ± ∞ ¹       ~ (p=0.346 n=6)
Check/promql/counter           455.1Ki ± ∞ ¹   455.1Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/for               88.41Ki ± ∞ ¹   88.41Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
RuleIsIdentical                  0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
GetChecksForEntry              100.1Mi ± ∞ ¹   100.1Mi ± ∞ ¹       ~ (p=0.558 n=6)
geomean                                    ³                  +0.03%               ³
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal
³ summaries must be >0 to compute geomean

                             │   old.txt    │               new.txt                │
                             │  allocs/op   │  allocs/op    vs base                │
GlobFinder                     197.8k ± ∞ ¹   201.2k ± ∞ ¹  +1.73% (p=0.002 n=6)
GitFinder                      246.0k ± ∞ ¹   249.8k ± ∞ ¹  +1.58% (p=0.002 n=6)
Check/promql/regexp            8.910k ± ∞ ¹   8.910k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/impossible         5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/duplicate            0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/features           0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/count             32.44k ± ∞ ¹   32.44k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/reject               0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/series            1.419M ± ∞ ¹   1.419M ± ∞ ¹       ~ (p=0.675 n=6)
Check/promql/syntax             0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/comparison         4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/template          1.046M ± ∞ ¹   1.046M ± ∞ ¹       ~ (p=0.242 n=6)
Check/promql/fragile            246.0 ± ∞ ¹    246.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/group/interval            0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/rate              8.858k ± ∞ ¹   8.858k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/labels/conflict          5.724k ± ∞ ¹   5.724k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/vector_matching   92.74k ± ∞ ¹   92.74k ± ∞ ¹       ~ (p=1.000 n=6)
Check/promql/offset            12.42k ± ∞ ¹   12.42k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/absent             76.00 ± ∞ ¹    76.00 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/annotation         0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/label               11.45k ± ∞ ¹   11.45k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/query/cost               7.624k ± ∞ ¹   7.624k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/dependency          7.632k ± ∞ ¹   7.632k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/nan               3.652k ± ∞ ¹   3.652k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/range_query       12.41k ± ∞ ¹   12.41k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/external_labels   321.8k ± ∞ ¹   321.8k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/counter           24.14k ± ∞ ¹   24.14k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/for               1.476k ± ∞ ¹   1.476k ± ∞ ¹       ~ (p=1.000 n=6) ²
RuleIsIdentical                 0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
GetChecksForEntry              1.645M ± ∞ ¹   1.645M ± ∞ ¹       ~ (p=0.297 n=6)
geomean                                   ³                 +0.11%               ³
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal
³ summaries must be >0 to compute geomean

pkg: github.com/cloudflare/pint/internal/diags
                           │   old.txt    │              new.txt               │
                           │    sec/op    │    sec/op     vs base              │
InjectDiagnosticsLongExpr    7.254µ ± ∞ ¹   7.177µ ± ∞ ¹  -1.05% (p=0.009 n=6)
InjectDiagnosticsShortExpr   998.5n ± ∞ ¹   992.7n ± ∞ ¹  -0.59% (p=0.004 n=6)
geomean                      2.691µ         2.669µ        -0.82%
¹ need >= 8 samples for confidence interval at level 0.99

                           │    old.txt    │                new.txt                │
                           │     B/op      │     B/op       vs base                │
InjectDiagnosticsLongExpr    3.578Ki ± ∞ ¹   3.578Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
InjectDiagnosticsShortExpr     304.0 ± ∞ ¹     304.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
geomean                      1.031Ki         1.031Ki        +0.00%
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

                           │   old.txt   │               new.txt               │
                           │  allocs/op  │  allocs/op   vs base                │
InjectDiagnosticsLongExpr    39.00 ± ∞ ¹   39.00 ± ∞ ¹       ~ (p=1.000 n=6) ²
InjectDiagnosticsShortExpr   13.00 ± ∞ ¹   13.00 ± ∞ ¹       ~ (p=1.000 n=6) ²
geomean                      22.52         22.52        +0.00%
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

pkg: github.com/cloudflare/pint/internal/parser
      │   old.txt    │              new.txt               │
      │    sec/op    │    sec/op     vs base              │
Parse   14.83m ± ∞ ¹   14.47m ± ∞ ¹  -2.44% (p=0.041 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

      │    old.txt    │               new.txt               │
      │     B/op      │     B/op       vs base              │
Parse   6.385Mi ± ∞ ¹   6.414Mi ± ∞ ¹  +0.46% (p=0.002 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

      │   old.txt    │              new.txt               │
      │  allocs/op   │  allocs/op    vs base              │
Parse   102.8k ± ∞ ¹   104.6k ± ∞ ¹  +1.76% (p=0.002 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

pkg: github.com/cloudflare/pint/internal/parser/source
             │   old.txt    │              new.txt               │
             │    sec/op    │    sec/op     vs base              │
LabelsSource   930.0µ ± ∞ ¹   975.1µ ± ∞ ¹  +4.85% (p=0.002 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

             │    old.txt    │            new.txt             │
             │     B/op      │     B/op       vs base         │
LabelsSource   755.8Ki ± ∞ ¹   755.8Ki ± ∞ ¹  ~ (p=0.056 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

             │   old.txt    │             new.txt             │
             │  allocs/op   │  allocs/op    vs base           │
LabelsSource   7.376k ± ∞ ¹   7.376k ± ∞ ¹  ~ (p=1.000 n=6) ²
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

pkg: github.com/cloudflare/pint/internal/promapi
                  │   old.txt    │              new.txt               │
                  │    sec/op    │    sec/op     vs base              │
QueryCacheOnlySet   85.68n ± ∞ ¹   86.90n ± ∞ ¹  +1.42% (p=0.002 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

                  │   old.txt   │            new.txt             │
                  │    B/op     │    B/op      vs base           │
QueryCacheOnlySet   64.00 ± ∞ ¹   64.00 ± ∞ ¹  ~ (p=1.000 n=6) ²
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

                  │   old.txt   │            new.txt             │
                  │  allocs/op  │  allocs/op   vs base           │
QueryCacheOnlySet   1.000 ± ∞ ¹   1.000 ± ∞ ¹  ~ (p=1.000 n=6) ²
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

@prymitive
prymitive merged commit e569416 into main Nov 19, 2026
20 checks passed
@prymitive
prymitive deleted the yaml branch November 19, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants