diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..0ff808b15b --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,86 @@ +# Path based area/* labels. .github/labeler.yml is the canonical source for +# the path globs. docs/area_taxonomy.md covers what this file can't express +# which is the /area directive and the additive overlap rule. + +# Endpoint Picker core +area/epp: + - changed-files: + - any-glob-to-any-file: + - pkg/epp/** + - cmd/epp/** + - test/integration/epp/** + +# Dev tooling, CI/CD and shared test harness +area/dev: + - changed-files: + - any-glob-to-any-file: + - .github/** + - hack/** + - scripts/** + - Makefile + - test/e2e/** + - test/framework/** + - test/utils/** + - test/scripts/** + - test/perf/** + - test/profiling/** + +# Scheduling and request routing decisions +area/scheduling: + - changed-files: + - any-glob-to-any-file: + - pkg/epp/scheduling/** + - pkg/epp/framework/plugins/scheduling/** + - pkg/epp/requestcontrol/** + - pkg/epp/framework/plugins/requestcontrol/** + +# Admission, queuing and flow control +area/flowcontrol: + - changed-files: + - any-glob-to-any-file: + - pkg/epp/flowcontrol/** + - pkg/epp/framework/plugins/flowcontrol/** + +# KV cache indexing and events +area/kvcache: + - changed-files: + - any-glob-to-any-file: + - pkg/kvcache/** + - pkg/kvevents/** + +# Disaggregated inference coordinator +area/coordinator: + - changed-files: + - any-glob-to-any-file: + - pkg/coordinator/** + - cmd/coordinator/** + - test/coordinator/** + +# PD sidecar proxy +area/sidecar: + - changed-files: + - any-glob-to-any-file: + - pkg/sidecar/** + - cmd/pd-sidecar/** + - test/sidecar/** + +# EPP data layer and datastore +area/datalayer: + - changed-files: + - any-glob-to-any-file: + - pkg/epp/datalayer/** + - pkg/epp/framework/plugins/datalayer/** + - pkg/epp/datastore/** + +# Telemetry and observability +area/telemetry: + - changed-files: + - any-glob-to-any-file: + - pkg/common/observability/** + +# Documentation +area/docs: + - changed-files: + - any-glob-to-any-file: + - docs/** + - "*.md" diff --git a/.github/workflows/pr-area-labeler.yaml b/.github/workflows/pr-area-labeler.yaml new file mode 100644 index 0000000000..7cc4175b90 --- /dev/null +++ b/.github/workflows/pr-area-labeler.yaml @@ -0,0 +1,24 @@ +name: PR Area Labeler + +on: + pull_request_target: + types: [opened, synchronize, reopened] + branches: + - main + +# Cancels superseded runs on the same PR. Safe because the job only adds +# labels (sync-labels: false, no remove-then-add), unlike pr-kind-label.yaml. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + area-label: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/labeler@v7 + with: + sync-labels: false diff --git a/docs/area_taxonomy.md b/docs/area_taxonomy.md index ccc4149506..652bd91b37 100644 --- a/docs/area_taxonomy.md +++ b/docs/area_taxonomy.md @@ -1,23 +1,12 @@ -# Area taxonomy +# Area Taxonomy `area/*` labels route issues and pull requests to the right reviewers by component. Each area maps to one or more directories, so it can be applied either manually (via an `/area` directive on a PR or issue body) or automatically from the paths a change touches. -| Label | Paths | Scope | -|---|---|---| -| `area/epp` | `pkg/epp/**`, `cmd/epp/**`, `test/integration/epp/**` | Endpoint Picker core | -| `area/scheduling` | `pkg/epp/scheduling/**`, `pkg/epp/requestcontrol/**` | Scheduling and request routing decisions | -| `area/flowcontrol` | `pkg/epp/flowcontrol/**` | Admission, queuing and flow control | -| `area/kvcache` | `pkg/kvcache/**`, `pkg/kvevents/**` | KV cache indexing and events | -| `area/coordinator` | `pkg/coordinator/**`, `cmd/coordinator/**`, `test/coordinator/**` | Disaggregated inference coordinator | -| `area/sidecar` | `pkg/sidecar/**`, `cmd/pd-sidecar/**`, `test/sidecar/**` | PD sidecar proxy | -| `area/datalayer` | `pkg/epp/datalayer/**`, `pkg/epp/datastore/**` | EPP data layer and datastore | -| `area/telemetry` | `pkg/common/observability/**` | Telemetry and observability | -| `area/dev` | `.github/**`, `hack/**`, `scripts/**`, `Makefile`, `test/e2e/**`, `test/framework/**`, `test/utils/**`, `test/scripts/**`, `test/perf/**`, `test/profiling/**` | Dev tooling, CI/CD and shared test harness | -| `area/docs` | `docs/**`, top-level `*.md` | Documentation | +`.github/labeler.yml` is the canonical source for the path globs each `area/*` label maps to. -A change can span multiple areas. Apply every label that fits rather than picking one. Areas nest by path rather than exclude one another: a change under `pkg/epp/scheduling/**` matches both `area/epp` and `area/scheduling` and both labels apply. +A change can span multiple areas. Apply every label that fits rather than picking one. Areas nest by path rather than exclude one another. For example, a change under `pkg/epp/scheduling/**` matches both `area/epp` and `area/scheduling` and both labels apply. ## Applying a label -- Manually: add an `/area ` line to a PR or issue body (see `.github/workflows/pr-kind-label.yaml` and `.github/workflows/issue-kind-label.yaml`). -- Automatically: path based labeling from this table is tracked separately against [#956](https://github.com/llm-d/llm-d-router/issues/956). +- Manually: add an `/area ` line to a PR or issue body (see ` github/workflows/pr-kind-label.yaml` and `.github/workflows/issue-kind-label.yaml`) +- Automatically: `.github/labeler.yml` applies the matching `area/*` label(s) on every PR