Hi @drydog
I know that some versions of Node can cause strange behavior - have you tried v16, latest LTS?
How many resources are you giving? Could it simply be that it's running low on RAM or CPU?
Have you tried just building via this Dockerfile? https://github.com/metabase/metabase/blob/master/Dockerfile
I am running whole build in corporate environment and I need to use our maven repositories.
I am getting following error:
Cloning: https://github.com/clojure/tools.build.git
Error building classpath. Failed to read artifact descriptor for org.clojure:clojure:jar:1.10.3
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:clojure:jar:1.10.3
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:255)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:257)
at clojure.tools.deps.alpha.extensions.maven$eval1161$fn__1163.invoke(maven.clj:112)
at clojure.lang.MultiFn.invoke(MultiFn.java:244)
at clojure.tools.deps.alpha$expand_deps$children_task__836$fn__838$fn__839.invoke(alpha.clj:406)
at clojure.tools.deps.alpha.util.concurrent$submit_task$task__505.invoke(concurrent.clj:34)
at clojure.lang.AFn.call(AFn.java:18)
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:829)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.clojure:clojure:pom:1.10.3 from/to central (https://repo1.maven.org/maven2/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target .
I also tried to set up /home/circleci/.m2/settings.xml to use our repos but as we can see in error message it still uses https://repo1.maven.org/maven2/.
Do you know how to change there repositories or where is "default" maven config used in this "metabase/ci:java-11-clj-1.11.0.1100.04-2022-node-browsers" image ?
@drydog The link I provided in previous comment is for the CI image.
I guess there must be problems in your environment. I'm not sure how to debug your environment.
You would need to adjust the deps.edn in Metabase, since the default is to use the Maven repo: https://clojure.org/reference/deps_and_cli#_procurers
But this is getting into Clojure land, where you'll likely find better help elsewhere.
I am trying it on my own computer.
Shadow-cljs - updating dependencies seems working, but I have another issue:
shadow-cljs - dependencies updated
[:app] Compiling ...
[:app] Build completed. (94 files, 29 compiled, 0 warnings, 20.20s)
$ yarn && webpack --bail
$ echo $npm_execpath | grep -q yarn || echo '\033[0;33mSorry, npm is not supported. Please use Yarn (https://yarnpkg.com/).\033[0m'
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^2.0.0"
warning Resolution field "set-value@4.0.1" is incompatible with requested version "set-value@^2.0.0"
warning Resolution field "set-value@4.0.1" is incompatible with requested version "set-value@^2.0.1"
warning Resolution field "prismjs@1.27.0" is incompatible with requested version "prismjs@~1.25.0"
warning Resolution field "immer@9.0.6" is incompatible with requested version "immer@8.0.1"
warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^2.0.0"
warning Resolution field "nth-check@2.0.1" is incompatible with requested version "nth-check@^1.0.2"
warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^4.0.0"
warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^6.0.1"
warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^2.0.0"
success Already up-to-date.
$ husky install
husky - Git hooks installed
Killed
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Step failed: Running build steps for Community (OSS) Edition version UNKNOWN: version, translations, frontend, licenses, drivers, uberjar
{:via
[{:type clojure.lang.ExceptionInfo,
:message
"Running build steps for Community (OSS) Edition version UNKNOWN: version, translations, frontend, licenses, drivers, uberjar",
:data {},
:at [metabuild_common.steps$do_step invokeStatic "steps.clj" 88]}
{:type clojure.lang.ExceptionInfo,
:message "Build frontend with MB_EDITION=oss",
:data {},
:at [metabuild_common.steps$do_step invokeStatic "steps.clj" 88]}
It looks like this step failed
yarn && webpack --bail"
and this was last lines of error:
"Killed"
"error Command failed with exit code 137."
"error Command failed with exit code 137."]}}
The command '/bin/sh -c INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build' returned a non-zero code: 255
@drydog Is it a completely clean environment or your existing development environment?
If you look at our Dockerfiles, then you'll see that we use them on every single PR commit, so you know that everything is working and if you cannot get something to work, then it's likely something in your environment.
Post the output of the following:
# OS and version
sed -nE 's/^PRETTY_NAME="([^"]+)"$/\1/p' /etc/os-release
# Git branch and commit
echo `git status | head -1 && git log -1 --format="commit %H"`
# Java version and architecture
java -version
# NodeJS version
node --version
# Yarn version
yarn --version
# Clojure version
clojure --help | grep Version
@drydog I don't know what the problem is. Try creating a VM and do the build there. If that doesn't work, then I don't know what is wrong, but clearly something with your environment.
@drydog As you can see, it's working without any problems in our CI, so I cannot tell you what to do, since there's something off in your setup. Try different things, but you'll need to debug yourself.