Skip to content

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

Description

@andygrove

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions