Repository navigation
v2.0.0
This release adopts servicekit 2.0 (2.0.2 pinned) and carries the changes from the September 2026 review of chapkit itself. Several of them change public behavior, so the major version is bumped. chap-core integrates over the HTTP contract and every endpoint it uses keeps its shape, but its Python client on chapkit 1.x validates /api/v1/info strictly and rejects the three new provenance fields; chap-core needs the small fix in dhis2-chap/chap-core#564 (validate the service info with its tolerant local schema) before talking to 2.0 services.
Breaking changes
- POST is create-only. Config and artifact routes answer 409 Problem Details when the supplied id already exists. PUT is the update path and applies exactly the fields sent; an explicit null clears a nullable field.
- Every error is RFC 9457 Problem Details (
application/problem+json) with atrace_id: request validation (422 with a structurederrorslist), database errors (409 for integrity violations with aconstraintextension, 500 otherwise, SQL never leaks), the job router, and the config, ML and artifact routers, which now raise servicekit exceptions with aninstancepointing at the resource. Clients that parsed the old{"detail": ...}bodies must switch. GET /healthreturns 503 when unhealthy.degradedandhealthyreturn 200.- Pagination bounds are enforced.
page >= 1and1 <= size <= 100, else 422. Listings are ordered by id. - Failing shell scripts fail the job. A non-zero train or predict exit stores the diagnostic workspace artifact under the id returned by the 202 response and then fails the job; the artifact id is repeated in the job error and
artifact_idon the failed job stays null. JobStatus.cancelingis reported for synchronous jobs still winding down after cancellation.ConfigManager.unlink_artifactandConfigRepository.unlink_artifacttake(config_id, artifact_id). Unlinking through a config that does not own the link returns 404.- Custom operations follow CRUD permissions.
$link-artifactand$unlink-artifactregister only when updates are allowed;$artifacts,$tree,$expandand$configonly when reads are allowed. - Artifact writes reject cycles and over-deep nesting. Self-parenting, reparenting beneath a descendant, and trees deeper than 64 levels return 400.
- Application-scoped state. servicekit 2.0 removed the module-level
set_database,set_schedulerandset_app_manager; lifespans capture the objects they need instead.
Added
MLServiceInfogainsgit_revision,chapkit_versionandservicekit_version, filled from theGIT_REVISIONenvironment variable and installed package metadata when left unset. They appear on/api/v1/info, in registration, in the console Overview and inchapkit test --verbose.- Scaffold:
ARG/ENV GIT_REVISIONin the Dockerfile, forwarded bycompose.ymland the migrate Makefile;chapkit initalso writes a.dockerignoreand a GHCR publish workflow with sha and semver tags. - Scaffold hardening matching chap-core: the image runs as the unprivileged
chapkituser (created only when the base image lacks it) andcompose.ymlsetsinit,read_only,cap_drop: ALL,no-new-privileges, a tmpfs on/tmpand a named volume for/work/data. Migrated renv projects restore into/opt/renv/cachewith the sandbox disabled. - Web console: schema-driven config form, deep-linkable Jobs with bulk remove and group-by-status, apply-from-dry-run on Train and Predict, resizable sidebar and master/detail panels, the canceling status, contiguous prediction sample data.
chapkit mlproject migratelifts its chapkit floor toN.0.0when the running major is newer, so 2.x emitschapkit>=2.0.0,<3.
Fixed
- Config data is persisted fully validated, so defaults and default factories are frozen at write time instead of re-evaluated on every read.
- The
$schemaoperation keeps referenced$defs, including the root definition for recursive configs. - Cancelling a shell job kills the whole process group and removes the runner workspace; a failed prediction keeps its diagnostic workspace even when its output file is unparseable.
- Console timestamps are parsed as UTC; the console manifest carries the chapkit version.
- Scaffolded README
$trainand$predictexamples use the accepted request shape; R scaffolds note the yaml package for local runs; SQLite sidecar files are excluded from workspace zips.
Upgrading
- Pin
chapkit>=2.0.0,<3.chapkit initandchapkit mlproject migrateemit this. - Add
ARG GIT_REVISION=""andENV GIT_REVISION=${GIT_REVISION}to existing Dockerfiles, and copy theUSER chapkitand compose hardening blocks from a fresh scaffold if you want the same posture. - Handle 409 on POST with an existing id, Problem Details bodies for every error, and failed jobs for failing scripts.
- Tooling: fastapi 0.141, starlette 1.6, uvicorn 0.52, ruff 0.16 (Markdown excluded from formatting), Playwright 1.63,
uv_build0.12 series. Runplaywright install chromiumlocally after upgrading.
servicekit release notes: https://github.com/dhis2-chap/servicekit/releases/tag/v2.0.0, v2.0.1, v2.0.2
What's Changed
- chore: bump version to 1.2.0.dev0 by @mortenoh in #73
- feat: web console roadmap follow-ups by @mortenoh in #74
- chore: add npm Dependabot updates for frontend by @mortenoh in #75
- chore(deps): combine dependabot updates for github-actions, python, and frontend by @mortenoh in #88
- chore: adopt servicekit 2.0.0 by @mortenoh in #93
- chore(deps): bump the frontend-dependencies group across 1 directory with 16 updates by @dependabot[bot] in #92
- chore: build GitHub release notes from the annotated tag message by @mortenoh in #95
- fix: fail jobs on failing shell scripts, emit problem details, correct scaffolded README by @mortenoh in #96
- docs: document failed shell-script jobs and servicekit 2.0 CRUD semantics by @mortenoh in #97
- chore: require servicekit 2.0.2 and use the public JobOptions by @mortenoh in #98
- feat: expose git revision and library versions on /api/v1/info by @mortenoh in #99
- chore: harden scaffolded Dockerfile and compose to chap-core posture by @mortenoh in #100
- chore: release prep, dependency upgrades and console fixes by @mortenoh in #101
- fix: address pre-release review findings by @mortenoh in #102
- build: create the scaffold's chapkit user only when the base image lacks it by @mortenoh in #103
- chore: release 2.0.0 by @mortenoh in #104
Full Changelog: v1.1.0...v2.0.0