slachiewicz opened a new pull request, #305:
URL: https://github.com/apache/maven-gh-actions-shared/pull/305

   Backport of #300 to `v4`. One line, byte-identical to the `v5` condition.
   
   `setup-maven-version` is skipped for a `pull_request` whose head is not a 
fork, and its outputs are then empty. The `verify` job's matrix calls 
`fromJSON` on two of them, so the whole run fails before any job starts:
   
   ```
   Error from function 'fromJSON': empty input (Line: 367, Col: 16)
   Error from function 'fromJSON': empty input (Line: 369, Col: 18)
   ```
   
   Those are still lines 367 and 369 on `v4` today, and `verify` is the only 
job that reads those outputs — so guarding it is the entire fix, not a partial 
one.
   
   ## The v5 change is confirmed working
   
   Not assumed — checked against real runs. `v5` picked up #300 at 09:47 today, 
and since then `pull_request` runs on non-fork branches in 
`apache/maven-resolver` come out **skipped** rather than failing: 11:47, 13:48, 
14:53, 15:19, 17:34 all clean.
   
   Worth noting for anyone who expected otherwise: the `if:` guard is 
sufficient. GitHub does not evaluate the `strategy` block once a needed job is 
skipped.
   
   ## Why v4 still matters
   
   `v4` has live consumers, and they are the ones still hitting this. 
`apache/maven-resolver` run 
[31311660356](https://github.com/apache/maven-resolver/actions/runs/31311660356)
 failed at 11:47 today — after the `v5` fix — with no failed jobs, which is the 
signature of the workflow-level error. Its branch targets 
`maven-resolver-1.9.x`, which pins `@v4`.
   
   Sweeping every default and maintenance branch across the org for `@v4` 
references:
   
   **Default branches (5)** — maven-checkstyle-plugin, maven-doxia-converter, 
maven-reporting-api, maven-shared-jar, maven-plugin-testing
   
   **Maintenance branches (11)** — maven-resolver-1.9.x, wagon-3.x, 
maven-dependency-plugin-3.7.x, maven-invoker-plugin-3.7.x, 
maven-javadoc-plugin-3.8.x, surefire-3.4.x, maven-help-plugin-3.4.x, jxr-3.4.x, 
maven-plugin-tools-3.14.x, maven-pmd-plugin-3.24.x, 
maven-project-info-reports-plugin-3.6.x
   
   This fixes all of them without any of those repositories changing anything.
   
   One caveat on that list: GitHub code search returns **zero** hits for 
`maven-verify.yml@v4` across `org:apache`, which is wrong — it misses 
non-default branches, and it also missed the five default branches above. The 
list came from walking branches directly.
   
   ## Scope
   
   Deliberately just the backport. It does not touch the `setup-maven-version` 
trigger condition itself, which is the separate question under discussion in 
#284 — where restricting the callers' `on:` triggers instead has been proposed, 
and where apache/maven-resolver#1979 and apache/maven-surefire#3385 are open 
doing exactly that. Whichever way that goes, `v4` should not stay broken in the 
meantime.
   


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