feather-control-plane
Durable failure observability for an extractor fleet.
A long-running extractor that dies mid-load leaves nothing behind: no row, no error, no "it got as far as table X". This library gives it three things that survive the death —
- a write-ahead log on local disk, fsynced before anything is shipped, so a crash leaves the breadcrumbs of how far the run got;
- a Postgres control plane holding run lifecycle, per-unit events and budget telemetry, shipped as the run goes rather than written at the end;
- a liveness lease, renewed by a background thread, so a process that stops renewing is known to be dead instead of being assumed still running.
The data plane is somewhere else entirely — this records what happened to the load, not the load's data.
Install
pip install "feather-control-plane[postgres]" # the full facade
pip install feather-control-plane # pure-stdlib helpers only
psycopg is an optional extra, and that is deliberate. Two of the modules here —
control_plane.business_day and control_plane.status — are pure stdlib, and consumers import
them on their own, with no database anywhere in the picture. Making a database driver mandatory
for a date helper is what drove nine services to copy business_day.py around by hand instead
of depending on the library. Anything that actually opens a connection needs the postgres
extra; __init__.py resolves those names lazily (PEP 562), so importing the stdlib half never
pulls the driver in.
Import name
The distribution is feather-control-plane; the import name is control_plane:
from control_plane import ControlPlane, status
from control_plane.business_day import ist_today
They differ on purpose. The nine services adopting this already have ~40 call sites spelled
from control_plane import ..., so keeping the import name turns adoption into a dependency
substitution with no source edits.
Usage
from control_plane import ControlPlane, status
cp = ControlPlane("gofrugal", dsn=PG_DSN, wal_dir="control_wal")
with cp.run("nightly", run_id=run_id) as run:
run.event(entity="sales_item_wise", unit="1001", business_date=d,
status=status.EV_OK, http_status=200, rows=42,
source_attempts=1, sink_attempts=1, pull_ms=1200, load_ms=800)
run.budget(status.BUDGET_WALLTIME, limit=1800, used=1800, remaining=0, hit=True)
run.finish(status.RUN_PARTIAL, stop_reason=status.STOP_BUDGET_TIME,
n_ok=47, n_err=1, n_skipped=0)
dsn=None is the explicit no-control-plane mode for dev and test: the WAL still records
everything, nothing ships. With a DSN configured, Postgres is a hard dependency of the run —
if it is unreachable at startup the run aborts rather than loading blind, because a load with no
provenance is worse than no load.
Tests
cd packages/feather-control-plane && uv run --package feather-control-plane pytest
# or, from the repo root, naming the path:
uv run --package feather-control-plane pytest packages/feather-control-plane/tests
--package picks the environment; it does not pick the tests. pytest takes its config from the
nearest pyproject.toml above the working directory, so a bare pytest run from the repo root
collects feather-flow's suite no matter what --package says — green, 1050 tests, and not one of
them this package's. Either cd in or name the path.
The pure-logic tests (WAL framing, status vocabulary, business day) run anywhere. The rest need a
real Postgres and find one in this order: CONTROL_PG_DSN if set → a postgres:16 Docker
container → a local Postgres binary (pg_ctl on PATH, else Homebrew's keg-only
postgresql@N), initdb'd into a temp directory on a throwaway port and torn down afterwards.
With none of the three available they skip.
Metadata
Release files for feather-control-plane 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| feather_control_plane-0.1.0.tar.gz | 33.4 kB | Without provenance | Details for feather_control_plane-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| feather_control_plane-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for feather_control_plane-0.1.0-py3-none-any.whl |
Total release size: 56.5 kB
Release files / feather_control_plane-0.1.0.tar.gz
| Download URL | feather_control_plane-0.1.0.tar.gz |
|---|---|
| Size | 33.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45afc03286daaf7da949a6666697d8e428038c5fcd1bc9c856956d7688e663d1
|
|
BLAKE2b-256 checksum How to use checksums |
95d9e2ed1aa6428a4d72d21e5e6e2ae4243ce5e897cc7adab7529aee8e3c5c64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / feather_control_plane-0.1.0-py3-none-any.whl
| Download URL | feather_control_plane-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01baa321645128544fb7522b286d331c90175fa775b3bc74c9001827b4271631
|
|
BLAKE2b-256 checksum How to use checksums |
2917fdc102f9fb4a89c1a3aa24a35999c3d23e70b5c45727ccfd6f6510e49a1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for feather-control-plane 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.