elixir-explorer / adbc

Apache Arrow ADBC bindings for Elixir
https://arrow.apache.org/adbc/
Apache License 2.0
50 stars 16 forks source link

ci: failed to download drivers on Windows #21

Closed cocoa-xu closed 1 year ago

cocoa-xu commented 1 year ago

Not sure why it failed to download SQLite driver on Windows GitHub CI. The URL is correct though, https://github.com/apache/arrow-adbc/releases/download/apache-arrow-adbc-0.5.1/adbc_driver_sqlite-0.5.1-py3-none-win_amd64.whl.

It worked fine on a remote virtual Windows machine.

Screenshot 2023-07-19 at 10 07 09
josevalim commented 1 year ago

Yeah, I don't know what to do. Maybe we manually download it to the cache directory using wget/curl to bypass it.

cocoa-xu commented 1 year ago

Also, I tried to set :httpc.set_options([verbose: :verbose]) before invoking :httpc.request/4, but I got this error message:

:httpc.set_options/2 - docs

$ mix test --exclude postgresql
10:26:00.391 [debug] Downloading Adbc driver for sqlite from https://github.com/apache/arrow-adbc/releases/download/apache-arrow-adbc-0.5.1/adbc_driver_sqlite-0.5.1-py3-none-win_amd64.whl...

10:26:00.415 [error] GenServer :httpc_manager terminating
** (UndefinedFunctionError) function :dbg.tracer/0 is undefined (module :dbg is not available)
    :dbg.tracer()
    (inets 9.0.1) httpc_manager.erl:565: :httpc_manager.handle_cast/2
    (stdlib 5.0.2) gen_server.erl:1103: :gen_server.try_handle_cast/3
    (stdlib 5.0.2) gen_server.erl:1165: :gen_server.handle_msg/6
    (stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:set_options, [unix_socket: :undefined, ipfamily: :inet, verbose: :verbose]}}
State: {:state, [], :httpc_manager__handler_db, {:cookie_db, :undefined, #Reference<0.2084189163.2312241153.229895>}, :httpc_manager__session_db, :httpc_manager, {:options, {:undefined, []}, {:undefined, []}, 0, 2, 5, 120000, 2, :disabled, false, :inet, :default, :default, [], :undefined}}
** (exit) exited in: :gen_server.call(:httpc_manager, {:request, {:request, :undefined, #PID<0.98.0>, 0, :https, {~c"github.com", 443}, ~c"/apache/arrow-adbc/releases/download/apache-arrow-adbc-0.5.1/adbc_driver_sqlite-0.5.1-py3-none-win_amd64.whl", [], :get, {:http_request_h, :undefined, ~c"keep-alive", :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, ~c"github.com", :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, [], :undefined, :undefined, :undefined, :undefined, ~c"0", :undefined, :undefined, :undefined, :undefined, :undefined, ...}, {[], []}, {:http_options, ~c"HTTP/1.1", :infinity, true, {:ssl, [verify: :verify_peer, customize_hostname_check: [match_fun: #Function<6.72213284/2 in :public_key.pkix_verify_hostname_match_fun/1>], cacertfile: "c:/Users/Administrator/Documents/adbc/_build/test/lib/castore/priv/cacerts.pem"]}, :undefined, false, :infinity, false}, ~c"https://github.com/apache/arrow-adbc/releases/download/apache-arrow-adbc-0.5.1/adbc_driver_sqlite-0.5.1-py3-none-win_amd64.whl", [], :none, [], 1689762360415, :undefined, :undefined, :undefined, false}}, :infinity)
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function :dbg.tracer/0 is undefined (module :dbg is not available)
            :dbg.tracer()
            (inets 9.0.1) httpc_manager.erl:565: :httpc_manager.handle_cast/2
            (stdlib 5.0.2) gen_server.erl:1103: :gen_server.try_handle_cast/3
            (stdlib 5.0.2) gen_server.erl:1165: :gen_server.handle_msg/6
            (stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
    (stdlib 5.0.2) gen_server.erl:401: :gen_server.call/3
    (inets 9.0.1) httpc.erl:807: :httpc.handle_request/9
    (adbc 0.1.0-dev) lib/adbc_helper.ex:52: Adbc.Helper.download/2
    (adbc 0.1.0-dev) lib/adbc_driver.ex:118: Adbc.Driver.cached_download/5
    (adbc 0.1.0-dev) lib/adbc_driver.ex:22: Adbc.Driver.download/2
    (adbc 0.1.0-dev) lib/adbc.ex:122: Adbc.download_driver!/2
    test/test_helper.exs:1: (file)

I installed Erlang and Elixir using the official installers from their official websites. I guess that this error means that I need to compile Erlang from source with debug option?

josevalim commented 1 year ago

@cocoa-xu Add :runtime_tools to extra_applications in the mix.exs temporarily. :)

cocoa-xu commented 1 year ago

This is not the real issue. See details in #22.