Yicong-Huang opened a new issue, #4639:
URL: https://github.com/apache/texera/issues/4639

   ### Task Summary
   
   Redesign the precheck's CI-skip computation so each label has an explicit 
list of stacks it requires, and the run set is the union across all labels on 
the PR. Replace the current ad-hoc rule cascade.
   
   ### Current state
   
   `required-checks.yml`'s precheck applies hand-written rules:
   
   - labels ⊆ {`docs`, `dev`} → skip all stacks
   - only `frontend` (with optional `docs`/`dev`) → skip every non-frontend 
stack
   - no `frontend` label → skip frontend
   - otherwise → run all
   
   This works for the cases we have but does not generalize: every new shape 
(e.g. "`python`-only PR", "no `engine` label") needs another bespoke branch and 
another rule to reason about.
   
   ### Proposed design
   
   Define a static mapping from each labeler-applied label to the stacks it 
requires:
   
   | label | frontend | scala | python | agent-service |
   |---|---|---|---|---|
   | `frontend` | ✓ |  |  |  |
   | `python` |  |  | ✓ |  |
   | `engine` |  | ✓ | ✓ |  |
   | `service` |  | ✓ |  | ✓ |
   | `common` |  | ✓ |  |  |
   | `dependencies` | ✓ | ✓ | ✓ | ✓ |
   | `ddl-change` |  | ✓ |  |  |
   | `ci` | ✓ | ✓ | ✓ | ✓ |
   | `docs` |  |  |  |  |
   | `dev` |  |  |  |  |
   | `feature` / `fix` / `refactor` (branch-name labels) | (no stack opinion) | 
 |  |  |
   
   precheck reads PR labels and outputs `run_<stack> = stack ∈ ⋃ map[label]`. 
Empty union → all skipped. `release/*` labels keep their existing role driving 
the backport matrix and contribute no stacks themselves.
   
   ### Open questions for the design review
   
   - `service` currently matches every `*-service/**` directory, which includes 
both the scala services and `agent-service`. The mapping above forces both 
stacks; if we want finer granularity we'd add a dedicated `agent-service` label 
(split `*-service/**` against `agent-service/**`).
   - `dependencies` and `ci` deliberately fan out to all stacks — they're the 
safety valve for edits that can quietly break anything.
   - `feature` / `fix` / `refactor` are branch-name driven and orthogonal to 
file paths; suggest treating them as no-op for stack selection.
   
   ### Migration
   
   - Replace the current rule cascade with a `LABEL_STACKS` map and 
`Object.values(...).flat()` style union.
   - Keep the docs/dev "skip all" outcome as an emergent result (their rows are 
empty), not a special case.
   - Keep the labeler wait already in precheck so labels are settled before the 
union is computed.
   
   ### Priority
   
   P2 – Medium
   
   ### Task Type
   
   - [x] Code Implementation
   - [x] DevOps / Deployment
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to