Skip to content

Fix panic when parsing labels:[]#1616

Merged
prymitive merged 1 commit intomainfrom
parse
Nov 17, 2025
Merged

Fix panic when parsing labels:[]#1616
prymitive merged 1 commit intomainfrom
parse

Conversation

@prymitive
Copy link
Collaborator

No description provided.

Copy link

@github-actions github-actions bot left a comment

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.

✔️ No problems found

Stats

Stat Value
Version v0.77.0-3-g9cbd2775
Number of rules parsed 9
Number of rules checked 9
Number of problems found 0
Number of offline checks 0
Number of online checks 0
Checks duration 0

Problems

No problems reported

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.07%. Comparing base (1cce7a2) to head (9cbd277).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1616      +/-   ##
==========================================
- Coverage   97.07%   97.07%   -0.01%     
==========================================
  Files         109      109              
  Lines       13233    13230       -3     
==========================================
- Hits        12846    12843       -3     
  Misses        255      255              
  Partials      132      132              

☔ View full report in Codecov by Sentry.
📢 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

Benchmark diff:

goos: linux
goarch: amd64
pkg: github.com/cloudflare/pint/cmd/pint
cpu: AMD EPYC 7763 64-Core Processor                
                    │   old.txt    │              new.txt               │
                    │    sec/op    │    sec/op     vs base              │
GlobFinder-4          29.52m ± ∞ ¹   30.78m ± ∞ ¹       ~ (p=0.222 n=5)
GitFinder-4           391.4m ± ∞ ¹   391.9m ± ∞ ¹       ~ (p=0.548 n=5)
CheckRules-4           9.461 ± ∞ ¹    9.500 ± ∞ ¹       ~ (p=0.421 n=5)
RuleIsIdentical-4     5.822m ± ∞ ¹   5.853m ± ∞ ¹       ~ (p=0.056 n=5)
GetChecksForEntry-4   111.8m ± ∞ ¹   112.5m ± ∞ ¹       ~ (p=0.151 n=5)
geomean               148.1m         149.8m        +1.19%
¹ need >= 6 samples for confidence interval at level 0.95

                    │    old.txt     │                new.txt                 │
                    │      B/op      │      B/op       vs base                │
GlobFinder-4           9.329Mi ± ∞ ¹    9.331Mi ± ∞ ¹  +0.02% (p=0.032 n=5)
GitFinder-4            19.10Mi ± ∞ ¹    19.09Mi ± ∞ ¹       ~ (p=0.690 n=5)
CheckRules-4          1021.3Mi ± ∞ ¹   1019.5Mi ± ∞ ¹       ~ (p=0.222 n=5)
RuleIsIdentical-4        0.000 ± ∞ ¹      0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
GetChecksForEntry-4    56.55Mi ± ∞ ¹    56.55Mi ± ∞ ¹       ~ (p=0.222 n=5)
geomean                            ³                   -0.04%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

                    │   old.txt    │               new.txt                │
                    │  allocs/op   │  allocs/op    vs base                │
GlobFinder-4          140.4k ± ∞ ¹   140.4k ± ∞ ¹  +0.00% (p=0.040 n=5)
GitFinder-4           179.9k ± ∞ ¹   179.9k ± ∞ ¹       ~ (p=0.881 n=5)
CheckRules-4          14.99M ± ∞ ¹   14.98M ± ∞ ¹  -0.05% (p=0.008 n=5)
RuleIsIdentical-4      0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
GetChecksForEntry-4   915.8k ± ∞ ¹   915.8k ± ∞ ¹       ~ (p=0.270 n=5)
geomean                          ³                 -0.01%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

pkg: github.com/cloudflare/pint/internal/parser
        │   old.txt    │            new.txt            │
        │    sec/op    │    sec/op     vs base         │
