bowenliang123 opened a new pull request, #7598:
URL: https://github.com/apache/kyuubi/pull/7598

   ### Why are the changes needed?
   
   `actions/labeler@v7` fails to parse `.github/labeler.yml` and aborts the 
workflow before applying any labels:
   
   ```
   Run actions/labeler@v7
   The configuration file (path: .github/labeler.yml) was not found locally, 
fetching via the api
   Error: YAMLException: deficient indentation (24:7)
   
    21 | "kind:build":
    22 |   - changed-files:
    23 |     - any-glob-to-any-file: [
    24 |       '.dockerignore',
   ------------^
    25 |       '.rat-excludes',
    26 |       '.scalafmt',
   ```
   
   Every `any-glob-to-any-file: [ ... ]` / `all-globs-to-any-file: [ ... ]` 
block fails with the same error, so the job bails out and no `kind:*` / 
`module:*` labels are applied to PRs. Triage has been silently broken since the 
v7 bump in #7583.
   
   **Root cause.** The file uses YAML flow-style sequences (`[ ... ]`) split 
across multiple lines, with continuation lines indented at 6 spaces while the 
opening `[` sits at column 27. YAML 1.2 (and `js-yaml@4`, which 
`actions/labeler@v7` depends on) requires flow-sequence continuation lines to 
be indented at least one column past the line containing the opening bracket — 
hence `deficient indentation`.
   
   The format was introduced in #5874 (commit `7e96dc7bc9`, 2023-12-19) when 
the action was bumped from v4 to v5. v5/v6 bundled an older `js-yaml` that did 
not strictly enforce the indentation rule, which is why the bug stayed latent 
for ~2 years.
   
   ### What does this PR do?
   
   Rewrite every `any-glob-to-any-file: [ ... ]` and `all-globs-to-any-file: [ 
... ]` block in `.github/labeler.yml` as a standard YAML block-style sequence. 
Same 22 labels, same glob sets — no semantic change. The file now parses 
cleanly under strict YAML 1.2 and is forward-compatible with future 
`actions/labeler` releases.
   
   Also dropped:
   - the trailing whitespace on line 48 of the old file (under the 
`kind:deploy` block)
   - the inconsistent 6-space indent under `module:spark`, which was the only 
block at odds with the rest of the file
   
   ### How was this patch tested?
   
   1. Parsed the rewritten file with `python3 -c "import yaml; 
yaml.safe_load(open('.github/labeler.yml'))"` — succeeds.
   2. Cross-checked label keys and glob counts against the pre-change file: 22 
labels preserved, identical glob counts per label.
   3. Spotless does not process YAML files (see `pom.xml` — only `java`, 
`scala`, `pom`, `python`, `markdown` are in scope), so no format step is 
required for this change.
   
   End-to-end verification will happen on the next PR opened against 
`apache/master` that runs the `Pull Request Labeler` workflow.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Assisted-by: OpenCode with MiniMax-M3


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to