ci: speed up secret CI from 65 min to ~20 min#292
Merged
Conversation
051caa8 to
e4f6797
Compare
…ROAD-Project#286) fix: patch Python CVEs in all pyproject.toml and uv.lock files Fixes the following CVEs by bumping minimum version constraints: - aiohttp: 3.13.4 -> 3.14.0 (CVE-2026-34993, CVE-2026-47265) - pyarrow: 19/20/21.x -> 23.0.1+ (PYSEC-2026-113) - pygments: 2.19.2 -> 2.20.0 (CVE-2026-4539) - PyJWT: 2.12.1 -> 2.13.0 (PYSEC-2026-175/177/178/179) - starlette: 0.46/0.50.x -> 1.2.1 (PYSEC-2026-161, CVE-2025-54121, CVE-2025-62727) - fastapi: 0.115.14 -> 0.136.3 (frontend, to pull in starlette 1.x) aiohttp and pyarrow are added as explicit constraints to force transitive dependency updates. torch 2.9.0 (PYSEC-2026-139) has no upstream fix available yet. https://claude.ai/code/session_01GeF1r9TL34WDNuRp3ny8iR Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Jack Luar <jluar@precisioninno.com>
…ROAD-Project#287) Add tenacity retry with exponential backoff to FAISSVectorDatabase._add_to_db and process_json to handle transient rate-limit errors from the Google Generative AI / Vertex AI embedding API during backend startup. Promotes tenacity to an explicit direct dependency. Signed-off-by: Jack Luar <jluar@precisioninno.com>
…he-OpenROAD-Project#288) * ci: parallelise jobs, remove HF download, commit source_list fixture - Split monolithic build-backend-docker into lint-backend, lint-frontend, lint-evaluation (parallel), test (needs lint-backend only), and docker-build (needs test + frontend/evaluation lint) - Scope init-dev to each job's module to avoid redundant uv sync calls - Remove huggingface-cli download; commit backend/data/source_list.json as a static test fixture instead - Add --parallel to docker compose build - Add check-ci root Makefile target (ruff+mypy per module, no pre-commit) - Unignore backend/data/source_list.json in .gitignore Signed-off-by: Jack Luar <jluar@precisioninno.com> * ci: run lint jobs on ubuntu-latest to reduce self-hosted contention Lint jobs only need Python + uv — no Docker or local services. Moving them to ubuntu-latest frees self-hosted runners for test and docker-build. Signed-off-by: Jack Luar <jluar@precisioninno.com> --------- Signed-off-by: Jack Luar <jluar@precisioninno.com>
- Split monolithic build-backend-docker job into lint-backend, lint-frontend, lint-evaluation (ubuntu-latest), test, and docker-eval jobs; lint jobs run free runners in parallel - Remove redundant HF source_list.json download from test step - Add docker-compose.ci.yml override: skips HF clone via SKIP_HF_DOWNLOAD build arg, bind-mounts pre-downloaded ./data, reduces healthcheck start_period from 1200s to 300s - Add docker-up-ci / docker-down-ci Makefile targets using the CI compose override - Use pytest -n auto in make test to parallelise 349 tests via already-installed pytest-xdist - Add SKIP_HF_DOWNLOAD ARG to backend/Dockerfile so production builds still clone the dataset; CI skips it and mounts instead - Change uv sync --dev to uv sync in Dockerfile to omit dev tools from the production image Signed-off-by: Jack Luar <jluar@precisioninno.com> Signed-off-by: Jack Luar <jluar@precisioninno.com>
pip is not on PATH on the self-hosted runner; the docker-eval job had no uv setup step. Add Install uv before the checkout and switch to uv tool install huggingface-hub so huggingface-cli is available. Signed-off-by: Jack Luar <jluar@precisioninno.com> Signed-off-by: Jack Luar <jluar@precisioninno.com>
…enROAD-Project#289) Split document embedding into 100-chunk batches with a 1s delay between batches so a 429 only retries one batch (~1 API call) rather than restarting FAISS.from_documents from scratch (~87 calls). Also raise retry wait times from max 120s to max 600s to give the quota time to reset before the next attempt. Signed-off-by: Jack Luar <jluar@precisioninno.com> Signed-off-by: Jack Luar <jluar@precisioninno.com>
* fix: defer graph init to background, prevent health-check timeout Move RetrieverGraph construction out of module-level import in conversations.py and into a background thread spawned during the FastAPI lifespan. This lets the server start instantly so the Docker health-check passes within the reduced 30 s start_period (instead of timing out after 22+ min waiting for FAISS embedding). - Replace module-level rg = RetrieverGraph(...) with lazy singleton (get_graph / start_graph_init / reset_graph_state_for_testing) - Add /conversations/ready readiness probe returning 'ready' or 'initializing' - Conversation endpoints return 503 / stream error when graph is not yet initialized - Add readiness poll loop (30 min, 10 s intervals) before Run LLM CI step in ci-secret.yaml - Reduce Docker healthcheck start_period default from 1200 s to 30 s - Update streaming tests to use new public reset_graph_state_for_testing() Signed-off-by: Jack Luar <jluar@precisioninno.com> --------- Signed-off-by: Jack Luar <jluar@precisioninno.com> Signed-off-by: Jack Luar <jluar@precisioninno.com>
* fix: defer graph init to background, prevent health-check timeout Move RetrieverGraph construction out of module-level import in conversations.py and into a background thread spawned during the FastAPI lifespan. This lets the server start instantly so the Docker health-check passes within the reduced 30 s start_period (instead of timing out after 22+ min waiting for FAISS embedding). - Replace module-level rg = RetrieverGraph(...) with lazy singleton (get_graph / start_graph_init / reset_graph_state_for_testing) - Add /conversations/ready readiness probe returning 'ready' or 'initializing' - Conversation endpoints return 503 / stream error when graph is not yet initialized - Add readiness poll loop (30 min, 10 s intervals) before Run LLM CI step in ci-secret.yaml - Reduce Docker healthcheck start_period default from 1200 s to 30 s - Update streaming tests to use new public reset_graph_state_for_testing() Signed-off-by: Jack Luar <jluar@precisioninno.com> --------- Signed-off-by: Jack Luar <jluar@precisioninno.com>
…he-OpenROAD-Project#291) - Split monolithic build-backend-docker job into lint-backend, lint-frontend, lint-evaluation (ubuntu-latest), test, and docker-eval jobs; lint jobs run free runners in parallel - Remove redundant HF source_list.json download from test step - Add docker-compose.ci.yml override: skips HF clone via SKIP_HF_DOWNLOAD build arg, bind-mounts pre-downloaded ./data, reduces healthcheck start_period from 1200s to 300s - Add docker-up-ci / docker-down-ci Makefile targets using the CI compose override - Use pytest -n auto in make test to parallelise 349 tests via already-installed pytest-xdist - Add SKIP_HF_DOWNLOAD ARG to backend/Dockerfile so production builds still clone the dataset; CI skips it and mounts instead - Change uv sync --dev to uv sync in Dockerfile to omit dev tools from the production image Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Song Luar <jluar@precisioninno.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build-backend-dockerjob intolint-backend,lint-frontend,lint-evaluation(freeubuntu-latestrunners, run in parallel),test(self-hosted), anddocker-eval(self-hosted, runs after all others pass) — mirrors the structure already used inci.yamlmake testnow runspytest -n autovia the already-installedpytest-xdist; cuts the 349-test suite from ~10 min to ~2–3 min on a multicore runnerSKIP_HF_DOWNLOADbuild arg tobackend/Dockerfile; CI passestrueand bind-mounts a runner-cached./datadir instead — saves 5–15 min per build; production behaviour unchanged (arg defaults tofalse)docker-compose.ci.ymloverride setsHEALTHCHECK_START_PERIOD=300s(down from 1200s) with tighterinterval=10s/retries=30uv sync --dev→uv syncinDockerfile; test/lint tools no longer baked into the imagesource_list.jsonwas committed in ci: parallelise jobs, remove HF download, commit source_list fixture #288; the redundanthuggingface-cli downloadin the unit-test step is dropped