Skip to content

labeler.yml applies 'performance' to nearly every PR, triggering benchmarks each time #3356

@brendancol

Description

@brendancol

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginfrastructureCI, benchmarks, and toolingperformancePR touches performance-sensitive code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions