boundless-student-48844
03/09/2022, 4:43 PMconnection reset
error occasionally (not all the time) during image build in our CI pipeline, like below.
#12 1469. * What went wrong:
#12 1469. Execution failed for task ':datahub-frontend:compilePlayBinaryScala'.
#12 1469. > Could not resolve all files for configuration ':datahub-frontend:play'.
#12 1469. > Could not download javax.ws.rs-api.jar (<http://javax.ws.rs:javax.ws.rs-api:2.0.1|javax.ws.rs:javax.ws.rs-api:2.0.1>)
#12 1469. > Could not get resource '<https://plugins.gradle.org/m2/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar>'.
#12 1469. > Could not GET '<https://plugins.gradle.org/m2/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar>'.
#12 1469. > Connection reset
#12 1469. > Could not download scala-reflect.jar (org.scala-lang:scala-reflect:2.11.12)
#12 1469. > Could not get resource '<https://plugins.gradle.org/m2/org/scala-lang/scala-reflect/2.11.12/scala-reflect-2.11.12.jar>'.
#12 1469. > Could not GET '<https://plugins.gradle.org/m2/org/scala-lang/scala-reflect/2.11.12/scala-reflect-2.11.12.jar>'.
#12 1469. > Connection reset
#12 1469. > Could not download jta.jar (javax.transaction:jta:1.1)
#12 1469. > Could not get resource '<https://plugins.gradle.org/m2/javax/transaction/jta/1.1/jta-1.1.jar>'.
#12 1469. > Could not GET '<https://repo.gradle.org/artifactory/jcenter/javax/transaction/jta/1.1/jta-1.1.jar>'.
#12 1469. > Connection reset
#12 1469. > Could not download osgi-resource-locator.jar (org.glassfish.hk2:osgi-resource-locator:1.0.1)
#12 1469. > Could not get resource '<https://plugins.gradle.org/m2/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar>'.
#12 1469. > Could not GET '<https://repo.gradle.org/artifactory/jcenter/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar>'.
#12 1469. > Connection reset
I shared same issue before here. It was similarly reported in this GitHub issue from Gradle project. Before Gradle 6.6, connection reset
error (or SocketException
) was not retried and this could easily cause the build to fail.
As such, I try to upgrade Gradle from current 5.6.4 to 6.7 to see if it could fix this issue. I ran below cmd to upgrade.
./gradlew wrapper --gradle-version 6.7
However, the 4 image build jobs for gms, mae-consumer, mce-consumer, and datahub-frontend all failed with below error when i run with Gradle 6.7.
#12 1064. FAILURE: Build failed with an exception.
#12 1064.
#12 1064. * What went wrong:
#12 1064. Execution failed for task ':metadata-events:mxe-schemas:changedFilesReport'.
#12 1064. > You must declare outputs or use `TaskOutputs.upToDateWhen()` when using the incremental task API
#12 1064.
I am not so familiar with Gradle. Does anyone happen to have some idea how to fix it? I couldn’t find changedFilesReport
task in any build.gradle
files in datahub repo.green-football-43791
03/09/2022, 7:14 PMgreen-football-43791
03/09/2022, 7:15 PMgreen-football-43791
03/09/2022, 7:15 PMgreen-football-43791
03/09/2022, 7:15 PMDeclaring an incremental task without outputs
Declaring an incremental task without declaring outputs is now deprecated. Declare file outputs or use TaskOutputs.upToDateWhen() instead.
This will become an error in Gradle 6.0.
green-football-43791
03/09/2022, 7:17 PMgreen-football-43791
03/09/2022, 9:32 PMgreen-football-43791
03/09/2022, 9:32 PMgreen-football-43791
03/09/2022, 9:32 PMboundless-student-48844
03/10/2022, 3:46 AMgreen-football-43791
03/10/2022, 9:27 PMboundless-student-48844
03/11/2022, 4:20 AM