andygrove opened a new issue, #6078:
URL: https://github.com/apache/datafusion-comet/issues/6078

   ## What happens
   
   The nightly run on 2026-09-20 ([run 
35494125457](https://github.com/apache/datafusion-comet/actions/runs/35494125457))
 failed in `Spark SQL Tests (Spark 4.0) / Build Native + JVM Test Classes`, in 
the `Pre-compile Spark Test classes` step:
   
   ```
   [info] loading project definition from .../apache-spark/project
   [warn] Note: Unresolved dependencies path:
   [error] sbt.librarymanagement.ResolveException: Error downloading 
com.typesafe:mima-core_2.12:1.1.4
   [error]   Not found
   [error]   download error: Caught java.net.SocketException (Connection reset) 
while downloading
             
https://repo1.maven.org/maven2/com/typesafe/mima-core_2.12/1.1.4/mima-core_2.12-1.1.4.pom
   [error]   not found: 
/root/.ivy2/localcom.typesafe/mima-core_2.12/1.1.4/ivys/ivy.xml
   ```
   
   `mima-core` is a dependency of Spark's own MiMa sbt plugin, nothing to do 
with Comet. Coursier took a connection reset from Maven Central while sbt was 
still loading the project definition, before a single Spark source file was 
compiled, then reported "not found" against the Ivy fallback repositories and 
gave up.
   
   The failure was transient: Spark 3.5's identical build job in the same run 
succeeded, as did all three Iceberg native builds, and the next nightly against 
the same `main` was green. It was reported as #6057.
   
   ## Why it is worth fixing
   
   Downloads driven by `./mvnw` are already protected. 
`.github/actions/maven-bootstrap` retries the wrapper download four times with 
exponential backoff and jitter, and its own comment states the goal: so that "a 
Maven Central hiccup does not fail a job before it has built or tested 
anything."
   
   The sbt path has no equivalent. 
`.github/workflows/spark_sql_test_reusable.yml:166` is the step that resolves 
Spark's entire plugin and dependency graph from Maven Central on a cold runner, 
which makes it the largest transient-failure surface in the tier. When it 
fails, the whole Spark SQL job for that version dies before running any test, 
and `Required Checks` goes red behind it.
   
   ## Proposed fix
   
   Wrap that single invocation in a retry that fires only on a 
dependency-resolution failure, so a genuine compile error still fails on the 
first attempt rather than burning three extra ~12 minute runs:
   
   ```sh
   set -o pipefail
   log=$(mktemp)
   for attempt in 1 2 3; do
     if NOLINT_ON_COMPILE=true build/sbt -Dsbt.log.noformat=true -mem 3072 \
          'catalyst/Test/compile' 'sql/Test/compile' 'hive/Test/compile' 2>&1 | 
tee "$log"; then
       exit 0
     fi
     if ! grep -qE 'ResolveException|download error|Connection reset' "$log"; 
then
       echo "::error::sbt failed for a non-resolution reason; not retrying."
       exit 1
     fi
     if [ "$attempt" -eq 3 ]; then
       echo "::error::sbt could not resolve dependencies after $attempt 
attempts."
       exit 1
     fi
     delay=$((10 * (1 << (attempt - 1)) + RANDOM % 5))
     echo "::warning::Dependency resolution failed; retrying in ${delay}s."
     sleep "$delay"
   done
   ```
   
   The step runs under the container default `sh`, so it also needs `shell: 
bash` for `pipefail`, `$RANDOM`, and the arithmetic. Re-running the step is 
safe: Zinc's incremental analysis means a retry after a partial compile resumes 
rather than starting over.
   
   ## Scope
   
   The pre-compile step only. The `Run Spark tests` step 
(`spark_sql_test_reusable.yml:250`) and the writer tests 
(`spark_sql_writer_tests.yml:133`) run after the dependency cache is warm, and 
retrying test execution is precisely what the `maven-bootstrap` precedent warns 
against.
   


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