mfussenegger / cr8

CLI collection of utilities for working with CrateDB or PostgreSQL. Benchmark queries, insert data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run-crate windows support

mfussenegger opened this issue · comments

cr8 tries to unpack the .zip with tarfile:

Downloading https://cdn.crate.io/downloads/releases/cratedb/x64_windows/crate-4.2.2.zip and extracting to C:\Users\runneradmin\.cache\cr8\crates
Traceback (most recent call last):
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\Scripts\cr8.exe\__main__.py", line 7, in <module>
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\site-packages\cr8\__main__.py", line 84, in main
    _run_crate_and_rest(p, args_groups)
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\site-packages\cr8\__main__.py", line 42, in _run_crate_and_rest
    with create_node(version=args.version,
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\site-packages\cr8\run_crate.py", line 700, in create_node
    crate_dir = get_crate(version, crate_root)
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\site-packages\cr8\run_crate.py", line 670, in get_crate
    crate_dir = _download_and_extract(uri, crate_root)
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\site-packages\cr8\run_crate.py", line 485, in _download_and_extract
    with tarfile.open(fileobj=tmpfile) as t:
  File "c:\hostedtoolcache\windows\python\3.8.5\x64\lib\tarfile.py", line 1606, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

Hi Mathias,

one of my commits within #337 gets things straight on that matter, see 0935765. It might help you and others already when using cr8 run-crate ad hoc.

So, feel free to cherry-pick this one as I can't promise any success with the whole bunch of CI-testing on Windows. However, I still hope that I can pick up the work on that sooner or later.

With kind regards,
Andreas.