mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-16 00:00:58 -04:00
fix(ci): parse current vllm-metal version pins (#11457)
* fix(ci): parse current vllm-metal version pins vllm-metal renamed its installer pin from vllm_v to VLLM_VERSION, breaking both the nightly bumper and the Darwin backend installer after a bump. Share a strict parser that accepts both formats and cover the transition with shell regressions. Assisted-by: Codex:gpt-5 [Codex] * fix(ci): parse scoped vllm-metal pins The pinned vllm-metal installer declares its version as a local shell variable. Accept that optional declaration while retaining strict validation of the assignment and semantic version. Assisted-by: Codex:gpt-5.4 --------- Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
This commit is contained in:
1 parent
f3ea275c05
commit
16dd81ecd2
4 files changed
+42
-5
No files matched your search
@@ -3,7 +3,7 @@
|
||||
# darwin (Apple Silicon) install path. The macOS/Metal build
|
||||
# (backend/python/vllm/install.sh, Darwin branch) installs vllm-metal, which is
|
||||
# version-locked to a specific vLLM source release. install.sh derives that vLLM
|
||||
# version at build time from vllm-metal's own installer (`vllm_v=`) at the pinned
|
||||
# version at build time from vllm-metal's own installer at the pinned
|
||||
# tag, so there is only ONE value to bump here -- mirroring bump_vllm_wheel.sh,
|
||||
# which bumps the Linux cu130 wheel pin.
|
||||
#
|
||||
@@ -32,10 +32,10 @@ LATEST_TAG=$(gh_curl -H "Accept: application/vnd.github+json" \
|
||||
# The coupled vLLM source version lives in vllm-metal's installer at that tag.
|
||||
NEW_VLLM_VERSION=$(gh_curl \
|
||||
"https://raw.githubusercontent.com/$REPO/$LATEST_TAG/install.sh" \
|
||||
| grep -oE 'vllm_v="[0-9]+\.[0-9]+\.[0-9]+"' | head -1 | cut -d'"' -f2)
|
||||
| "$(dirname "${BASH_SOURCE[0]}")/../scripts/lib/extract-vllm-metal-version.sh")
|
||||
|
||||
if [ -z "$LATEST_TAG" ] || [ -z "$NEW_VLLM_VERSION" ]; then
|
||||
echo "Could not resolve vllm-metal tag ($LATEST_TAG) or its vllm_v ($NEW_VLLM_VERSION)." >&2
|
||||
echo "Could not resolve vllm-metal tag ($LATEST_TAG) or its vLLM version ($NEW_VLLM_VERSION)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -122,11 +122,11 @@ if [ "$(uname -s)" = "Darwin" ]; then
|
||||
VLLM_METAL_VERSION="v0.3.0.dev20260726174827"
|
||||
|
||||
# The coupled vLLM source version is whatever this vllm-metal release builds
|
||||
# against -- it declares it in its own installer as `vllm_v=`. Derive it from
|
||||
# against. Derive it from
|
||||
# the PINNED tag rather than hardcoding a second value that could drift. The
|
||||
# tag is immutable, so this stays reproducible across rebuilds.
|
||||
VLLM_VERSION=$(curl -fsSL "https://raw.githubusercontent.com/vllm-project/vllm-metal/${VLLM_METAL_VERSION}/install.sh" \
|
||||
| grep -oE 'vllm_v="[0-9]+\.[0-9]+\.[0-9]+"' | head -n1 | cut -d'"' -f2)
|
||||
| "$backend_dir/../../../scripts/lib/extract-vllm-metal-version.sh")
|
||||
if [ -z "${VLLM_VERSION}" ]; then
|
||||
echo "ERROR: could not derive the vLLM version from vllm-metal ${VLLM_METAL_VERSION}" >&2
|
||||
exit 1
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
extractor="$repo_root/scripts/lib/extract-vllm-metal-version.sh"
|
||||
|
||||
assert_version() {
|
||||
local expected=$1
|
||||
local input=$2
|
||||
local actual
|
||||
|
||||
actual=$(printf '%s\n' "$input" | "$extractor")
|
||||
if [ "$actual" != "$expected" ]; then
|
||||
echo "expected version $expected, got $actual" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_version "0.23.0" 'vllm_v="0.23.0"'
|
||||
assert_version "0.26.0" ' local vllm_v="0.26.0"'
|
||||
assert_version "0.26.0" 'VLLM_VERSION="0.26.0"'
|
||||
assert_version "0.26.1" ' VLLM_VERSION = "0.26.1" # comment'
|
||||
|
||||
if printf '%s\n' 'VLLM_VERSION="not-a-version"' | "$extractor"; then
|
||||
echo "malformed versions must be rejected" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if printf '%s\n' 'VLLM_VERSION="0.26.0"garbage' | "$extractor"; then
|
||||
echo "trailing assignment content must be rejected" >&2
|
||||
exit 1
|
||||
fi
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
grep -m1 -oE '^[[:space:]]*(local[[:space:]]+)?(vllm_v|VLLM_VERSION)[[:space:]]*=[[:space:]]*"[0-9]+\.[0-9]+\.[0-9]+"[[:space:]]*(#.*)?$' \
|
||||
| grep -oE '[0-9]+\.[0-9]+\.[0-9]+'
|
||||
Reference in new issue
Block a user