Describe the bug
.github/labeler.yml adds the performance label to any PR that changes a non-test file under xrspatial/:
performance:
- changed-files:
- any-glob-to-any-file:
- 'xrspatial/*.py'
- 'xrspatial/**/*.py'
- '!xrspatial/tests/**'
That glob matches essentially every source file, so almost every code PR gets the label.
The label is not just noise. It is a trigger. benchmarks.yml runs the ASV suite whenever a PR carries it:
if: >
(github.event_name == 'push') ||
(github.event_name == 'pull_request' && github.event.label.name == 'performance')
So the broad glob runs the benchmark job on nearly every PR, including changes that touch no benchmarked code.
Expected behavior
performance should land only on PRs that change code the benchmarks actually measure, so the benchmark job runs when it can move the numbers.
Proposed fix
Scope the rule to the modules that have PR-time benchmarks. The asv continuous filter in benchmarks.yml covers Slope, Proximity, Zonal, CostDistance, Focal, Rescale/Standardize, Diffusion, and Dasymetric, which live in:
slope.py, proximity.py, zonal.py, cost_distance.py, focal.py, normalize.py, diffusion.py, dasymetric.py
Removing the rule outright is the other option the title suggests, but that also drops the on-demand benchmark trigger, so scoping is the better choice.
Additional context
The over-broad glob has been in place since the labeler was added in #917.
Describe the bug
.github/labeler.ymladds theperformancelabel to any PR that changes a non-test file underxrspatial/:That glob matches essentially every source file, so almost every code PR gets the label.
The label is not just noise. It is a trigger.
benchmarks.ymlruns the ASV suite whenever a PR carries it:So the broad glob runs the benchmark job on nearly every PR, including changes that touch no benchmarked code.
Expected behavior
performanceshould land only on PRs that change code the benchmarks actually measure, so the benchmark job runs when it can move the numbers.Proposed fix
Scope the rule to the modules that have PR-time benchmarks. The asv
continuousfilter inbenchmarks.ymlcoversSlope,Proximity,Zonal,CostDistance,Focal,Rescale/Standardize,Diffusion, andDasymetric, which live in:slope.py,proximity.py,zonal.py,cost_distance.py,focal.py,normalize.py,diffusion.py,dasymetric.pyRemoving the rule outright is the other option the title suggests, but that also drops the on-demand benchmark trigger, so scoping is the better choice.
Additional context
The over-broad glob has been in place since the labeler was added in #917.