Skip to content

Commit 363c140

Browse files
committed
Complete scoped regression smoke checks
1 parent 7634244 commit 363c140

8 files changed

Lines changed: 219 additions & 34 deletions

File tree

.github/actions/run-missing-package-smoke/action.yml

Lines changed: 140 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,144 @@ runs:
182182
test6_duration=0
183183
}
184184
185+
pypi_latest_version() {
186+
local package="$1"
187+
python3 - "$package" <<'PY'
188+
import json
189+
import sys
190+
import urllib.request
191+
192+
package = sys.argv[1]
193+
with urllib.request.urlopen(f"https://pypi.org/pypi/{package}/json", timeout=30) as response:
194+
data = json.load(response)
195+
print(data["info"]["version"])
196+
PY
197+
}
198+
199+
run_fastai_regression() {
200+
local current="${1:-unknown}"
201+
local start latest work_next
202+
start=$(date +%s)
203+
regression_current_version="$current"
204+
latest="$(pypi_latest_version fastai 2>/tmp/fastai-pypi-latest-error.log || true)"
205+
regression_latest_version="${latest:-unknown}"
206+
if [ -z "$latest" ]; then
207+
regression_decision="next_lookup_failed"
208+
regression_next_installed_version="not_installed"
209+
regression_result="Next FastAI version lookup failed on Arm64"
210+
regression_details="Baseline FastAI ${current} passed Tests 1-5, but PyPI latest-version lookup failed, so Test 6 could not honestly select a next candidate."
211+
set_test 6 failed "$start"
212+
return
213+
fi
214+
if [ "$latest" = "$current" ]; then
215+
regression_decision="current_is_latest_stable"
216+
regression_next_installed_version="not_applicable"
217+
regression_result="Current FastAI version is already latest stable"
218+
regression_details="Baseline FastAI ${current} passed Tests 1-5, and PyPI reports the same version as latest stable. There is no newer stable FastAI candidate for Test 6."
219+
set_test 6 skipped "$start"
220+
return
221+
fi
222+
if ! apt_bootstrap podman; then
223+
regression_decision="next_install_failed"
224+
regression_next_installed_version="not_installed"
225+
regression_result="Podman CLI dependency failed to install on Arm64"
226+
regression_details="Baseline Podman Compose ${current} passed Tests 1-5, but Test 6 could not install the Podman CLI dependency required to validate PyPI latest ${latest} on the Arm64 runner."
227+
set_test 6 failed "$start"
228+
return
229+
fi
230+
work_next=$(mktemp -d)
231+
if python3 -m venv "$work_next/venv" && \
232+
"$work_next/venv/bin/python" -m pip install --upgrade pip >/dev/null && \
233+
"$work_next/venv/bin/python" -m pip install "fastai==${latest}" ipython >/tmp/fastai-next-install.log 2>&1 && \
234+
"$work_next/venv/bin/python" - <<'PY'
235+
import fastai
236+
import fastai.torch_core
237+
import platform
238+
import torch
239+
from fastai.torch_core import tensor
240+
241+
assert platform.machine() in ("aarch64", "arm64")
242+
assert fastai.__version__
243+
value = tensor([1, 2, 3])
244+
assert torch.equal(value + 1, torch.tensor([2, 3, 4]))
245+
PY
246+
then
247+
regression_decision="next_install_validated"
248+
regression_next_installed_version="$latest"
249+
regression_result="Next FastAI version installed and passed bounded Arm64 tensor smoke"
250+
regression_details="Baseline FastAI ${current} passed Tests 1-5, and PyPI latest ${latest} installed on the Arm64 runner, imported FastAI/Torch, verified the Arm64 Python runtime, and ran the same bounded tensor smoke."
251+
set_test 6 passed "$start"
252+
else
253+
cat /tmp/fastai-next-install.log 2>/dev/null || true
254+
regression_decision="next_install_failed"
255+
regression_next_installed_version="not_installed"
256+
regression_result="Next FastAI version failed bounded Arm64 validation"
257+
regression_details="Baseline FastAI ${current} passed Tests 1-5, but PyPI latest ${latest} did not complete the same bounded install/import/tensor smoke on the Arm64 runner."
258+
set_test 6 failed "$start"
259+
fi
260+
}
261+
262+
run_podman_compose_regression() {
263+
local current="${1:-unknown}"
264+
local start latest work_next
265+
start=$(date +%s)
266+
regression_current_version="$current"
267+
latest="$(pypi_latest_version podman-compose 2>/tmp/podman-compose-pypi-latest-error.log || true)"
268+
regression_latest_version="${latest:-unknown}"
269+
if [ -z "$latest" ]; then
270+
regression_decision="next_lookup_failed"
271+
regression_next_installed_version="not_installed"
272+
regression_result="Next Podman Compose version lookup failed on Arm64"
273+
regression_details="Baseline Podman Compose ${current} passed Tests 1-5, but PyPI latest-version lookup failed, so Test 6 could not honestly select a next candidate."
274+
set_test 6 failed "$start"
275+
return
276+
fi
277+
if [ "$latest" = "$current" ]; then
278+
regression_decision="current_is_latest_stable"
279+
regression_next_installed_version="not_applicable"
280+
regression_result="Current Podman Compose version is already latest stable"
281+
regression_details="Baseline Podman Compose ${current} passed Tests 1-5, and PyPI reports the same version as latest stable. There is no newer stable Podman Compose candidate for Test 6."
282+
set_test 6 skipped "$start"
283+
return
284+
fi
285+
work_next=$(mktemp -d)
286+
if python3 -m venv "$work_next/venv" && \
287+
"$work_next/venv/bin/python" -m pip install --upgrade pip >/dev/null && \
288+
"$work_next/venv/bin/python" -m pip install "podman-compose==${latest}" >/tmp/podman-compose-next-install.log 2>&1; then
289+
cat > "$work_next/compose.yml" <<'EOF'
290+
services:
291+
smoke:
292+
image: quay.io/podman/hello
293+
command: ["echo", "arm64"]
294+
EOF
295+
if "$work_next/venv/bin/podman-compose" --version | grep -q "$latest" && \
296+
"$work_next/venv/bin/podman-compose" --help | grep -qiE 'usage|podman-compose' && \
297+
"$work_next/venv/bin/python" -m pip check && \
298+
[ "$(uname -m)" = "aarch64" ] && \
299+
"$work_next/venv/bin/podman-compose" --dry-run -f "$work_next/compose.yml" config >/tmp/podman-compose-next-config.log 2>&1 && \
300+
grep -qi 'smoke' /tmp/podman-compose-next-config.log; then
301+
regression_decision="next_install_validated"
302+
regression_next_installed_version="$latest"
303+
regression_result="Next Podman Compose version installed and passed bounded Arm64 dry-run validation"
304+
regression_details="Baseline Podman Compose ${current} passed Tests 1-5, and PyPI latest ${latest} installed on the Arm64 runner with the Podman CLI dependency, reported the expected version/help output, passed dependency checks, and rendered the same dry-run Compose config."
305+
set_test 6 passed "$start"
306+
else
307+
regression_decision="next_install_failed"
308+
regression_next_installed_version="not_installed"
309+
regression_result="Next Podman Compose version failed bounded Arm64 validation"
310+
regression_details="Baseline Podman Compose ${current} passed Tests 1-5, but PyPI latest ${latest} did not complete the same version/help/dependency/dry-run config validation on the Arm64 runner."
311+
set_test 6 failed "$start"
312+
fi
313+
else
314+
cat /tmp/podman-compose-next-install.log 2>/dev/null || true
315+
regression_decision="next_install_failed"
316+
regression_next_installed_version="not_installed"
317+
regression_result="Next Podman Compose version failed to install on Arm64"
318+
regression_details="Baseline Podman Compose ${current} passed Tests 1-5, but PyPI latest ${latest} did not install on the Arm64 runner."
319+
set_test 6 failed "$start"
320+
fi
321+
}
322+
185323
write_outputs() {
186324
{
187325
echo "version=${version}"
@@ -398,7 +536,7 @@ runs:
398536
assert torch.equal(value + 1, torch.tensor([2, 3, 4]))
399537
PY
400538
fi
401-
finish_package_manager_test6 "$version"
539+
run_fastai_regression "$version"
402540
;;
403541
404542
podman-compose)
@@ -428,7 +566,7 @@ runs:
428566
EOF
429567
start=$(date +%s); "$work/venv/bin/podman-compose" --dry-run -f "$work/compose.yml" config >/tmp/podman-compose-config.log 2>&1 && grep -qi 'smoke' /tmp/podman-compose-config.log && set_test 5 passed "$start" || set_test 5 failed "$start"
430568
fi
431-
finish_package_manager_test6 "$version"
569+
run_podman_compose_regression "$version"
432570
;;
433571
434572
luigi-source)

.github/workflows/test-amazon-vpc-cni-k8s.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ jobs:
600600
lane_kind: ${{ env.LANE_KIND }}
601601
limited_cpu_probe: |
602602
cd next-src
603-
go list ./... >/tmp/amazon-vpc-cni-next-go-packages.txt
603+
GOFLAGS=-mod=mod go list ./... >/tmp/amazon-vpc-cni-next-go-packages.txt
604604
BUILT=0
605605
while IFS= read -r main_file; do
606606
target="$(dirname "$main_file")"
@@ -618,7 +618,7 @@ jobs:
618618
assert any(marker in text for marker in ("DaemonSet", "amazon-k8s-cni", "aws-node", "CNI")), "missing CNI/Kubernetes markers"
619619
PY
620620
limited_cpu_description: "Test 6 reran the scoped Amazon VPC CNI Arm preflight against the next stable source tag: Go package discovery, linux/arm64 command builds, AArch64 binary checks, and Kubernetes/CNI manifest validation. Full pod networking still requires Kubernetes plus AWS VPC/ENI infrastructure."
621-
defer_on_limited_cpu_probe_failure: "true"
621+
defer_on_limited_cpu_probe_failure: "false"
622622
- name: Calculate test summary
623623
id: summary
624624
if: always()

.github/workflows/test-ampere-optimized-llama.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,20 +371,28 @@ jobs:
371371
lane_kind: ${{ env.LANE_KIND }}
372372
limited_cpu_probe: |
373373
sudo apt-get update -qq
374-
sudo apt-get install -y --no-install-recommends build-essential cmake >/dev/null
375-
cd next-src
376-
SOURCE_DIR="$(dirname "$(find . -maxdepth 4 -name CMakeLists.txt -print -quit)")"
377-
[ -n "$SOURCE_DIR" ] && [ "$SOURCE_DIR" != "." ] || SOURCE_DIR="."
378-
test -f "$SOURCE_DIR/CMakeLists.txt"
379-
cmake -S "$SOURCE_DIR" -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF
380-
cmake --build build --target llama-cli -j2 || cmake --build build --target main -j2 || cmake --build build -j2
381-
BIN=$(find build -type f \( -name llama-cli -o -name main -o -name llama-simple \) -perm -111 | head -n 1)
374+
sudo apt-get install -y --no-install-recommends curl file jq tar >/dev/null
375+
WORK_DIR="$(mktemp -d)"
376+
RELEASE_JSON="$WORK_DIR/release.json"
377+
curl -fsSL "https://api.github.com/repos/${GITHUB_REPO}/releases/tags/${CANDIDATE_TAG}" -o "$RELEASE_JSON"
378+
ASSET_URL="$(jq -r '.assets[] | select(.name | test("^llama_aio_.*\\.tar\\.gz$"; "i")) | .browser_download_url' "$RELEASE_JSON" | head -n 1)"
379+
[ -n "$ASSET_URL" ] && [ "$ASSET_URL" != "null" ]
380+
curl -fsSL "$ASSET_URL" -o "$WORK_DIR/llama-aio.tar.gz"
381+
tar -xzf "$WORK_DIR/llama-aio.tar.gz" -C "$WORK_DIR"
382+
BIN="$(find "$WORK_DIR" -type f \( -name llama-cli -o -name main \) -perm -111 | head -n 1)"
382383
[ -n "$BIN" ]
383384
file "$BIN" | grep -Eiq 'aarch64|arm64'
385+
export LD_LIBRARY_PATH="$(dirname "$BIN"):${LD_LIBRARY_PATH:-}"
384386
"$BIN" --help >/tmp/llama-next-help.txt 2>&1 || "$BIN" -h >/tmp/llama-next-help.txt 2>&1
385387
grep -Eiq 'usage|llama|model|prompt' /tmp/llama-next-help.txt
386-
limited_cpu_description: "Test 6 attempts the same scoped Ampere llama.cpp Arm CLI build against the next stable source candidate when that candidate contains buildable llama.cpp CMake sources. No GGUF model inference is claimed without weights."
387-
defer_on_limited_cpu_probe_failure: "true"
388+
SERVER_BIN="$(find "$WORK_DIR" -type f -name llama-server -perm -111 | head -n 1 || true)"
389+
if [ -n "$SERVER_BIN" ]; then
390+
file "$SERVER_BIN" | grep -Eiq 'aarch64|arm64'
391+
"$SERVER_BIN" --help >/tmp/llama-server-next-help.txt 2>&1 || "$SERVER_BIN" -h >/tmp/llama-server-next-help.txt 2>&1
392+
grep -Eiq 'usage|server|model|host|port' /tmp/llama-server-next-help.txt
393+
fi
394+
limited_cpu_description: "Test 6 reran a scoped Ampere llama.cpp Arm64 release-artifact preflight against the next stable release: downloaded the official AIO tarball, verified the included llama binaries are AArch64, and ran CLI/server help on the Arm64 runner. No source build, GGUF model inference, model quality, or performance claim is made."
395+
defer_on_limited_cpu_probe_failure: "false"
388396
- name: Calculate test summary
389397
id: summary
390398
if: always()

.github/workflows/test-fastai.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
regression_current_version: ${{ steps.smoke.outputs.regression_current_version || steps.smoke.outputs.version || 'unknown' }}
5454
regression_latest_version: ${{ steps.smoke.outputs.regression_latest_version || 'unknown' }}
5555
regression_next_installed_version: ${{ steps.smoke.outputs.regression_next_installed_version || 'not_installed' }}
56-
regression_policy: package_manager_installed
56+
regression_policy: applicable
5757
run_id: ${{ github.run_id }}
5858
run_attempt: ${{ github.run_attempt }}
5959
job_name: ${{ github.job }}

.github/workflows/test-flyte.yml

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,20 @@ jobs:
334334
. /tmp/flytekit-smoke/bin/activate
335335
python -m pip install --upgrade pip
336336
python -m pip install flytekit
337-
python -c "from flytekit import task, workflow; exec('@task\\ndef add_one(value: int) -> int:\\n return value + 1\\n\\n@workflow\\ndef wf(value: int) -> int:\\n return add_one(value=value)\\n'); assert wf(value=41) == 42"
337+
{
338+
printf '%s\n' 'from flytekit import task, workflow'
339+
printf '%s\n' ''
340+
printf '%s\n' '@task'
341+
printf '%s\n' 'def add_one(value: int) -> int:'
342+
printf '%s\n' ' return value + 1'
343+
printf '%s\n' ''
344+
printf '%s\n' '@workflow'
345+
printf '%s\n' 'def wf(value: int) -> int:'
346+
printf '%s\n' ' return add_one(value=value)'
347+
printf '%s\n' ''
348+
printf '%s\n' 'assert wf(value=41) == 42'
349+
} >/tmp/flytekit-smoke.py
350+
python /tmp/flytekit-smoke.py
338351
echo "status=passed" >> "$GITHUB_OUTPUT"
339352
echo "note=Compiled Flyte Go packages for linux/arm64, rendered or validated Flyte Kubernetes manifests, and executed a tiny local flytekit workflow. Kubernetes control-plane deployment remains out of scope." >> "$GITHUB_OUTPUT"
340353
END_TIME=$(date +%s)
@@ -434,10 +447,12 @@ jobs:
434447
tar -xzf /tmp/helm.tgz -C /tmp
435448
export PATH="/tmp/linux-arm64:$PATH"
436449
fi
437-
helm dependency build "$(dirname "$CHART")" >/tmp/flyte-next-helm-deps.txt 2>&1 || true
438-
if ! helm template flyte-next-smoke "$(dirname "$CHART")" >/tmp/flyte-next-rendered.yaml 2>/tmp/flyte-next-helm-render-error.txt; then
439-
find "$(dirname "$CHART")" -type f \( -name '*.yaml' -o -name '*.yml' -o -name '*.tpl' \) -print0 | xargs -0r cat > /tmp/flyte-next-rendered.yaml
440-
fi
450+
helm repo add flyte-docker-registry https://twuni.github.io/docker-registry.helm >/tmp/flyte-next-helm-repo-docker-registry.txt 2>&1 || true
451+
helm repo add flyte-knative-serving https://deeploy-knative-serving-charts.storage.googleapis.com/ >/tmp/flyte-next-helm-repo-knative-serving.txt 2>&1 || true
452+
helm repo add flyte-rustfs https://rustfs.github.io/helm >/tmp/flyte-next-helm-repo-rustfs.txt 2>&1 || true
453+
helm repo update >/tmp/flyte-next-helm-repo-update.txt 2>&1
454+
helm dependency build "$(dirname "$CHART")" >/tmp/flyte-next-helm-deps.txt 2>&1
455+
helm template flyte-next-smoke "$(dirname "$CHART")" >/tmp/flyte-next-rendered.yaml
441456
grep -Eq 'kind:[[:space:]]*(Deployment|Service|ConfigMap|CustomResourceDefinition|ServiceAccount)' /tmp/flyte-next-rendered.yaml
442457
else
443458
find . -type f \( -name '*.yaml' -o -name '*.yml' \) -print0 | xargs -0 grep -Eiq 'flyte|flyteadmin|flytepropeller|CustomResourceDefinition'
@@ -446,9 +461,22 @@ jobs:
446461
. /tmp/flytekit-next-smoke/bin/activate
447462
python -m pip install --upgrade pip
448463
python -m pip install flytekit
449-
python -c "from flytekit import task, workflow; exec('@task\ndef add_one(value: int) -> int:\n return value + 1\n\n@workflow\ndef wf(value: int) -> int:\n return add_one(value=value)\n'); assert wf(value=41) == 42"
450-
limited_cpu_description: "Test 6 reran the scoped Flyte Arm preflight against the next stable source tag: Go package discovery, linux/arm64 compile smoke, and chart/manifest validation. A live Flyte control plane and Kubernetes execution backend remain out of scope."
451-
defer_on_limited_cpu_probe_failure: "true"
464+
{
465+
printf '%s\n' 'from flytekit import task, workflow'
466+
printf '%s\n' ''
467+
printf '%s\n' '@task'
468+
printf '%s\n' 'def add_one(value: int) -> int:'
469+
printf '%s\n' ' return value + 1'
470+
printf '%s\n' ''
471+
printf '%s\n' '@workflow'
472+
printf '%s\n' 'def wf(value: int) -> int:'
473+
printf '%s\n' ' return add_one(value=value)'
474+
printf '%s\n' ''
475+
printf '%s\n' 'assert wf(value=41) == 42'
476+
} >/tmp/flytekit-next-smoke.py
477+
python /tmp/flytekit-next-smoke.py
478+
limited_cpu_description: "Test 6 reran the scoped Flyte Arm preflight against the next stable source tag: Go package discovery, linux/arm64 compile smoke, chart/manifest validation, and a tiny local Flytekit workflow. A live Flyte control plane and Kubernetes execution backend remain out of scope."
479+
defer_on_limited_cpu_probe_failure: "false"
452480
- name: Calculate test summary
453481
id: summary
454482
if: always()

0 commit comments

Comments
 (0)