From a2df140afcf489ab4bbbb1b7ad38196f9d52d012 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 21 Feb 2023 16:43:52 +0100 Subject: [PATCH 1/6] remove kv stores from install.py --- .github/workflows/test.yml | 11 +- docs/source/install.md | 41 +++-- jupyterhub_traefik_proxy/install.py | 269 +++------------------------- tests/test_installer.py | 149 +++------------ 4 files changed, 83 insertions(+), 387 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 89bfdae6..99990377 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,8 @@ on: env: ETCDCTL_API: "3" PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python + ETCD_VERSION: "3.5.0" + CONSUL_VERSION: "1.14.4" jobs: # Run "pytest tests" for various Python versions @@ -65,8 +67,15 @@ jobs: run: | pip install --upgrade setuptools pip pip install -r dev-requirements.txt --upgrade . - python -m jupyterhub_traefik_proxy.install --traefik --etcd --consul --output=./bin + python -m jupyterhub_traefik_proxy.install --output=./bin + pip freeze + - name: Install etcd, consul + run: | + curl -L https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip > consul.zip + unzip consul.zip -d ./bin consul + curl -L https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz > etcd.tar.gz + tar -xzf etcd.tar.gz -C ./bin --strip-components=1 '*/etcd*' - name: Select tests run: | diff --git a/docs/source/install.md b/docs/source/install.md index 82f00f8b..3a15899b 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -14,23 +14,19 @@ python3 -m pip install jupyterhub-traefik-proxy ``` -3. In order to be able to launch JupyterHub with traefik-proxy or run the tests, **traefik**, **etcd** and **consul** must first be installed and added to your `PATH`. +3. In order to be able to launch JupyterHub with traefik-proxy or run the tests, **traefik**, must first be installed and added to your `PATH`. - There are two ways you can install traefik, etcd and consul: + There are two ways you can install traefik: 1. Through traefik-proxy's **install utility**. ``` - $ python3 -m jupyterhub_traefik_proxy.install --traefik --etcd --consul --output=/usr/local/bin + $ python3 -m jupyterhub_traefik_proxy.install --output=/usr/local/bin ``` - This will install the default versions of traefik, etcd and consul, namely `traefik-1.7.5`, `etcd-3.3.10` and `consul_1.5.0` to `/usr/local/bin` specified through the `--output` option. + This will install `traefik`. - It is also possible to install the binaries individually. For example to install traefik only: - - ``` - $ python3 -m jupyterhub_traefik_proxy.install --traefik --output=/usr/local/bin - ``` + This will install the default versions of traefik, to to `/usr/local/bin` specified through the `--output` option. If no directory is passed to the installer, a *dependencies* directory will be created in the `traefik-proxy` directory. In this case, you **must** add this directory to `PATH`, e.g. @@ -38,17 +34,15 @@ $ export PATH=$PATH:{$PWD}/dependencies ``` - If you want to install other versions of traefik, etcd and consul in a directory of your choice, just specify it to the installer through the following arguments: + If you want to install other versions of traefik in a directory of your choice, just specify it to the installer through the following arguments: * `--traefik-version` - * `--etcd-version` - * `--consul-version` * `--output` Example: ``` - $ python3 -m jupyterhub_traefik_proxy.install --traefik --etcd --consul --output=dep \ - --traefik-version=1.6.6 --etcd-version=3.2.24 --consul-version=1.5.0 + $ python3 -m jupyterhub_traefik_proxy.install --output=dep \ + --traefik-version=2.4.8 ``` If the desired install directory doesn't exist, it will be created by the installer. @@ -59,12 +53,25 @@ $ python3 -m jupyterhub_traefik_proxy.install --help ``` - 2. From traefik, etcd and consul **release pages**: + 2. From traefik **release page**: * Install [`traefik`](https://traefik.io/#easy-to-install) - * Install [`etcd`](https://github.com/etcd-io/etcd/releases) - * Install [`consul`](https://github.com/hashicorp/consul/releases) +## Installing a key-value store + +If you want to use a key-value store to mediate configuration +(mainly for use in distributed deployments, such as containers), +you can get etcd or consul via their respective release pages: + +* Install [`etcd`](https://github.com/etcd-io/etcd/releases) + +* Install [`consul`](https://github.com/hashicorp/consul/releases) + +Or, more likely, select the appropriate container image. +You will also need to install a Python client for the Key-Value store of your choice: + +- `etcdpy` +- `python-consul2` ## Enabling traefik-proxy in JupyterHub diff --git a/jupyterhub_traefik_proxy/install.py b/jupyterhub_traefik_proxy/install.py index 7ce820ed..0ec54fe5 100644 --- a/jupyterhub_traefik_proxy/install.py +++ b/jupyterhub_traefik_proxy/install.py @@ -1,9 +1,9 @@ import sys import os +import platform from urllib.request import urlretrieve import tarfile import zipfile -import shutil import argparse import textwrap import hashlib @@ -22,25 +22,8 @@ "https://github.com/traefik/traefik/releases/download/v2.2.11/traefik_v2.2.11_windows_amd64.zip": "ee867133e00b2d8395c239d8fed04a26b362e650b371dc0b653f0ee9d52471e6", } -checksums_etcd = { - "https://github.com/etcd-io/etcd/releases/download/v3.4.15/etcd-v3.4.15-linux-arm64.tar.gz": "fcc522275300cf90d42377106d47a2e384d1d2083af205cbb7833a79ef5a49d1", - "https://github.com/etcd-io/etcd/releases/download/v3.4.15/etcd-v3.4.15-linux-amd64.tar.gz": "3bd00836ea328db89ecba3ed2155293934c0d09e64b53d6c9dfc0a256e724b81", - "https://github.com/etcd-io/etcd/releases/download/v3.4.15/etcd-v3.4.15-darwin-amd64.tar.gz": "c596709069193bffc639a22558bdea4d801128e635909ea01a6fd5b5c85da729", - "https://github.com/etcd-io/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz": "1620a59150ec0a0124a65540e23891243feb2d9a628092fb1edcc23974724a45", - "https://github.com/etcd-io/etcd/releases/download/v3.3.10/etcd-v3.3.10-darwin-amd64.tar.gz": "fac4091c7ba6f032830fad7809a115909d0f0cae5cbf5b34044540def743577b", - "https://github.com/etcd-io/etcd/releases/download/v3.2.26/etcd-v3.2.26-linux-amd64.tar.gz": "127d4f2097c09d929beb9d3784590cc11102f4b4d4d4da7ad82d5c9e856afd38", - "https://github.com/etcd-io/etcd/releases/download/v3.2.26/etcd-v3.2.26-darwin-amd64.zip": "0393e650ffa3e61b1fd07c61f8c78af1556896c300c9814545ff0e91f52c3513", -} - -checksums_consul = { - "https://releases.hashicorp.com/consul/1.14.4/consul_1.14.4_darwin_amd64.zip": "694b8edc470838d8a73df08d6c616d25b54724abad410fa27c83697b372a2cfc", - "https://releases.hashicorp.com/consul/1.14.4/consul_1.14.4_darwin_arm64.zip": "330ddff6d6cc16ce091b8f25a4abd0f1984d88f10e272efcec52e01aaaa1b3b0", - "https://releases.hashicorp.com/consul/1.14.4/consul_1.14.4_linux_arm64.zip": "9baf47a75c95945824da0629bc0b3f7b1ca55015e8c9ce7579d9a431a90b721c", - "https://releases.hashicorp.com/consul/1.14.4/consul_1.14.4_linux_amd64.zip": "eafb7c853ce9cc1536bffa99325f8df365ff70a3b83c037836e63964a8adfd7a", - "https://releases.hashicorp.com/consul/1.6.1/consul_1.6.1_linux_amd64.zip": "a8568ca7b6797030b2c32615b4786d4cc75ce7aee2ed9025996fe92b07b31f7e", - "https://releases.hashicorp.com/consul/1.6.1/consul_1.6.1_darwin_amd64.zip": "4bc205e06b2921f998cb6ddbe70de57f8e558e226e44aba3f337f2f245678b85", - "https://releases.hashicorp.com/consul/1.5.0/consul_1.5.0_linux_amd64.zip": "1399064050019db05d3378f757e058ec4426a917dd2d240336b51532065880b6", - "https://releases.hashicorp.com/consul/1.5.0/consul_1.5.0_darwin_amd64.zip": "b4033ea6871fe6136ee5d940c834be2248463c3ec248dc22370e6d5360931325", +machine_map = { + "x86_64": "amd64", } @@ -71,7 +54,7 @@ def install_traefik(prefix, plat, traefik_version): ) if os.path.exists(traefik_bin) and os.path.exists(traefik_archive_path): - print(f"Traefik already exists") + print("Traefik already exists") if traefik_url not in checksums_traefik: warnings.warn( f"Traefik {traefik_version} not tested !", @@ -111,151 +94,10 @@ def install_traefik(prefix, plat, traefik_version): zip_ref.extract("traefik.exe", prefix) os.chmod(traefik_bin, 0o755) + os.unlink(traefik_archive_path) print("--- Done ---") -def install_etcd(prefix, plat, etcd_version): - etcd_downloaded_dir_name = f"etcd-v{etcd_version}-{plat}" - if "linux" in plat: - etcd_archive_extension = "tar.gz" - else: - etcd_archive_extension = "zip" - etcd_downloaded_archive = os.path.join( - prefix, etcd_downloaded_dir_name + "." + etcd_archive_extension - ) - etcd_binaries = os.path.join(prefix, "etcd_binaries") - - etcd_bin = os.path.join(prefix, "etcd") - etcdctl_bin = os.path.join(prefix, "etcdctl") - - etcd_url = ( - "https://github.com/etcd-io/etcd/releases" - f"/download/v{etcd_version}/etcd-v{etcd_version}-{plat}.{etcd_archive_extension}" - ) - - if os.path.exists(etcd_bin) and os.path.exists(etcdctl_bin): - print("Etcd and etcdctl already exist") - if etcd_url not in checksums_etcd: - warnings.warn( - f"Etcd {etcd_version} at {etcd_url} checksum cannot be verified", - stacklevel=2, - ) - os.chmod(etcd_bin, 0o755) - os.chmod(etcdctl_bin, 0o755) - print("--- Done ---") - return - else: - checksum_etcd_archive = checksum_file(etcd_downloaded_archive) - if checksum_etcd_archive == checksums_etcd[etcd_url]: - os.chmod(etcd_bin, 0o755) - os.chmod(etcdctl_bin, 0o755) - print("--- Done ---") - return - else: - print(f"checksum mismatch on {etcd_downloaded_archive}") - os.remove(etcd_bin) - os.remove(etcdctl_bin) - os.remove(etcd_downloaded_archive) - - if not os.path.exists(etcd_downloaded_archive): - print(f"Downloading {etcd_downloaded_dir_name} archive...") - urlretrieve(etcd_url, etcd_downloaded_archive) - else: - print(f"Archive {etcd_downloaded_dir_name} already exists") - - if etcd_url in checksums_etcd: - checksum_etcd_archive = checksum_file(etcd_downloaded_archive) - if checksum_etcd_archive != checksums_etcd[etcd_url]: - raise IOError("Checksum failed") - else: - warnings.warn( - f"Skipping checksum verification of unknown etcd {etcd_version}", - stacklevel=2 - ) - - print("Extracting the archive...") - if etcd_archive_extension == "zip": - with zipfile.ZipFile(etcd_downloaded_archive, "r") as zip_ref: - zip_ref.extract(etcd_downloaded_dir_name + "/etcd", etcd_binaries) - zip_ref.extract(etcd_downloaded_dir_name + "/etcdctl", etcd_binaries) - else: - with (tarfile.open(etcd_downloaded_archive, "r")) as tar_ref: - tar_ref.extract(etcd_downloaded_dir_name + "/etcd", etcd_binaries) - tar_ref.extract(etcd_downloaded_dir_name + "/etcdctl", etcd_binaries) - - shutil.copy(os.path.join(etcd_binaries, etcd_downloaded_dir_name, "etcd"), etcd_bin) - shutil.copy( - os.path.join(etcd_binaries, etcd_downloaded_dir_name, "etcdctl"), etcdctl_bin) - - os.chmod(etcd_bin, 0o755) - os.chmod(etcdctl_bin, 0o755) - - # Cleanup - shutil.rmtree(etcd_binaries) - - print("--- Done ---") - - -def install_consul(prefix, plat, consul_version): - plat = plat.replace("-", "_") - consul_downloaded_dir_name = f"consul_v{consul_version}_{plat}" - consul_archive_extension = "zip" - - consul_downloaded_archive = os.path.join( - prefix, consul_downloaded_dir_name + "." + consul_archive_extension - ) - consul_binaries = os.path.join(prefix, "consul_binaries") - consul_bin = os.path.join(prefix, "consul") - - consul_url = ( - "https://releases.hashicorp.com/consul/" - f"{consul_version}/consul_{consul_version}_{plat}.{consul_archive_extension}" - ) - - if os.path.exists(consul_bin): - print(f"Consul already exists") - if consul_url not in checksums_consul: - warnings.warn( - f"Skipping checksum verification of unknown consul {consul_version}", - stacklevel=2, - ) - os.chmod(consul_bin, 0o755) - print("--- Done ---") - return - else: - if checksum_file(consul_downloaded_archive) == checksums_consul[consul_url]: - os.chmod(consul_bin, 0o755) - print("--- Done ---") - return - else: - print(f"checksum mismatch on {consul_downloaded_archive}") - os.remove(consul_bin) - os.remove(consul_downloaded_archive) - - if consul_url in checksums_consul: - if not os.path.exists(consul_downloaded_archive): - print(f"Downloading {consul_downloaded_dir_name} archive...") - urlretrieve(consul_url, consul_downloaded_archive) - else: - print(f"Archive {consul_downloaded_dir_name} already exists") - - if checksum_file(consul_downloaded_archive) != checksums_consul[consul_url]: - raise IOError("Checksum failed") - - with zipfile.ZipFile(consul_downloaded_archive, "r") as zip_ref: - zip_ref.extract("consul", consul_binaries) - - shutil.copy(os.path.join(consul_binaries, "consul"), consul_bin) - os.chmod(consul_bin, 0o755) - # Cleanup - shutil.rmtree(consul_binaries) - else: - warnings.warn( - f"Consul {consul_version} at {consul_url} checksum cannot be verified", - stacklevel=2, - ) - - print("--- Done ---") def main(): @@ -275,23 +117,6 @@ def main(): - v2.2.11-linux-amd64 - v2.2.11-darwin-amd64 - v2.2.11-windows-amd64 - - etcd: - - v3.4.15-linux-amd64 - - v3.4.15-darwin-amd64 - - v3.4.15-windows-amd64 - - v3.3.10-linux-amd64 - - v3.3.10-darwin-amd64 - - v3.2.26-linux-amd64 - - v3.2.26-darwin-amd64 - - consul: - - v1.14.4_darwin_amd64 - - v1.14.4_darwin_arm64 - - v1.14.4_linux_amd64 - - v1.14.4_linux_arm64 - - v1.6.1_linux_amd64 - - v1.6.1_darwin_amd64 - - v1.5.0_linux_amd64 - - v1.5.0_darwin_amd64 """ ), formatter_class=argparse.RawTextHelpFormatter, @@ -311,7 +136,9 @@ def main(): ), ) - default_platform = sys.platform + "-amd64" + machine = platform.machine() + machine = machine_map.get(machine, machine) + default_platform = f"{sys.platform}-{machine}" parser.add_argument( "--platform", @@ -329,12 +156,7 @@ def main(): parser.add_argument( "--traefik", action="store_true", - help=textwrap.dedent( - """\ - Whether or not to install traefik. - By default traefik is NOT going to be installed. - """ - ), + help="DEPRECATED, IGNORED", ) parser.add_argument( @@ -349,69 +171,25 @@ def main(): """ ), ) - - parser.add_argument( - "--etcd", - action="store_true", - help=textwrap.dedent( - """\ - Whether or not to install etcd. - By default etcd is NOT going to be installed. - """ - ), - ) - - parser.add_argument( - "--etcd-version", - dest="etcd_version", - default="3.4.15", - help=textwrap.dedent( - """\ - The version of etcd to download. - If no version is provided, it defaults to: - --- %(default)s --- - """ - ), - ) - - parser.add_argument( - "--consul", - action="store_true", - help=textwrap.dedent( - """\ - Whether or not to install consul. - By default consul is NOT going to be installed: - """ - ), - ) - - parser.add_argument( - "--consul-version", - dest="consul_version", - default="1.14.4", - help=textwrap.dedent( - """\ - The version of consul to download. - If no version is provided, it defaults to: - --- %(default)s --- - """ - ), - ) + if "--etcd" in sys.argv: + sys.exit( + "Installing etcd is no longer supported. Visit https://github.com/etcd-io/etcd/releases/" + ) + if "--consul" in sys.argv: + sys.exit( + "Installing consul is no longer supported. Visit https://developer.hashicorp.com/consul/downloads" + ) args = parser.parse_args() deps_dir = args.installation_dir plat = args.plat traefik_version = args.traefik_version - etcd_version = args.etcd_version - consul_version = args.consul_version - if not args.traefik and not args.etcd and not args.consul: + if args.traefik: print( - """Please specify what binary to install. - Tip: python3 -m jupyterhub_traefik_proxy.install --help - to get the list of available options.""" + "Specifying --traefik is deprecated and ignored. Only installing traefik is supported.", + file=sys.stderr, ) - return if os.path.exists(deps_dir): print(f"Using existing output directory {deps_dir}...") @@ -419,12 +197,7 @@ def main(): print(f"Creating output directory {deps_dir}...") os.makedirs(deps_dir) - if args.traefik: - install_traefik(deps_dir, plat, traefik_version) - if args.etcd: - install_etcd(deps_dir, plat, etcd_version) - if args.consul: - install_consul(deps_dir, plat, consul_version) + install_traefik(deps_dir, plat, traefik_version) if __name__ == "__main__": diff --git a/tests/test_installer.py b/tests/test_installer.py index 157a336b..6bc05360 100644 --- a/tests/test_installer.py +++ b/tests/test_installer.py @@ -8,95 +8,37 @@ # Mark all tests in this file as slow pytestmark = pytest.mark.slow - -def cleanup(dirname): - import shutil - - shutil.rmtree(dirname) - - -def assert_deps_dir_empty(deps_dir): - assert os.path.exists(deps_dir) - assert os.path.isdir(deps_dir) - assert not os.listdir(deps_dir) - - def assert_only_traefik_existence(deps_dir): - traefik_bin = os.path.join(deps_dir, "traefik") - etcd_bin = os.path.join(deps_dir, "etcd") - etcdctl_bin = os.path.join(deps_dir, "etcdctl") - consul_bin = os.path.join(deps_dir, "consul") - - assert os.path.exists(traefik_bin) - assert not os.path.exists(etcd_bin) - assert not os.path.exists(etcdctl_bin) - assert not os.path.exists(consul_bin) - - -def assert_binaries_existence(deps_dir): - traefik_bin = os.path.join(deps_dir, "traefik") - etcd_bin = os.path.join(deps_dir, "etcd") - etcdctl_bin = os.path.join(deps_dir, "etcdctl") - consul_bin = os.path.join(deps_dir, "consul") - - assert os.path.exists(traefik_bin) - assert os.path.exists(etcd_bin) - assert os.path.exists(etcdctl_bin) - assert os.path.exists(consul_bin) - - -def test_default_conf(): - parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - default_deps_dir = os.path.join(parent_dir, "dependencies") + assert deps_dir.exists() + assert os.listdir(deps_dir) == ["traefik"] - subprocess.run([sys.executable, "-m", installer_module]) - assert not os.path.exists(default_deps_dir) +def test_default_conf(tmp_path): + default_deps_dir = tmp_path / "dependencies" -def test_install_only_traefik_default_version(): - parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - default_deps_dir = os.path.join(parent_dir, "dependencies") + subprocess.run([sys.executable, "-m", installer_module], cwd=str(tmp_path)) + assert_only_traefik_existence(default_deps_dir) - try: - subprocess.run([sys.executable, "-m", installer_module, "--traefik"]) - assert_only_traefik_existence(default_deps_dir) - finally: - cleanup(default_deps_dir) - -def test_install_all_binaries_default_version(): - parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - default_deps_dir = os.path.join(parent_dir, "dependencies") - - try: - subprocess.run( - [sys.executable, "-m", installer_module, "--traefik", "--etcd", "--consul"] - ) - assert_binaries_existence(default_deps_dir) - finally: - cleanup(default_deps_dir) - - -def test_output_arg_new_dir(tmpdir): - deps_dir = str(tmpdir.join("deps/out")) +def test_output_arg_new_dir(tmp_path): + deps_dir = tmp_path / "deps" / "out" subprocess.run( [sys.executable, "-m", installer_module, "--traefik", f"--output={deps_dir}"] ) - - assert os.path.exists(deps_dir) assert_only_traefik_existence(deps_dir) -def test_output_arg_existing_dir(tmpdir): - deps_dir = tmpdir.mkdir("deps") +def test_output_arg_existing_dir(tmp_path): + deps_dir = tmp_path / "deps" + deps_dir.mkdir() subprocess.run( [sys.executable, "-m", installer_module, "--traefik", f"--output={deps_dir}"] ) assert_only_traefik_existence(deps_dir) -def test_version(tmpdir): - deps_dir = str(tmpdir.join("deps")) +def test_version(tmp_path): + deps_dir = tmp_path / "deps" subprocess.run( [ sys.executable, @@ -105,81 +47,46 @@ def test_version(tmpdir): f"--output={deps_dir}", "--traefik", "--traefik-version=2.4.8", - "--etcd", - "--etcd-version=3.2.25", - "--consul", - "--consul-version=1.5.0", - ] - ) - - assert os.path.exists(deps_dir) - assert_binaries_existence(deps_dir) - - -def test_linux_arm_platform(tmpdir): - deps_dir = str(tmpdir.join("deps")) - subprocess.run( - [ - sys.executable, - "-m", - installer_module, - f"--output={deps_dir}", - "--traefik", - "--platform=linux-arm64", - ] - ) - - assert os.path.exists(deps_dir) - assert_only_traefik_existence(deps_dir) - - -def test_linux_amd64_platform(tmpdir): - deps_dir = str(tmpdir.join("deps")) - subprocess.run( - [ - sys.executable, - "-m", - installer_module, - f"--output={deps_dir}", - "--traefik", - "--platform=linux-amd64", ] ) - - assert os.path.exists(deps_dir) assert_only_traefik_existence(deps_dir) -def test_mac_platform(tmpdir): - deps_dir = str(tmpdir.join("deps")) +@pytest.mark.parametrize( + "platform", + [ + "linux-amd64", + "linux-arm64", + "darwin-arm64", + "darwin-amd64", + ], +) +def test_platform(tmp_path, platform): + deps_dir = tmp_path / "deps" subprocess.run( [ sys.executable, "-m", installer_module, f"--output={deps_dir}", - "--traefik", - "--platform=darwin-amd64", + f"--platform={platform}", ] ) - - assert os.path.exists(deps_dir) assert_only_traefik_existence(deps_dir) -def test_warning(tmpdir): - deps_dir = str(tmpdir.join("deps")) +def test_warning(tmp_path): + deps_dir = tmp_path / "deps" output = subprocess.check_output( [ sys.executable, "-m", installer_module, f"--output={deps_dir}", - "--traefik", + "--platform=linux-amd64", "--traefik-version=2.4.1", ], stderr=subprocess.STDOUT, ) - assert os.path.exists(deps_dir) assert_only_traefik_existence(deps_dir) assert output.decode().count("UserWarning") == 1 From bd4343f77f9dbb1a9c9d0b261f18739f06c4206f Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 22 Feb 2023 10:11:03 +0100 Subject: [PATCH 2/6] ci: test against ETCD 3.5.7 instead of 3.5.0 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99990377..6eb7f688 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ on: env: ETCDCTL_API: "3" PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python - ETCD_VERSION: "3.5.0" + ETCD_VERSION: "3.5.7" CONSUL_VERSION: "1.14.4" jobs: From 145d2cec4e836a96a807bedb20c600714d3b3e67 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 22 Feb 2023 10:21:55 +0100 Subject: [PATCH 3/6] Add --wildcards to tar command using them --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6eb7f688..5acf0c5a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,7 +75,7 @@ jobs: curl -L https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip > consul.zip unzip consul.zip -d ./bin consul curl -L https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz > etcd.tar.gz - tar -xzf etcd.tar.gz -C ./bin --strip-components=1 '*/etcd*' + tar -xzf etcd.tar.gz -C ./bin --strip-components=1 --wildcards '*/etcd*' - name: Select tests run: | From 38d16881d19fe493e067bcd5fb23dcd295e0080e Mon Sep 17 00:00:00 2001 From: Georgiana Date: Wed, 22 Feb 2023 12:41:53 +0200 Subject: [PATCH 4/6] Trial earlier etcd version check if it still hangs --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5acf0c5a..d67f07f8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ on: env: ETCDCTL_API: "3" PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python - ETCD_VERSION: "3.5.7" + ETCD_VERSION: "3.4.24" CONSUL_VERSION: "1.14.4" jobs: From bb7e7c40c62f22a08831b54d35845fd808a2de3e Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Wed, 22 Feb 2023 12:50:26 +0200 Subject: [PATCH 5/6] Rename ETCD_VERSION env var to something not used by etcd --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d67f07f8..868df312 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ on: env: ETCDCTL_API: "3" PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python - ETCD_VERSION: "3.4.24" + ETCD_DOWNLOAD_VERSION: "3.4.24" CONSUL_VERSION: "1.14.4" jobs: @@ -74,7 +74,7 @@ jobs: run: | curl -L https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip > consul.zip unzip consul.zip -d ./bin consul - curl -L https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz > etcd.tar.gz + curl -L https://github.com/etcd-io/etcd/releases/download/v${ETCD_DOWNLOAD_VERSION}/etcd-v${ETCD_DOWNLOAD_VERSION}-linux-amd64.tar.gz > etcd.tar.gz tar -xzf etcd.tar.gz -C ./bin --strip-components=1 --wildcards '*/etcd*' - name: Select tests From 4604a5e01b0e139ed053bfe6460d6801772cde31 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 22 Feb 2023 12:32:17 +0100 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Erik Sundell --- docs/source/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.md b/docs/source/install.md index 3a15899b..aeb079ac 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -21,7 +21,7 @@ 1. Through traefik-proxy's **install utility**. ``` - $ python3 -m jupyterhub_traefik_proxy.install --output=/usr/local/bin + $ python3 -m jupyterhub_traefik_proxy.install --output=/usr/local/bin ``` This will install `traefik`.