ci: a transient Maven Central failure in lint-java is reported as a scalafix violation

Open Beginner friendly
#6,060 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, scala
Domain
ci-cd

Research direction

Start in .github/workflows/pr_build_linux.yml at the lint-java Run scalafix check step, then compare it with the adjacent scalafix-syntactic job's retry and offline-check handling. Verify the workflow distinguishes Maven Central download failures from real scalafix violations: transient failures should be retried, while genuine violations should still fail the check.

Written by the indexing model from the issue text.

Description

area:ci bug priority:low
Describe the bug

A transient Maven Central failure in the Lint Java matrix is reported as a lint failure, which
is indistinguishable from a real scalafix violation until someone opens the log.

In pull request #6035 the Lint Java (Spark 3.5, JDK 17, Scala 2.12) job failed with:

[WARNING] Failed to retrieve plugin descriptor for io.github.evis:scalafix-maven-plugin_2.12:0.1.7_0.10.4:
  Plugin io.github.evis:scalafix-maven-plugin_2.12:0.1.7_0.10.4 or one of its dependencies could not be resolved
[ERROR] No plugin found for prefix 'scalafix' in the current project and in the plugin groups ...

No source file was at fault. The job fails, Required Checks goes red, and the pull request is
blocked until it is pushed again.

Why it happens

lint-java's Run scalafix check step in .github/workflows/pr_build_linux.yml is a single
unguarded ./mvnw ... scalafix:scalafix invocation. The adjacent scalafix-syntactic job already
treats this class of failure as a first-class concern, and says so in its own comment: it retries
the artifact download and then runs the check with --mode offline, "so a nonzero exit can only
mean a lint violation, never a download failure". lint-java has no equivalent guard, and
.github/actions/maven-bootstrap only covers the Maven distribution download, not plugin
resolution during the build.

Expected behaviour

A Maven Central hiccup should be retried rather than reported as a lint violation. A real scalafix
violation should still fail on the first attempt.

Dominant language
Scala
Stars
1.3k
Forks
377
Avg merge
2d 13h
Merged PRs (30d)
244

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/datafusion-comet

All issues in apache/datafusion-comet

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.