Title
h

handsome-football-66174

07/12/2022, 7:21 PM
Hi Team, I am trying to build docker image using the 0.8.40 version . Facing this error, Any suggestions for this -
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':datahub-web-react:yarnBuild'.
> Process 'command 'yarn'' finished with non-zero exit value 131

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

BUILD FAILED in 2m 26s
b

bulky-soccer-26729

07/12/2022, 9:48 PM
Hi Keerthi! could you post the full stack trace that should come above this? I'm curious what's making
yarnBuild
fail here. Have you changed any code in datahub-web-react?
e

echoing-airport-49548

07/12/2022, 9:48 PM
Hi @handsome-football-66174 can you share which command you’re running?
b

bulky-soccer-26729

07/12/2022, 9:48 PM
^ also that
h

handsome-football-66174

07/13/2022, 1:05 PM
@echoing-airport-49548 @bulky-soccer-26729 I am using the following commands - DOCKER_BUILDKIT=1 docker build -t testdockerimage -f ./docker/datahub-frontend/Dockerfile . docker build -t testdockerimage -f ./docker/datahub-frontend/Dockerfile . The only changes I made was for the distBaseUrl(pointing to our artifactory) in build.gradle and the repositories.gradle (pointing to our artifactory)
@bulky-soccer-26729 @echoing-airport-49548 - Let me know if you have some time to connect on this or any suggestions .
b

bulky-soccer-26729

07/13/2022, 3:18 PM
so you changed
distBaseUrl
in build.gradle in datahub-web-react? I wonder if that's throwing off your node version compared to what we have set in build.gradle?
h

handsome-football-66174

07/13/2022, 4:09 PM
@bulky-soccer-26729 - the distbaseUrl was modified to point to our artifactory . What version of node is required ?
b

bulky-soccer-26729

07/13/2022, 4:23 PM
I believe as long as the node versions match up then it shouldn't be a problem (I could be wrong here) - but if you check build.gradle, the version should be set there for you (mine is
16.8.0
)
h

handsome-football-66174

07/13/2022, 4:50 PM
@bulky-soccer-26729 - Does this make a difference , this is in /docker/datahub-frontend/Dockerfile
FROM --platform=$BUILDPLATFORM node:16.13.0-alpine3.14 AS prod-build
b

bulky-soccer-26729

07/13/2022, 5:06 PM
no that will be for datahub-frontend, I think your issue here is datahub-web-react (also I have the same line in my /docker/datahub-frontend/Dockerfile as well)
h

handsome-football-66174

07/13/2022, 5:12 PM
@bulky-soccer-26729 Any pointers on how to debug/resolve the issue ?
@bulky-soccer-26729 @echoing-airport-49548 - Latest error
$ graphql-codegen --config codegen.yml
[17:33:23] Parse configuration [started]
node:events:368
   throw er; // Unhandled 'error' event
   ^

Error: write EPIPE
  at afterWriteDispatched (node:internal/stream_base_commons:164:15)
  at writeGeneric (node:internal/stream_base_commons:155:3)
  at Socket._writeGeneric (node:net:795:11)
  at Socket._write (node:net:807:8)
  at writeOrBuffer (node:internal/streams/writable:389:12)
  at _write (node:internal/streams/writable:330:10)
  at Socket.Writable.write (node:internal/streams/writable:334:10)
  at console.value (node:internal/console/constructor:285:16)
  at console.log (node:internal/console/constructor:359:26)
  at exports.log (/datahub-src/datahub-web-react/node_modules/listr-verbose-renderer/lib/utils.js:13:10)
Emitted 'error' event on Socket instance at:
  at emitErrorNT (node:internal/streams/destroy:157:8)
  at emitErrorCloseNT (node:internal/streams/destroy:122:3)
  at processTicksAndRejections (node:internal/process/task_queues:83:21) {
 errno: -32,
 code: 'EPIPE',
 syscall: 'write'
}

> Task :datahub-web-react:yarnBuild FAILED

> Task :li-utils:generateDataTemplate
There are 33 data schema input files. Using input root folder: /datahub-src/li-utils/src/main/pegasus
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 34 files

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.9.2/userguide/command_line_interface.html#sec:command_line_warnings>
29 actionable tasks: 29 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':datahub-web-react:yarnBuild'.
> Process 'command 'yarn'' finished with non-zero exit value 131

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

BUILD FAILED in 54s
b

bulky-soccer-26729

07/13/2022, 7:21 PM
if you remove the two small changes that you made to you build process and restart from scratch, do your errors get resolved? it'd be nice to narrow this down to a general issue or an issue with your specific changes
h

handsome-football-66174

07/13/2022, 7:38 PM
@bulky-soccer-26729 - get this error without any change to v0.8.40
Step 5/26 : FROM --platform=$BUILDPLATFORM node:16.13.0-alpine3.14 AS prod-build
failed to parse platform : "" is an invalid component of "": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument
e

echoing-airport-49548

07/13/2022, 7:46 PM
Hi @handsome-football-66174 could you try running ./gradlew clean first and then rerun these commands?
h

handsome-football-66174

07/13/2022, 8:02 PM
@echoing-airport-49548 Getting this error-
> Task :buildSrc:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:compileJava'.
> Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.amzn2.0.2.x86_64/jre contains a valid JDK installation.
Set up JAVA_HOME and pointing to the artifactory repos we use correctly and was able to run ./gradlew clean
It is throwing this error while building -
$ graphql-codegen --config codegen.yml
node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:164:15)
    at writeGeneric (node:internal/stream_base_commons:155:3)
    at Socket._writeGeneric (node:net:795:11)
    at Socket._write (node:net:807:8)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at Socket.Writable.write (node:internal/streams/writable:334:10)
    at console.value (node:internal/console/constructor:285:16)
    at console.log (node:internal/console/constructor:359:26)
    at exports.log (/datahub-src/datahub-web-react/node_modules/listr-verbose-renderer/lib/utils.js:13:10)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
b

bulky-soccer-26729

07/13/2022, 8:39 PM
do you have node installed on your machine? try running
node --version
h

handsome-football-66174

07/13/2022, 8:56 PM
@bulky-soccer-26729 node --version v16.8.0
@bulky-soccer-26729 @echoing-airport-49548 - Tried this on another machine ( not EC2 instance and the image built without issues )
e

echoing-airport-49548

07/14/2022, 4:08 PM
Oh wow
So the initial failure was on EC2?
Would you mind sharing what type of machine it successfully built on?
h

handsome-football-66174

07/14/2022, 4:14 PM
Yes I was executing it on EC2 instance. Finally it ran on Mac.
@echoing-airport-49548 @bulky-soccer-26729 Does the Manage Access Token need to be enabled ?
e

echoing-airport-49548

07/14/2022, 4:31 PM
Yes there is a separate permission for that
let me find it for you
check out our policies guide, we have a few permissions related to access tokens
you would need the
Generate Personal Access Tokens
permission in this case
h

handsome-football-66174

07/14/2022, 4:42 PM
Sure will go through the policy guide. Thank you !
@echoing-airport-49548 - Applied the policy but still getting the same issue
e

echoing-airport-49548

07/19/2022, 10:43 PM
Hmm have you verified that the policy is applied to your user?
After that, can you try adding the
Manage All Access Tokens
permission and see if that resolves it?
You shouldn’t need that permission but just want to make sure
h

handsome-football-66174

07/20/2022, 4:36 PM
@echoing-airport-49548 - The issue was resolved once I set the following configuration to true in Helm charts (along with the policy ofcourse)