lukaszlenart opened a new pull request, #1849:
URL: https://github.com/apache/struts/pull/1849

   #1846 stopped `.claude`-only changes from triggering full builds, and 
deliberately avoided `paths-ignore` on `pull_request` because a workflow 
skipped by path filtering never reports its checks. It gated the `build` job 
with a job-level `if:` instead, on the reasoning that a job skipped that way 
*does* report — as `skipped` — and required checks accept `successful, skipped, 
or neutral`.
   
   That holds for a plain job. It does not hold for a **matrix** job.
   
   ## What actually happens
   
   A matrix job whose condition is false is skipped *before the matrix 
expands*, so it emits a single check run named after the raw name template 
rather than one per matrix entry. On #1848 the reported check was literally:
   
   ```
   Build and Test (JDK ${{ matrix.java }})${{ (((matrix.profile == 
'-Pjakartaee11') && ' (Jakarta EE 11 + Spring 7)') || matrix.profile) }}   
skipped
   ```
   
   while `.asf.yaml` requires the context `Build and Test (JDK 17)`. That 
context never appeared at all, so it stayed Pending and the PR landed on 
`mergeStateStatus: BLOCKED` — the exact failure #1846 set out to avoid, reached 
by a different route.
   
   ## The fix
   
   Drop the job-level `if:` and gate the four steps instead. The matrix 
expands, all five checks report `success` under their expanded names, and no 
Maven build runs. A `.claude`-only PR now costs five idle runners for a few 
seconds rather than five full builds — still the point of #1846, just paid for 
honestly.
   
   `Test Summary` keeps `always()` so it still runs after a failed build, 
combined as `always() && needs.changes.outputs.code == 'true'`.
   
   Jenkins is unaffected: stage-level `when` has no matrix to expand.
   
   Once this merges, #1848 needs a rebase or an empty commit to pick up the 
corrected workflow.
   
   Only the 7.x line is changed here; `support/struts-6-x-x` carries neither 
#1846 nor this.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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