Skip to content
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

Cannot build docker image #7

Open
AlexVialaBellander opened this issue Feb 26, 2024 · 4 comments
Open

Cannot build docker image #7

AlexVialaBellander opened this issue Feb 26, 2024 · 4 comments
Assignees

Comments

@AlexVialaBellander
Copy link

AlexVialaBellander commented Feb 26, 2024

Hi, I am unable to build the drives and a metabase docker image as per the instructions. I get the following errors:

82.26   Step "Build driver :sparksql-databricks-v2 (edition = :oss, options = {:project-dir \"/build/driver\", :target-dir \"/build/driver/target\"})" failed with error nil
82.26 What would you like to do?
82.26 [T]ry this step again
82.26 [F]ail -- pass the failure of this step to the parent step (which can be retried)
82.26 [S]kip this step
82.26 [R]EPL -- open a REPL so you can debug things
82.26 [Q]uit the build script (or return to the top level if running from the REPL) [T/F/S/R/Q] {:clojure.main/message
82.28  "Execution error (NullPointerException) at metabuild-common.input/read-line-with-prompt (input.clj:29).\nnull\n",
82.28  :clojure.main/triage
82.28  {:clojure.error/class java.lang.NullPointerException,
82.28   :clojure.error/line 29,
82.28   :clojure.error/symbol metabuild-common.input/read-line-with-prompt,
82.28   :clojure.error/source "input.clj",
82.28   :clojure.error/phase :execution},
82.28  :clojure.main/trace
82.28  {:via [{:type java.lang.NullPointerException, :at [clojure.string$trim invokeStatic "string.clj" 239]}],
82.28   :trace
82.28   [[clojure.string$trim invokeStatic "string.clj" 239]
82.28    [clojure.string$trim invoke "string.clj" 235]
82.28    [metabuild_common.input$read_line_with_prompt invokeStatic "input.clj" 29]
82.28    [metabuild_common.input$read_line_with_prompt doInvoke "input.clj" 16]
82.28    [clojure.lang.RestFn applyTo "RestFn.java" 139]
82.28    [clojure.core$apply invokeStatic "core.clj" 673]
82.28    [clojure.core$apply invoke "core.clj" 662]
82.28    [metabuild_common.input$letter_options_prompt invokeStatic "input.clj" 60]
82.28    [metabuild_common.input$letter_options_prompt doInvoke "input.clj" 48]
82.28    [clojure.lang.RestFn invoke "RestFn.java" 425]
82.28    [metabuild_common.steps$handle_step_failure_interactive invokeStatic "steps.clj" 49]
82.28    [metabuild_common.steps$handle_step_failure_interactive invoke "steps.clj" 45]
82.28    [metabuild_common.steps$do_step invokeStatic "steps.clj" 91]
82.28    [metabuild_common.steps$do_step invoke "steps.clj" 79]
82.28    [build_drivers.build_driver$build_driver_BANG_ invokeStatic "build_driver.clj" 30]
82.28    [build_drivers.build_driver$build_driver_BANG_ invoke "build_driver.clj" 15]
82.28    [build_drivers.build_driver$build_driver_BANG_ invokeStatic "build_driver.clj" 18]
82.28    [build_drivers.build_driver$build_driver_BANG_ invoke "build_driver.clj" 15]
82.28    [clojure.lang.AFn applyToHelper "AFn.java" 154]
82.28    [clojure.lang.AFn applyTo "AFn.java" 144]
82.28    [clojure.lang.Var applyTo "Var.java" 705]
82.28    [clojure.core$apply invokeStatic "core.clj" 667]
82.28    [clojure.core$apply invoke "core.clj" 662]
82.28    [clojure.run.exec$exec invokeStatic "exec.clj" 48]
82.28    [clojure.run.exec$exec doInvoke "exec.clj" 39]
82.28    [clojure.lang.RestFn invoke "RestFn.java" 423]
82.28    [clojure.run.exec$_main$fn__205 invoke "exec.clj" 180]
82.28    [clojure.run.exec$_main invokeStatic "exec.clj" 176]
82.28    [clojure.run.exec$_main doInvoke "exec.clj" 139]
82.28    [clojure.lang.RestFn applyTo "RestFn.java" 137]
82.28    [clojure.lang.Var applyTo "Var.java" 705]
82.28    [clojure.core$apply invokeStatic "core.clj" 667]
82.28    [clojure.main$main_opt invokeStatic "main.clj" 514]
82.28    [clojure.main$main_opt invoke "main.clj" 510]
82.28    [clojure.main$main invokeStatic "main.clj" 664]
82.28    [clojure.main$main doInvoke "main.clj" 616]
82.28    [clojure.lang.RestFn applyTo "RestFn.java" 137]
82.28    [clojure.lang.Var applyTo "Var.java" 705]
82.28    [clojure.main main "main.java" 40]]}}
82.28
82.28 Execution error (NullPointerException) at metabuild-common.input/read-line-with-prompt (input.clj:29).
82.28 null
82.28
------
Dockerfile:38
--------------------
  37 |     FROM stg_base as stg_build
  38 | >>> RUN clojure \
  39 | >>>     -Sdeps "{:aliases {:sparksql-databricks-v2 {:extra-deps {com.metabase/sparksql-databricks {:local/root \"/build/driver\"}}}}}" \
  40 | >>>     -X:build:sparksql-databricks-v2 \
  41 | >>>     build-drivers.build-driver/build-driver! \
  42 | >>>     "{:driver :sparksql-databricks-v2, :project-dir \"/build/driver\", :target-dir \"/build/driver/target\"}"
  43 |
--------------------
ERROR: failed to solve: process "/bin/sh -c clojure     -Sdeps \"{:aliases {:sparksql-databricks-v2 {:extra-deps {com.metabase/sparksql-databricks {:local/root \\\"/build/driver\\\"}}}}}\"     -X:build:sparksql-databricks-v2     build-drivers.build-driver/build-driver!     \"{:driver :sparksql-databricks-v2, :project-dir \\\"/build/driver\\\", :target-dir \\\"/build/driver/target\\\"}\"" did not complete successfully: exit code: 1

If it makes any difference, I am running on Apple Silicon.

@AlexVialaBellander
Copy link
Author

Chaning this line: https://github.com/Brigad/metabase-sparksql-databricks-driver/blob/master/Dockerfile#L2

to the latest Metabase version makes the build work.

@shrodingers
Copy link
Member

@AlexVialaBellander , will put that in the readme and update default value then !
Indeed i tested with the latest version as a build-arg so didnt have the issue.

Did you have other issues with the driver ?

@shrodingers shrodingers self-assigned this Feb 29, 2024
@AlexVialaBellander
Copy link
Author

AlexVialaBellander commented Feb 29, 2024

@shrodingers Maybe a bit of an edge case, but our catalogue names are escaped due to the usage of "-". So I initially wrote `our-catalogue-name` and this caused some failure. Without the backticks worked. I'll prob open a new issue about it.

@shrodingers
Copy link
Member

Yeah, didn't have the case with -, do not hesitate, gonna see if I can fix it (seems related to the escaping in the base driver imo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants