spring-boot: Build scan background action failed when running Gradle tasks

Hi,

since 35991d5eab0f3be67adc6bbaf9db743b94585674 I get these errors when running Gradle tasks. Even with --no-scan applied. Locally, I don’t want to generate build-scans generally, so I wonder if there is something I’ve been missing.

Build scan background action failed.
org.gradle.process.internal.ExecException: Process 'command 'git'' finished with non-zero exit value 128
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:417)
        at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:38)
        at org.gradle.process.internal.DefaultExecActionFactory.exec(DefaultExecActionFactory.java:152)
        at io.spring.ge.BuildScanConventions.exec(BuildScanConventions.java:162)
        at io.spring.ge.BuildScanConventions.addGitMetadata(BuildScanConventions.java:111)
        at com.gradle.scan.plugin.internal.api.j.a(SourceFile:22)
        at com.gradle.scan.plugin.internal.api.k$a.a(SourceFile:112)
        at com.gradle.scan.plugin.internal.api.h.a(SourceFile:61)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

EDIT: It seems that the git command is executed on a non git directory - although I don’t see on which.

Cheers, Christoph

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (13 by maintainers)

Commits related to this issue

Most upvoted comments

I realize now that the error may be due to the directory not being initialized as a git repository

Yes, that will be the cause. https://github.com/spring-io/gradle-enterprise-conventions/issues/54 is tracking some improvements in this area. The error is benign so you can ignore it for now.

but then this would make building older releases of spring-boot rather difficult

We recommend using git for this. You can git clone the repository and then check out the tag for the version that you want to build. You should configure git with core.autocrlf set to true to ensure that line endings aren’t mangled. I suspect incorrect line endings is what is causing the formatting errors that you’re seeing at the moment.

I’m using .\gradlew build inside the root directory extracted from the source.zip of release v.2.7.2. The OS is Windows 10, git version is 2.37.1.windows.1.

I’ve attached the full error log below. I realize now that the error may be due to the directory not being initialized as a git repository (since I did not technically clone it as one), but then this would make building older releases of spring-boot rather difficult, so I’m guessing there must be a way around that.

spring-boot-2.7.2-errorlog.txt