-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven commands fail randomly in CI/CD workflow #422
Comments
|
Reported to tinesoft/nxrocks#123 |
Added to Spring 22.08. |
Another instance of the issue at hand that was solved by a second run: Warning: JAVA_HOME environment variable is not set.
Warning: JAVA_HOME environment variable is not set.
Warning: JAVA_HOME environment variable is not set.
Could not set executable permissions for: /root/.m2/wrapper/dists/apache-maven-3.8.5-bin/5i5jha092a3i37g0paqnfr15e0/apache-maven-3.8.5/bin/mvn
Please do this manually if you want to use Maven.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:47)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:156)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:72)
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/exception/ExceptionHandler
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402)
at java.base/java.lang.Class.getMethodsRecursive(Class.java:3543)
at java.base/java.lang.Class.getMethod0(Class.java:3529)
at java.base/java.lang.Class.getMethod(Class.java:2225)
at org.codehaus.plexus.classworlds.launcher.Launcher.getEnhancedMainMethod(Launcher.java:168)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:261)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.exception.ExceptionHandler
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 17 more
> nx run challenge-config-service:build
Executing command: ./mvnw package
Failed to execute command: ./mvnw package
Error: Command failed: ./mvnw package
at checkExecSyncError (node:child_process:828:11)
at execSync (node:child_process:899:15)
at runBuilderCommand (/__w/challenge-registry/challenge-registry/node_modules/@nxrocks/common/src/lib/core/jvm/utils.js:19:38)
at runBootPluginCommand (/__w/challenge-registry/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/utils/boot-utils.js:15:43)
at /__w/challenge-registry/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/executors/build/executor.js:10:62
at Generator.next (<anonymous>)
at /__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:118:75
at new Promise (<anonymous>)
at Object.__awaiter (/__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:114:16)
at buildExecutor (/__w/challenge-registry/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/executors/build/executor.js:8:20)
at /__w/challenge-registry/challenge-registry/node_modules/nx/src/command-line/run.js:101:23
at Generator.next (<anonymous>)
at /__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:118:75
at new Promise (<anonymous>)
at Object.__awaiter (/__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:114:16) |
Another occurrence: Build at: 2022-08-05T15:01:36.603Z - Hash: ee193ebcc10c8e1c - Time: 36297ms
Warning: JAVA_HOME environment variable is not set.
Exception in thread "main" java.util.zip.ZipException: zip file is empty
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1598)
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1382)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1477)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1315)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1277)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:186)
at org.apache.maven.wrapper.Installer.unzip(Installer.java:209)
at org.apache.maven.wrapper.Installer.createDist(Installer.java:102)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:155)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:72)
> nx run challenge-config-service:build
Executing command: ./mvnw package
Failed to execute command: ./mvnw package
Error: Command failed: ./mvnw package
at checkExecSyncError (node:child_process:828:11)
at execSync (node:child_process:899:15)
at runBuilderCommand (/__w/challenge-registry/challenge-registry/node_modules/@nxrocks/common/src/lib/core/jvm/utils.js:19:38)
at runBootPluginCommand (/__w/challenge-registry/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/utils/boot-utils.js:15:43)
at /__w/challenge-registry/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/executors/build/executor.js:10:62
at Generator.next (<anonymous>)
at /__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:118:75
at new Promise (<anonymous>)
at Object.__awaiter (/__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:114:16)
at buildExecutor (/__w/challenge-registry/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/executors/build/executor.js:8:20)
at /__w/challenge-registry/challenge-registry/node_modules/nx/src/command-line/run.js:101:23
at Generator.next (<anonymous>)
at /__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:118:75
at new Promise (<anonymous>)
at Object.__awaiter (/__w/challenge-registry/challenge-registry/node_modules/tslib/tslib.js:114:16) |
TroubleshootingThe target that fails is usually yarn nx run-many --projects challenge-api-gateway,challenge-auth-service,challenge-config-service,challenge-core-service,challenge-service-registry,challenge-user-service --target=build --parallel --max-parallel=3 --skip-nx-cache I could not reproduce the issue this way. I'm now trying to reproduce the error using act in order to mirror more closely the environment that run the CI workflow on GH. $ ~/bin/act push -l
Stage Job ID Job name Workflow name Workflow file Events
0 devcontainer devcontainer Build Dev Container Image build-devcontainer-image.yml push,pull_request
0 main main CI ci.yml push,pull_request
0 pr pr CI ci.yml push,pull_request
0 svgs SVGs Optimize SVGs svgo.yml push,pull_request Trying to run the $ ~/bin/act push -j main
[CI/main] Cannot parse container options: --user root
[CI/main] 🚀 Start image=sagebionetworks/challenge-devcontainer:bf457d84
[CI/main] 🐳 docker pull image=sagebionetworks/challenge-devcontainer:bf457d84 platform= username= forcePull=false
[CI/main] 🐳 docker create image=sagebionetworks/challenge-devcontainer:bf457d84 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/main] 🐳 docker run image=sagebionetworks/challenge-devcontainer:bf457d84 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/main] 🐳 docker exec cmd=[chown -R 1000:1001 /workspaces/challenge-registry] user=0 workdir=
[CI/main] ☁ git clone 'https://github.com/nrwl/nx-set-shas' # ref=v2
[CI/main] ⭐ Run Pre Derive appropriate SHAs for base and head for `nx affected` commands
[CI/main] ✅ Success - Pre Derive appropriate SHAs for base and head for `nx affected` commands
[CI/main] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/main] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/main] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/main] ☁ git clone 'https://github.com/coverallsapp/github-action' # ref=master
[CI/main] ⭐ Run Main Checkout [main]
[CI/main] 🐳 docker cp src=/workspaces/challenge-registry/. dst=/workspaces/challenge-registry
[CI/main] close /tmp/act3654623485: file already closed
[CI/main] 🐳 docker exec cmd=[chown -R 1000:1001 /workspaces/challenge-registry] user=0 workdir=
[CI/main] ✅ Success - Main Checkout [main]
[CI/main] ⭐ Run Main Derive appropriate SHAs for base and head for `nx affected` commands
[CI/main] 🐳 docker cp src=/home/vscode/.cache/act/nrwl-nx-set-shas@v2/ dst=/var/run/act/actions/nrwl-nx-set-shas@v2/
[CI/main] close /tmp/act1025874977: file already closed
[CI/main] 🐳 docker exec cmd=[chown -R 1000:1001 /var/run/act/actions/nrwl-nx-set-shas@v2/] user=0 workdir=
[CI/main] ⭐ Run Main Set base and head SHAs used for nx affected
[CI/main] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-setSHAs.sh] user= workdir=
|
| WARNING: Working directory 'undefined' doesn't exist.
| (node:47) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
| (Use `node --trace-deprecation ...` to show where the warning was created)
[CI/main] ❗ ::error::Bad credentials
[CI/main] ❌ Failure - Main Set base and head SHAs used for nx affected
[CI/main] exitcode '1': failure
[CI/main] ⚙ ::set-output:: head=
[CI/main] ⚙ ::set-output:: noPreviousBuild=
[CI/main] ⚙ ::set-output:: base=
[CI/main] ❌ Failure - Main Derive appropriate SHAs for base and head for `nx affected` commands
[CI/main] exitcode '1': failure
[CI/main] ⭐ Run Post Derive appropriate SHAs for base and head for `nx affected` commands
[CI/main] 🐳 docker cp src=/home/vscode/.cache/act/nrwl-nx-set-shas@v2/ dst=/var/run/act/actions/nrwl-nx-set-shas@v2/
[CI/main] close /tmp/act600441564: file already closed
[CI/main] 🐳 docker exec cmd=[chown -R 1000:1001 /var/run/act/actions/nrwl-nx-set-shas@v2/] user=0 workdir=
[CI/main] ✅ Success - Post Derive appropriate SHAs for base and head for `nx affected` commands
[CI/main] 🏁 Job failed
Error: Job 'main' failed Using the $ ~/bin/act pull_request -j pr
[CI/pr] Cannot parse container options: --user root
[CI/pr] 🚀 Start image=sagebionetworks/challenge-devcontainer:bf457d84
[CI/pr] 🐳 docker pull image=sagebionetworks/challenge-devcontainer:bf457d84 platform= username= forcePull=false
[CI/pr] 🐳 docker create image=sagebionetworks/challenge-devcontainer:bf457d84 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/pr] 🐳 docker run image=sagebionetworks/challenge-devcontainer:bf457d84 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/pr] 🐳 docker exec cmd=[chown -R 1000:1001 /workspaces/challenge-registry] user=0 workdir=
[CI/pr] ☁ git clone 'https://github.com/actions/checkout' # ref=v2
[CI/pr] ☁ git clone 'https://github.com/nrwl/nx-set-shas' # ref=v2
[CI/pr] ⭐ Run Pre Derive appropriate SHAs for base and head for `nx affected` commands
[CI/pr] ✅ Success - Pre Derive appropriate SHAs for base and head for `nx affected` commands
[CI/pr] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/pr] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/pr] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/pr] ⭐ Run Main actions/checkout@v2
[CI/pr] 🐳 docker cp src=/home/vscode/.cache/act/actions-checkout@v2/ dst=/var/run/act/actions/actions-checkout@v2/
[CI/pr] close /tmp/act1241934835: file already closed
[CI/pr] 🐳 docker exec cmd=[chown -R 1000:1001 /var/run/act/actions/actions-checkout@v2/] user=0 workdir=
[CI/pr] 🐳 docker exec cmd=[node /var/run/act/actions/actions-checkout@v2/dist/index.js] user= workdir=
[CI/pr] 💾 ::save-state name=isPost::true
[CI/pr] 💬 ::debug::GITHUB_WORKSPACE = '/workspaces/challenge-registry'
[CI/pr] 💬 ::debug::qualified repository = 'tschaffter/challenge-registry'
[CI/pr] 💬 ::debug::ref = 'refs/pull/%25!f(<nil>)/merge'
[CI/pr] 💬 ::debug::commit = '6bfdac5663a60f40724fa92da6bd4a97ada430a1'
[CI/pr] 💬 ::debug::clean = true
[CI/pr] 💬 ::debug::fetch depth = 0
[CI/pr] 💬 ::debug::lfs = false
[CI/pr] 💬 ::debug::submodules = false
[CI/pr] 💬 ::debug::recursive submodules = false
[CI/pr] ❗ ::error::Input required and not supplied: token
[CI/pr] ❌ Failure - Main actions/checkout@v2
[CI/pr] exitcode '1': failure
[CI/pr] ⭐ Run Post actions/checkout@v2
[CI/pr] 🐳 docker exec cmd=[node /var/run/act/actions/actions-checkout@v2/dist/index.js] user= workdir=
[CI/pr] ✅ Success - Post actions/checkout@v2
[CI/pr] 🏁 Job failed
Error: Job 'pr' failed I thought that the issue was because I'm running $ ~/bin/act pull_request -j pr --remote-name upstream
[CI/pr] Cannot parse container options: --user root
[CI/pr] 🚀 Start image=sagebionetworks/challenge-devcontainer:bf457d84
[CI/pr] 🐳 docker pull image=sagebionetworks/challenge-devcontainer:bf457d84 platform= username= forcePull=false
[CI/pr] 🐳 docker create image=sagebionetworks/challenge-devcontainer:bf457d84 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/pr] 🐳 docker run image=sagebionetworks/challenge-devcontainer:bf457d84 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/pr] 🐳 docker exec cmd=[chown -R 1000:1001 /workspaces/challenge-registry] user=0 workdir=
[CI/pr] ☁ git clone 'https://github.com/actions/checkout' # ref=v2
[CI/pr] ☁ git clone 'https://github.com/nrwl/nx-set-shas' # ref=v2
[CI/pr] ⭐ Run Pre Derive appropriate SHAs for base and head for `nx affected` commands
[CI/pr] ✅ Success - Pre Derive appropriate SHAs for base and head for `nx affected` commands
[CI/pr] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/pr] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/pr] ☁ git clone 'https://github.com/actions/cache' # ref=v3
[CI/pr] ⭐ Run Main actions/checkout@v2
[CI/pr] 🐳 docker cp src=/home/vscode/.cache/act/actions-checkout@v2/ dst=/var/run/act/actions/actions-checkout@v2/
[CI/pr] close /tmp/act2677468349: file already closed
[CI/pr] 🐳 docker exec cmd=[chown -R 1000:1001 /var/run/act/actions/actions-checkout@v2/] user=0 workdir=
[CI/pr] 🐳 docker exec cmd=[node /var/run/act/actions/actions-checkout@v2/dist/index.js] user= workdir=
[CI/pr] 💾 ::save-state name=isPost::true
[CI/pr] 💬 ::debug::GITHUB_WORKSPACE = '/workspaces/challenge-registry'
[CI/pr] 💬 ::debug::qualified repository = 'Sage-Bionetworks/challenge-registry'
[CI/pr] 💬 ::debug::ref = 'refs/pull/%25!f(<nil>)/merge'
[CI/pr] 💬 ::debug::commit = '6bfdac5663a60f40724fa92da6bd4a97ada430a1'
[CI/pr] 💬 ::debug::clean = true
[CI/pr] 💬 ::debug::fetch depth = 0
[CI/pr] 💬 ::debug::lfs = false
[CI/pr] 💬 ::debug::submodules = false
[CI/pr] 💬 ::debug::recursive submodules = false
[CI/pr] ❗ ::error::Input required and not supplied: token
[CI/pr] ❌ Failure - Main actions/checkout@v2
[CI/pr] exitcode '1': failure
[CI/pr] ⭐ Run Post actions/checkout@v2
[CI/pr] 🐳 docker exec cmd=[node /var/run/act/actions/actions-checkout@v2/dist/index.js] user= workdir=
[CI/pr] ✅ Success - Post actions/checkout@v2
[CI/pr] 🏁 Job failed
Error: Job 'pr' failed See: |
I got past this issue with (see act doc): export GITHUB_TOKEN=changeme
~/bin/act pull_request -j pr --remote-name upstream -s GITHUB_TOKEN=$GITHUB_TOKEN |
A glimpse into the containers started by $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3ad4c28b5032 sagebionetworks/challenge-devcontainer:bf457d84 "/usr/bin/tail -f /d…" 2 minutes ago Up 2 minutes act-CI-pr
404e9a1689e1 sagebionetworks/challenge-devcontainer:bf457d84 "/usr/bin/tail -f /d…" 35 minutes ago Up 35 minutes act-CI-main
07ff18172ba8 catthehacker/ubuntu:act-latest "/usr/bin/tail -f /d…" 48 minutes ago Up 48 minutes act-Optimize-SVGs-SVGs |
The CI workflow needs to be updated because # - run: yarn nx affected --target=build --parallel --max-parallel=3
# - run: yarn nx affected --target=test --parallel --max-parallel=2
- run: yarn nx run-many --projects challenge-api-gateway,challenge-auth-service,challenge-config-service,challenge-core-service,challenge-service-registry,challenge-user-service --target=build --parallel --max-parallel=3 --skip-nx-cache
- run: yarn nx run-many --projects challenge-api-gateway,challenge-auth-service,challenge-config-service,challenge-core-service,challenge-service-registry,challenge-user-service --target=test --parallel --max-parallel=2 --skip-nx-cache |
I was able to reproduce the error locally with $ /workspaces/challenge-registry/node_modules/.bin/nx run-many --projects challenge-api-gateway,challenge-auth-service,challenge-config-service,challenge-core-service,challenge-service-registry,challenge-user-service --target=build --parallel --max-parallel=3 --skip-nx-cache
|
| > NX Running target build for 6 project(s) and 2 task(s) they depend on:
|
| - challenge-api-gateway
| - challenge-auth-service
| - challenge-config-service
| - challenge-core-service
| - challenge-service-registry
| - challenge-user-service
|
|
| Warning: JAVA_HOME environment variable is not set.
| Warning: JAVA_HOME environment variable is not set.
| Warning: JAVA_HOME environment variable is not set.
| Exception in thread "main" java.lang.reflect.InvocationTargetException
| at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
| at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| at java.base/java.lang.reflect.Method.invoke(Method.java:568)
| at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:47)
| at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:156)
| at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:72)
| Caused by: java.lang.NoClassDefFoundError: org/apache/maven/exception/ExceptionHandler
| at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
| at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402)
| at java.base/java.lang.Class.getMethodsRecursive(Class.java:3543)
| at java.base/java.lang.Class.getMethod0(Class.java:3529)
| at java.base/java.lang.Class.getMethod(Class.java:2225)
| at org.codehaus.plexus.classworlds.launcher.Launcher.getEnhancedMainMethod(Launcher.java:168)
| at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:261)
| at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
| at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
| at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
| ... 7 more
| Caused by: java.lang.ClassNotFoundException: org.apache.maven.exception.ExceptionHandler
| at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
| at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
| at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
| at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
| ... 17 more
|
| > nx run challenge-config-service:build
|
| Executing command: ./mvnw package
| Failed to execute command: ./mvnw package
| Error: Command failed: ./mvnw package
| at checkExecSyncError (node:child_process:828:11)
| at execSync (node:child_process:899:15)
| at runBuilderCommand (/workspaces/challenge-registry/node_modules/@nxrocks/common/src/lib/core/jvm/utils.js:19:38)
| at runBootPluginCommand (/workspaces/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/utils/boot-utils.js:15:43)
| at /workspaces/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/executors/build/executor.js:10:62
| at Generator.next (<anonymous>)
| at /workspaces/challenge-registry/node_modules/tslib/tslib.js:118:75
| at new Promise (<anonymous>)
| at Object.__awaiter (/workspaces/challenge-registry/node_modules/tslib/tslib.js:114:16)
| at buildExecutor (/workspaces/challenge-registry/node_modules/@nxrocks/nx-spring-boot/src/executors/build/executor.js:8:20)
| at /workspaces/challenge-registry/node_modules/nx/src/command-line/run.js:101:23
| at Generator.next (<anonymous>)
| at /workspaces/challenge-registry/node_modules/tslib/tslib.js:118:75
| at new Promise (<anonymous>)
| at Object.__awaiter (/workspaces/challenge-registry/node_modules/tslib/tslib.js:114:16)
|
| > NX Error
|
| Pass --verbose to see the stacktrace. |
It does not seem possible to run hyperfine --runs 20 --ignore-failure '~/bin/act pull_request -j pr -s GITHUB_TOKEN=$GITHUB_TOKEN || echo "x" >> error.txt'
# CI
- run: yarn nx run-many --projects challenge-api-gateway,challenge-auth-service,challenge-config-service,challenge-core-service,challenge-service-registry,challenge-user-service --target=build --parallel --max-parallel=3 --skip-nx-cache
The above experiments run 20 * 6 Java projects with Let's run the following command that has previously failed ( hyperfine --runs 120 --ignore-failure 'yarn nx run-many --projects challenge-config-service --target=build --parallel --max-parallel=3 --skip-nx-cache || echo "x" >> error.txt' This task failed 0 times. Let's run the same commands that failed above but without hyperfine --runs 20 --ignore-failure 'yarn nx run-many --projects challenge-api-gateway,challenge-auth-service,challenge-config-service,challenge-core-service,challenge-service-registry,challenge-user-service --target=build --parallel --max-parallel=3 --skip-nx-cache || echo "x" >> error.txt' None of the runs failed. This seems to indicate that the issue is due to a difference between between my dev environment and the CI environment. While the CI workflow is using our dev container, it's using an older version ( Trying again the command with hyperfine --runs 20 --ignore-failure '~/bin/act pull_request -j pr -s GITHUB_TOKEN=$GITHUB_TOKEN || echo "x" >> error.txt' 4 out of 20 runs failed. Same container used to run the task, but it fails when run using the GH workflow. |
Narrowing down the issueHere are the programs involved with running the task:
Skipping
|
Running system
|
Issue when concurrent maven executions update
|
Additional experiments
Potential solutions
|
After #500 , the CI workflow fails probably because of concurrent download of the maven binary by the maven wrapper. Exception in thread "main" java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1469)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1477)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1315)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1277)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:186)
Exception in thread "main" java.nio.file.NoSuchFileException: /root/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6-bin.zip.part
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at org.apache.maven.wrapper.Installer.unzip(Installer.java:207)
at org.apache.maven.wrapper.Installer.createDist(Installer.java:110)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:151)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:76)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:429)
at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266)
at java.base/java.nio.file.Files.move(Files.java:1432)
at org.apache.maven.wrapper.Installer.createDist(Installer.java:95)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:151)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:76)
Exception in thread "main" java.nio.file.NoSuchFileException: /root/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6-bin.zip.part
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:429)
at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266)
at java.base/java.nio.file.Files.move(Files.java:1432)
at org.apache.maven.wrapper.Installer.createDist(Installer.java:95)
at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:151)
at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:76) |
Latest error thrown:
The text was updated successfully, but these errors were encountered: