Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/build-openviking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ jobs:
cp third_party/spdlog-1.14.1/LICENSE LICENSE.spdlog
cp third_party/croaring/LICENSE LICENSE.croaring
cp third_party/rapidjson/LICENSE LICENSE.rapidjson
# From 0.4.18 ragfs's cache feature pulls fred with vendored-openssl, so
# openssl-src links OpenSSL statically into the ragfs extension.
openssl=$(grep -A1 '^name = "openssl-src"$' Cargo.lock | sed -nE 's/^version = "[0-9.]+\+([0-9.]+)"$/\1/p' || true)
if [ -n "${openssl}" ]; then
curl -fsSL -o LICENSE.openssl "https://raw.githubusercontent.com/openssl/openssl/openssl-${openssl}/LICENSE.txt"
echo "OV_EXTRA_LICENCES=LICENSE.openssl" >> "${GITHUB_ENV}"
fi

- name: Write smoke test
run: |
Expand Down Expand Up @@ -186,10 +193,21 @@ jobs:
CIBW_ARCHS: riscv64
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
CIBW_SKIP: "*-musllinux_*"
# openssl-src (0.4.18+) runs OpenSSL's Configure, which needs perl modules the
# image's minimal perl-interpreter lacks (gotcha 46).
CIBW_BEFORE_ALL_LINUX: >-
dnf -y --disablerepo=extras install perl &&
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
# Fat LTO of ragfs-python (workspace [profile.release] lto = true) intermittently
# corrupts rustc's heap on the riscv64 runners from 0.4.17.1 on: "double free or
# corruption" / "free(): corrupted unsorted chunks" SIGABRTs, or a hang until the
# job timeout. Thin LTO avoids the single huge LTO module, but concurrent rustc
# codegen threads can still exhaust these runners' memory the same way (gotcha
# 228), so also cap cargo's own parallelism.
CIBW_ENVIRONMENT: >-
PATH="$PATH:$HOME/.cargo/bin"
CARGO_PROFILE_RELEASE_LTO=thin
CARGO_BUILD_JOBS=2
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
OV_REQUIRE_RAGFS_BUILD=1
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENVIKING=${{ env.OPENVIKING_VERSION }}
Expand All @@ -201,7 +219,7 @@ jobs:
CIBW_TEST_SOURCES: tests pyproject.toml smoke_test.py
CIBW_TEST_COMMAND: >-
python smoke_test.py &&
python -c "import importlib.metadata as m; l = set(p.name for p in m.files('openviking') if '.dist-info/licenses/' in str(p)); assert set(['LICENSE', 'LICENSE.leveldb', 'LICENSE.spdlog', 'LICENSE.croaring', 'LICENSE.rapidjson']) <= l, l" &&
python -c "import importlib.metadata as m; l = set(p.name for p in m.files('openviking') if '.dist-info/licenses/' in str(p)); assert set(['LICENSE', 'LICENSE.leveldb', 'LICENSE.spdlog', 'LICENSE.croaring', 'LICENSE.rapidjson'] + '${{ env.OV_EXTRA_LICENCES }}'.split()) <= l, l" &&
python -m pytest -q -o addopts=''
tests/vectordb/test_cuvs_config.py
tests/vectordb/test_cuvs_index.py
Expand Down
9 changes: 9 additions & 0 deletions docs/packages/openviking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ versions:
- filename: openviking-0.4.16-cp310-abi3-manylinux_2_39_riscv64.whl
sha256: 391ae599f92b7611fe422207f732f80c4315ca0d903cb8f50e5c66fe02c12244
requires-python: '>=3.10'
- version: 0.4.17
- version: 0.4.17.1
- version: 0.4.18
- version: 0.4.19
- version: 0.4.20
- version: 0.4.21
- version: 0.4.22
- version: 0.4.23
- version: 0.5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Fri, 25 Sep 2026 00:00:00 +0000
Subject: [PATCH] build: only require Development.Module from FindPython3

The vector engine is a Python extension module, so it needs the Python
headers but never links libpython. Asking FindPython3 for the umbrella
`Development` component also pulls in `Development.Embed`, which requires
libpython to exist. The manylinux interpreters used to build wheels ship
no libpython at all, so configuring fails on every manylinux image before
anything is compiled:

Could NOT find Python3 (missing: Python3_LIBRARIES Development
Development.Embed)

Upstream's own Linux wheels build against a CPython compiled with
--enable-shared, which is why their CI does not hit it. Reproduces on
manylinux_2_28_x86_64 as well as manylinux_2_39_riscv64.

Upstream-Status: To upstream [not yet submitted; still present on volcengine/OpenViking main]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1a79b8a4..da2a9495 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,7 +43,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-deprecated-declarations
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread")
set(Python3_ARCH_INCLUDE_DIR "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")

-find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
+find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.26")
find_package(Python3 COMPONENTS Development.SABIModule QUIET)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Fri, 25 Sep 2026 00:00:00 +0000
Subject: [PATCH] build: only require Development.Module from FindPython3

The vector engine is a Python extension module, so it needs the Python
headers but never links libpython. Asking FindPython3 for the umbrella
`Development` component also pulls in `Development.Embed`, which requires
libpython to exist. The manylinux interpreters used to build wheels ship
no libpython at all, so configuring fails on every manylinux image before
anything is compiled:

Could NOT find Python3 (missing: Python3_LIBRARIES Development
Development.Embed)

Upstream's own Linux wheels build against a CPython compiled with
--enable-shared, which is why their CI does not hit it. Reproduces on
manylinux_2_28_x86_64 as well as manylinux_2_39_riscv64.

Upstream-Status: To upstream [not yet submitted; still present on volcengine/OpenViking main]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1a79b8a4..da2a9495 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,7 +43,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-deprecated-declarations
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread")
set(Python3_ARCH_INCLUDE_DIR "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")

-find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
+find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.26")
find_package(Python3 COMPONENTS Development.SABIModule QUIET)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Fri, 25 Sep 2026 00:00:00 +0000
Subject: [PATCH] build: only require Development.Module from FindPython3

The vector engine is a Python extension module, so it needs the Python
headers but never links libpython. Asking FindPython3 for the umbrella
`Development` component also pulls in `Development.Embed`, which requires
libpython to exist. The manylinux interpreters used to build wheels ship
no libpython at all, so configuring fails on every manylinux image before
anything is compiled:

Could NOT find Python3 (missing: Python3_LIBRARIES Development
Development.Embed)

Upstream's own Linux wheels build against a CPython compiled with
--enable-shared, which is why their CI does not hit it. Reproduces on
manylinux_2_28_x86_64 as well as manylinux_2_39_riscv64.

Upstream-Status: To upstream [not yet submitted; still present on volcengine/OpenViking main]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1a79b8a4..da2a9495 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,7 +43,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-deprecated-declarations
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread")
set(Python3_ARCH_INCLUDE_DIR "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")

-find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
+find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.26")
find_package(Python3 COMPONENTS Development.SABIModule QUIET)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Fri, 25 Sep 2026 00:00:00 +0000
Subject: [PATCH] build: only require Development.Module from FindPython3

The vector engine is a Python extension module, so it needs the Python
headers but never links libpython. Asking FindPython3 for the umbrella
`Development` component also pulls in `Development.Embed`, which requires
libpython to exist. The manylinux interpreters used to build wheels ship
no libpython at all, so configuring fails on every manylinux image before
anything is compiled:

Could NOT find Python3 (missing: Python3_LIBRARIES Development
Development.Embed)

Upstream's own Linux wheels build against a CPython compiled with
--enable-shared, which is why their CI does not hit it. Reproduces on
manylinux_2_28_x86_64 as well as manylinux_2_39_riscv64.

Upstream-Status: To upstream [not yet submitted; still present on volcengine/OpenViking main]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1a79b8a4..da2a9495 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,7 +43,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-deprecated-declarations
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread")
set(Python3_ARCH_INCLUDE_DIR "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")

-find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
+find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.26")
find_package(Python3 COMPONENTS Development.SABIModule QUIET)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Fri, 25 Sep 2026 00:00:00 +0000
Subject: [PATCH] build: only require Development.Module from FindPython3

The vector engine is a Python extension module, so it needs the Python
headers but never links libpython. Asking FindPython3 for the umbrella
`Development` component also pulls in `Development.Embed`, which requires
libpython to exist. The manylinux interpreters used to build wheels ship
no libpython at all, so configuring fails on every manylinux image before
anything is compiled:

Could NOT find Python3 (missing: Python3_LIBRARIES Development
Development.Embed)

Upstream's own Linux wheels build against a CPython compiled with
--enable-shared, which is why their CI does not hit it. Reproduces on
manylinux_2_28_x86_64 as well as manylinux_2_39_riscv64.

Upstream-Status: To upstream [not yet submitted; still present on volcengine/OpenViking main]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1a79b8a4..da2a9495 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,7 +43,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-deprecated-declarations
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread")
set(Python3_ARCH_INCLUDE_DIR "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")

-find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
+find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.26")
find_package(Python3 COMPONENTS Development.SABIModule QUIET)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Fri, 25 Sep 2026 00:00:00 +0000
Subject: [PATCH] build: only require Development.Module from FindPython3

