cog
4bc01628 - feature: Coglet (Rust) HTTP Server Only (#2714)

Commit
4 days ago
feature: Coglet (Rust) HTTP Server Only (#2714) * celebration: delete python http server Typically this would be a chore, but now this is a celebration. The http server written in python is no more. Cog now explicitly depends on the Rust based coglet server. 17 files changed, 58 insertions(+), 3305 deletions(-) * feat: make coglet the required and only HTTP server Remove all optionality around coglet — it is now always installed: - GetCogletWheelConfig() mirrors GetCogWheelConfig(): env var -> dist/ auto-detect (dev builds) -> PyPI (release builds). Never returns nil. - Dockerfile generator always installs coglet alongside cog. - CI: remove runtime matrix (no more cog vs cog-rust distinction). - Integration tests: remove coglet_rust condition guard. - noxfile.py: always install coglet wheel, trim stale test deps. - pyproject.toml: coglet moved to required dependencies, fastapi and uvicorn removed. - openapi_schema command rewritten to use cog._inspector and cog._schemas directly instead of the deleted FastAPI server. - Docs updated to reflect single Rust/Axum runtime. - .gitattributes: mark llms.txt as linguist-generated. * feat: default coglet logging to JSON format Flip the LOG_FORMAT default from console to JSON. Production environments expect structured logs. Set LOG_FORMAT=console to get the human-readable format for local development. * fix: test-python CI job must depend on coglet wheel Since coglet is now a required dependency, the test-python job needs the coglet wheel artifact. Add build-rust to its dependency chain and download all artifacts with merge-multiple. * fix: make Dockerfile generator tests deterministic with injectable wheel configs Wheel auto-detection (env → dist/ → PyPI) was leaking into unit tests, causing failures when local dist/ wheels existed or REPO_ROOT was set. - Add cogWheelConfig/cogletWheelConfig override fields to StandardGenerator - Tests use pypiWheels() helper for deterministic output without env manipulation - Update testInstallCog() to include coglet install lines (coglet is now always installed) - Fix wheels_test.go: isolate from REPO_ROOT and dist/ in dev environment * fix: allow coglet pre-releases in nox typecheck session coglet only has pre-release versions on PyPI (e.g. 0.17.0a4). Without --prerelease=allow, uv cannot resolve coglet>=0.1.0,<1.0. Temporary until coglet 0.17.0 stable is published. * fix: use printf instead of echo -e in docs:llm tasks for Linux compatibility echo -e behavior differs between macOS and Linux, causing docs:llm:check to fail in CI. printf is portable and produces consistent output. * fix: install coglet before cog in Dockerfile to satisfy dependency cog depends on coglet>=0.1.0,<1.0 but coglet only has pre-release versions on PyPI. pip fails resolving cog's dependencies if coglet isn't already installed. Installing coglet first avoids this. * fix: use awk instead of sed in docs:llm for cross-platform compatibility BSD sed (macOS) and GNU sed (Linux) have subtle differences in trailing newline handling with the q command, causing docs:llm:check to fail in CI. awk behavior is consistent across platforms. * fix: use git ls-files in docs:llm to exclude mkdocs-generated files docs/ may contain mkdocs-generated copies of CONTRIBUTING.md and README.md that are gitignored. Using git ls-files ensures only tracked markdown files are included in llms.txt generation, preventing CI mismatches between local and CI environments. * fix: subdirectory predictor import and pip_freeze test assertions openapi_schema: use spec_from_file_location to load predictor modules instead of import_module, matching load_predictor_from_ref behavior. This fixes subdirectory predictors (e.g. my-subdir/predict.py:Predictor) where basename stripping lost the directory context. build_pip_freeze: remove pydantic/uvicorn assertions since these are no longer dependencies (they came transitively via fastapi which was removed). Assert coglet instead.
Author
Parents
Loading