* fix(cli-install): move kbcstorage to [server] extra so wheel installs cleanly
The 0.53.3 wheel served at /cli/wheel/ is unsatisfiable on a clean machine:
analyst runs `uv tool install <wheel-url>` per the published /setup
instructions and the resolver immediately fails with
Because kbcstorage<=0.9.5 depends on urllib3<2.0.0 and
agnes-the-ai-analyst==0.53.3 depends on kbcstorage>=0.9.0 and
urllib3>=2.7.0, we can conclude that agnes-the-ai-analyst==0.53.3
cannot be used.
The `[tool.uv] override-dependencies = ["urllib3>=2.7.0"]` in pyproject.toml
masked the conflict in workspace contexts (Dockerfile + dev install) but
does NOT propagate to the wheel — wheel METADATA is plain PEP 621
Requires-Dist, and a fresh resolver context (uv tool install <wheel-url>)
never sees the override. Every existing test passed because the dev venv
already has kbcstorage 0.9.5 + urllib3 2.7.0 coexisting under workspace
overrides; the break only surfaces on the next analyst's first install.
Fix: kbcstorage moved out of [project] dependencies into
[project.optional-dependencies].server, since it is server-side only
(connectors/keboola/client.py is the sole import site, called from admin
endpoints, server connectors, and integration tests — never from the CLI
install path). Server install picks it up via Dockerfile's
`uv pip install --system --no-cache ".[server]"`. CI installs `.[dev,server]`
so workspace tests still cover the kbcstorage path. Analyst CLI wheel
METADATA now lists `kbcstorage>=0.9.0; extra == 'server'` (gated) and
`uv tool install <wheel>` resolves cleanly.
Verified end-to-end:
- Built wheel locally; inspected METADATA — kbcstorage line is now `; extra == 'server'`.
- `docker run --rm python:3.13-slim` + `uv tool install <wheel>`: agnes 0.53.4 installs, `agnes --version` works, `agnes catalog --help` renders, kbcstorage absent from CLI venv, urllib3 = 2.7.0.
- Same container with `.[server]` install path: kbcstorage present, urllib3 = 2.7.0 (override applies in workspace context).
- Full pytest suite green locally (4157 passed, 25 skipped).
* release: 0.53.4 — analyst CLI install hotfix (urllib3/kbcstorage resolver conflict)
Patch bump shipping the [server] extra split + new clean-install CI lane.
No DB migration; no API change; no operator-facing config change.
Operator side (Dockerfile path) auto-picks `.[server]` so the production
image gains kbcstorage transparently. Analyst onboarding (uv tool install
<wheel>) starts working again.
119 lines
3.7 KiB
YAML
119 lines
3.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "feature/**"]
|
|
pull_request:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "0 3 * * *" # Nightly at 03:00 UTC — runs docker-e2e
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
|
|
- name: Install dependencies
|
|
run: uv pip install --system ".[dev,server]"
|
|
|
|
- name: Run tests (parallel)
|
|
run: pytest tests/ -v --tb=short -n auto
|
|
env:
|
|
TESTING: "1"
|
|
|
|
cli-wheel-clean-install:
|
|
# Catches the "wheel METADATA conflicts with transitive deps under fresh
|
|
# resolver" class — exactly what the workspace-only `[tool.uv]
|
|
# override-dependencies` does NOT protect against. Builds the wheel the
|
|
# way `release.yml` ships it to analysts (`uv build --wheel`), then
|
|
# installs it into a fresh `python:3.13-slim` container with `uv tool
|
|
# install` (the path the `/setup` page advertises) and asserts the
|
|
# `agnes` binary actually launches. Without this, a regression like
|
|
# 0.53.3's `kbcstorage>=0.9.0 → urllib3<2.0.0` cap silently caps the
|
|
# wheel METADATA, every existing test passes (workspace overrides the
|
|
# cap), and the break only surfaces on the next analyst's first install.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
|
|
- name: Build wheel
|
|
run: uv build --wheel --out-dir dist
|
|
|
|
- name: Smoke install in fresh python:3.13-slim
|
|
run: |
|
|
docker run --rm -v "$PWD/dist:/wheels:ro" python:3.13-slim bash -c '
|
|
set -euo pipefail
|
|
apt-get update -qq && apt-get install -y -qq --no-install-recommends curl ca-certificates >/dev/null
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh > /dev/null 2>&1
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
WHEEL=$(ls /wheels/agnes_the_ai_analyst-*-py3-none-any.whl | head -1)
|
|
uv tool install --force "$WHEEL"
|
|
agnes --version
|
|
agnes --help > /dev/null
|
|
agnes catalog --help > /dev/null
|
|
python3 -c "
|
|
try:
|
|
import kbcstorage
|
|
raise SystemExit(\"REGRESSION: kbcstorage leaked into the CLI wheel — should be in [server] extra only\")
|
|
except ImportError:
|
|
pass
|
|
import urllib3
|
|
assert tuple(int(x) for x in urllib3.__version__.split(\".\")[:2]) >= (2, 7), urllib3.__version__
|
|
print(\"OK: kbcstorage absent, urllib3\", urllib3.__version__)
|
|
"
|
|
'
|
|
|
|
docker-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Build Docker image
|
|
run: docker build -t data-analyst:test .
|
|
|
|
docker-e2e:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
needs: docker-build
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
|
|
- name: Install dependencies
|
|
run: uv pip install --system ".[dev,server]"
|
|
|
|
- name: Start services
|
|
run: |
|
|
touch .env
|
|
docker compose up -d --wait --wait-timeout 60
|
|
|
|
- name: Run Docker E2E tests
|
|
run: pytest tests/ -v --tb=short -m docker --timeout=120
|
|
env:
|
|
TESTING: "1"
|
|
|
|
- name: Stop services
|
|
if: always()
|
|
run: docker compose down
|