Parse-4   27.71m ± ∞ ¹   27.25m ± ∞ ¹  ~ (p=0.222 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

        │    old.txt    │            new.txt             │
        │     B/op      │     B/op       vs base         │
Parse-4   8.379Mi ± ∞ ¹   8.379Mi ± ∞ ¹  ~ (p=1.000 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

        │   old.txt    │            new.txt            │
        │  allocs/op   │  allocs/op    vs base         │
Parse-4   139.4k ± ∞ ¹   139.4k ± ∞ ¹  ~ (p=0.619 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

pkg: github.com/cloudflare/pint/internal/parser/utils
               │   old.txt    │            new.txt            │
               │    sec/op    │    sec/op     vs base         │
LabelsSource-4   5.076m ± ∞ ¹   5.015m ± ∞ ¹  ~ (p=0.421 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

               │    old.txt    │            new.txt             │
               │     B/op      │     B/op       vs base         │
LabelsSource-4   4.085Mi ± ∞ ¹   4.081Mi ± ∞ ¹  ~ (p=0.690 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

               │   old.txt    │            new.txt            │
               │  allocs/op   │  allocs/op    vs base         │
LabelsSource-4   33.54k ± ∞ ¹   33.54k ± ∞ ¹  ~ (p=0.810 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

pkg: github.com/cloudflare/pint/internal/promapi
                    │   old.txt    │              new.txt               │
                    │    sec/op    │    sec/op     vs base              │
QueryCacheOnlySet-4   102.3n ± ∞ ¹   103.0n ± ∞ ¹       ~ (p=0.127 n=5)
QueryCacheSetGrow-4   392.2n ± ∞ ¹   360.8n ± ∞ ¹       ~ (p=0.841 n=5)
QueryCacheGetMiss-4   16.36n ± ∞ ¹   16.42n ± ∞ ¹       ~ (p=0.587 n=5)
QueryCacheGC/0%-4     33.70µ ± ∞ ¹   33.49µ ± ∞ ¹       ~ (p=0.841 n=5)
QueryCacheGC/1%-4     35.29µ ± ∞ ¹   34.39µ ± ∞ ¹       ~ (p=0.548 n=5)
QueryCacheGC/10%-4    38.56µ ± ∞ ¹   37.96µ ± ∞ ¹       ~ (p=0.548 n=5)
QueryCacheGC/20%-4    67.92µ ± ∞ ¹   67.30µ ± ∞ ¹  -0.92% (p=0.008 n=5)
QueryCacheGC/25%-4    67.65µ ± ∞ ¹   66.82µ ± ∞ ¹  -1.24% (p=0.016 n=5)
QueryCacheGC/50%-4    65.11µ ± ∞ ¹   65.41µ ± ∞ ¹       ~ (p=0.310 n=5)
QueryCacheGC/75%-4    49.72µ ± ∞ ¹   49.27µ ± ∞ ¹       ~ (p=0.151 n=5)
QueryCacheGC/99%-4    49.56µ ± ∞ ¹   49.40µ ± ∞ ¹       ~ (p=0.548 n=5)
QueryCacheGC/100%-4   50.23µ ± ∞ ¹   49.84µ ± ∞ ¹       ~ (p=0.095 n=5)
geomean               10.09µ         9.959µ        -1.31%
¹ need >= 6 samples for confidence interval at level 0.95

                    │    old.txt    │                new.txt                │
                    │     B/op      │     B/op       vs base                │
QueryCacheOnlySet-4     64.00 ± ∞ ¹     64.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheSetGrow-4     123.0 ± ∞ ¹     112.0 ± ∞ ¹       ~ (p=0.984 n=5)
QueryCacheGetMiss-4     0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/0%-4       0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/1%-4       0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/10%-4      0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/20%-4    18.09Ki ± ∞ ¹   18.09Ki ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/25%-4    18.09Ki ± ∞ ¹   18.09Ki ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/50%-4    18.09Ki ± ∞ ¹   18.09Ki ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/75%-4      48.00 ± ∞ ¹     48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/99%-4      48.00 ± ∞ ¹     48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/100%-4     48.00 ± ∞ ¹     48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                           ³                  -0.78%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

                    │   old.txt   │               new.txt               │
                    │  allocs/op  │  allocs/op   vs base                │
QueryCacheOnlySet-4   1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheSetGrow-4   1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGetMiss-4   0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/0%-4     0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/1%-4     0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/10%-4    0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/20%-4    4.000 ± ∞ ¹   4.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/25%-4    4.000 ± ∞ ¹   4.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/50%-4    4.000 ± ∞ ¹   4.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/75%-4    1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/99%-4    1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/100%-4   1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                         ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

@prymitive prymitive merged commit 5bfeffc into main Nov 17, 2025
21 checks passed
@prymitive prymitive deleted the parse branch November 17, 2025 11:32
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