The vector engine is a Python extension module, so it needs the Python
headers but never links libpython. Asking FindPython3 for the umbrella
`Development` component also pulls in `Development.Embed`, which requires
libpython to exist. The manylinux interpreters used to build wheels ship
no libpython at all, so configuring fails on every manylinux image before
anything is compiled:

Could NOT find Python3 (missing: Python3_LIBRARIES Development
Development.Embed)

Upstream's own Linux wheels build against a CPython compiled with
--enable-shared, which is why their CI does not hit it. Reproduces on
manylinux_2_28_x86_64 as well as manylinux_2_39_riscv64.

Upstream-Status: To upstream [not yet submitted; still present on volcengine/OpenViking main]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1a79b8a4..da2a9495 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,7 +43,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-deprecated-declarations
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread")
set(Python3_ARCH_INCLUDE_DIR "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/")

-find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
+find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
if(WIN32 AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.26")
find_package(Python3 COMPONENTS Development.SABIModule QUIET)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Mon, 28 Sep 2026 00:00:00 +0000
Subject: [PATCH] pyproject: relax the tree-sitter pin so riscv64 can resolve
it

pyproject.toml pins `tree-sitter==0.25.2`, which never published a
riscv64 wheel -- tree-sitter's own PyPI files only gained a
`manylinux_riscv64` wheel starting with 0.26.0. With
`PIP_ONLY_BINARY=:all:` in the wheel's test environment, installing the
built wheel fails outright:

ERROR: Could not find a version that satisfies the requirement
tree-sitter==0.25.2 (from openviking) (from versions: 0.26.0)
ERROR: No matching distribution found for tree-sitter==0.25.2

Relax the pin to a lower bound so the resolver can pick 0.26.0 instead;
the smoke test and pytest selection this port runs never touch
tree-sitter's Python API directly, so the exact-pin "avoid unvalidated
upstream API and grammar changes" concern the comment names does not
apply to this port's own test coverage.

Upstream-Status: Inappropriate [riscv64-wheel availability is specific to this port; upstream's own CI never resolves against a riscv64 index]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/pyproject.toml b/pyproject.toml
index 0000000..0000000 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -61,7 +61,7 @@ dependencies = [
"litellm>=1.83.7,<1.91.2",
"python-multipart>=0.0.31",
# Pin the parsing stack to avoid unvalidated upstream API and grammar changes.
- "tree-sitter==0.25.2",
+ "tree-sitter>=0.25.2",
"tree-sitter-python==0.25.0",
"tree-sitter-javascript==0.25.0",
"tree-sitter-typescript==0.23.2",
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Sun, 11 Oct 2026 00:00:00 +0000
Subject: [PATCH] pyproject: relax three more tree-sitter grammar pins for
riscv64

Same problem as the tree-sitter pin itself (patch 0002): pyproject.toml
pins tree-sitter-rust==0.24.0, tree-sitter-c-sharp==0.23.1, and
tree-sitter-language-pack==1.13.3 exactly, but this repo has only ever
published riscv64 wheels for tree-sitter-rust 0.24.2, tree-sitter-c-sharp
0.23.5, and tree-sitter-language-pack 1.15.8+ (docs/packages/*.yaml).
With PIP_ONLY_BINARY=:all:, installing the built wheel fails:

ERROR: Could not find a version that satisfies the requirement
tree-sitter-rust==0.24.0 (from openviking) (from versions: 0.24.2)
ERROR: No matching distribution found for tree-sitter-rust==0.24.0

Relax all three to a lower bound for the same reason patch 0002 relaxes
tree-sitter itself: this port's own test coverage never touches these
grammar packages' Python APIs directly, so the exact-pin "avoid
unvalidated upstream API and grammar changes" concern doesn't apply here.

Upstream-Status: Inappropriate [riscv64-wheel availability is specific to this port; upstream's own CI never resolves against a riscv64 index]

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
diff --git a/pyproject.toml b/pyproject.toml
index 0000000..0000000 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -67,9 +67,9 @@ dependencies = [
"tree-sitter-typescript==0.23.2",
"tree-sitter-java==0.23.5",
"tree-sitter-cpp==0.23.4",
- "tree-sitter-rust==0.24.0",
+ "tree-sitter-rust>=0.24.0",
"tree-sitter-go==0.25.0",
- "tree-sitter-c-sharp==0.23.1",
+ "tree-sitter-c-sharp>=0.23.1",
"tree-sitter-php==0.24.1",
"tree-sitter-lua==0.5.0",
# OpenTelemetry
@@ -85,7 +85,7 @@ dependencies = [
"mcp>=1.27,<2",
"pathspec>=1.1.1",
"grep-ast==0.9.0",
- "tree-sitter-language-pack==1.13.3",
+ "tree-sitter-language-pack>=1.13.3",
]


Loading
Loading