From 9301693cb28a87931fb145e9f2dc6eda092a4f32 Mon Sep 17 00:00:00 2001 From: Taewoon Kim Date: Thu, 29 Oct 2026 18:46:26 +0900 Subject: [PATCH] examples: the Docker bootstrap downloads the pinned uv 0.12.0, not the latest via the GitHub API (#137) uv_bootstrap_commands() asked api.github.com for the latest uv release (unpinned, and rate-limited for anonymous use) before downloading it. Each of 07 to 12 now has UV_VERSION = "0.12.0", the version CI pins, and downloads that release directly. Smoked: 07 arcadedb_sql, 11 arcadedb_sql and 12 on 11's output, in their containers. Co-Authored-By: Claude Opus 5.5 --- examples/07_stackoverflow_tables_oltp.py | 8 ++++++-- examples/08_stackoverflow_tables_olap.py | 8 ++++++-- examples/09_stackoverflow_graph_oltp.py | 8 ++++++-- examples/10_stackoverflow_graph_olap.py | 8 ++++++-- examples/11_vector_index_build.py | 8 ++++++-- examples/12_vector_search.py | 8 ++++++-- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/examples/07_stackoverflow_tables_oltp.py b/examples/07_stackoverflow_tables_oltp.py index 011e9b6..e27aba3 100644 --- a/examples/07_stackoverflow_tables_oltp.py +++ b/examples/07_stackoverflow_tables_oltp.py @@ -35,13 +35,17 @@ sys.exit(1) +# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), +# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). +UV_VERSION = "0.12.0" + + def uv_bootstrap_commands(python_cmd: str) -> List[str]: return [ ( f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; ' "arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; " - "req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); " - "version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); " + f"version='{UV_VERSION}'; " "archive=pathlib.Path('/tmp/uv.tar.gz'); " "archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); " "target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); " diff --git a/examples/08_stackoverflow_tables_olap.py b/examples/08_stackoverflow_tables_olap.py index 70b4647..f94a7cd 100644 --- a/examples/08_stackoverflow_tables_olap.py +++ b/examples/08_stackoverflow_tables_olap.py @@ -31,13 +31,17 @@ sys.exit(1) +# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), +# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). +UV_VERSION = "0.12.0" + + def uv_bootstrap_commands(python_cmd: str) -> List[str]: return [ ( f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; ' "arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; " - "req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); " - "version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); " + f"version='{UV_VERSION}'; " "archive=pathlib.Path('/tmp/uv.tar.gz'); " "archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); " "target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); " diff --git a/examples/09_stackoverflow_graph_oltp.py b/examples/09_stackoverflow_graph_oltp.py index 8e9e308..e83b17d 100644 --- a/examples/09_stackoverflow_graph_oltp.py +++ b/examples/09_stackoverflow_graph_oltp.py @@ -37,13 +37,17 @@ sys.exit(1) +# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), +# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). +UV_VERSION = "0.12.0" + + def uv_bootstrap_commands(python_cmd: str) -> List[str]: return [ ( f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; ' "arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; " - "req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); " - "version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); " + f"version='{UV_VERSION}'; " "archive=pathlib.Path('/tmp/uv.tar.gz'); " "archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); " "target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); " diff --git a/examples/10_stackoverflow_graph_olap.py b/examples/10_stackoverflow_graph_olap.py index 63204ee..e05c457 100644 --- a/examples/10_stackoverflow_graph_olap.py +++ b/examples/10_stackoverflow_graph_olap.py @@ -33,13 +33,17 @@ sys.exit(1) +# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), +# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). +UV_VERSION = "0.12.0" + + def uv_bootstrap_commands(python_cmd: str) -> List[str]: return [ ( f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; ' "arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; " - "req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); " - "version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); " + f"version='{UV_VERSION}'; " "archive=pathlib.Path('/tmp/uv.tar.gz'); " "archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); " "target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); " diff --git a/examples/11_vector_index_build.py b/examples/11_vector_index_build.py index 571a169..728b35f 100644 --- a/examples/11_vector_index_build.py +++ b/examples/11_vector_index_build.py @@ -156,13 +156,17 @@ def resolve_milvus_compose_version(release_tag: str) -> str: return resolved +# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), +# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). +UV_VERSION = "0.12.0" + + def uv_bootstrap_commands(python_cmd: str = "python") -> List[str]: return [ ( f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; ' "arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; " - "req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); " - "version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); " + f"version='{UV_VERSION}'; " "archive=pathlib.Path('/tmp/uv.tar.gz'); " "archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); " "target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); " diff --git a/examples/12_vector_search.py b/examples/12_vector_search.py index a31aa01..6ade018 100644 --- a/examples/12_vector_search.py +++ b/examples/12_vector_search.py @@ -161,13 +161,17 @@ def resolve_milvus_compose_version(release_tag: str) -> str: return resolved +# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION), +# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use). +UV_VERSION = "0.12.0" + + def uv_bootstrap_commands(python_cmd: str = "python") -> List[str]: return [ ( f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; ' "arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; " - "req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); " - "version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); " + f"version='{UV_VERSION}'; " "archive=pathlib.Path('/tmp/uv.tar.gz'); " "archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); " "target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); "