andygrove opened a new pull request, #6061:
URL: https://github.com/apache/datafusion-comet/pull/6061

   ## Which issue does this PR close?
   
   Closes #6060.
   
   ## Rationale for this change
   
   `lint-java`'s `Run scalafix check` step is a single unguarded `./mvnw ... 
scalafix:scalafix`
   invocation, so a Maven Central hiccup while resolving the plugin descriptor 
fails the job exactly
   the way a real lint violation does. That happened on #6035: the log shows
   `No plugin found for prefix 'scalafix'` after the descriptor download 
failed, with no source file
   at fault. The failure blocks `Required Checks`, and the only way out is 
another push.
   
   The `scalafix-syntactic` job directly above already treats this as a 
first-class concern and
   explains the approach in its own comment: retry the download, then run the 
check offline "so a
   nonzero exit can only mean a lint violation, never a download failure". 
`lint-java` had no
   equivalent guard. `.github/actions/maven-bootstrap` does not cover this 
either, since it retries
   only the Maven distribution download, not plugin resolution during the build.
   
   The offline half of that trick does not transfer to Maven here: 
`scalafix:scalafix` resolves rule
   artifacts as it runs, so a `-o` second pass would turn a cold cache into a 
hard failure on every
   pull request. Retrying is the part that transfers, provided a genuine 
violation still fails fast.
   
   ## What changes are included in this PR?
   
   - `Run scalafix check` now retries the Maven invocation up to four times, 
with the same backoff as
     `.github/actions/maven-bootstrap` (10s, 20s, 40s plus 0-4s of jitter) and 
the same
     `::error::` / `::warning::` reporting.
   - The loop stops immediately when the output contains `Scalafix invoked with 
errors`, the marker
     the plugin prints for a real violation, so a genuinely broken pull request 
fails on the first
     attempt instead of being rebuilt four times.
   - Exhausting the retries reports that no violation was found, which 
distinguishes an
     infrastructure failure from a lint failure in the job summary.
   
   ## How are these changes tested?
   
   Validated with `actionlint -color --shellcheck=off`, the same invocation the 
`Preflight` job runs.
   Beyond that this is CI configuration, exercised by the `Lint Java` matrix on 
this pull request
   itself: the four rows must still pass, which covers the success path. The 
violation path is
   covered by the marker check, whose string is taken from the failing log on 
#6054
   (`Scalafix invoked with errors. Check logs for details.`), and the retry 
path only engages when
   Maven fails without emitting that marker.
   


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