Skip to content

Chore/release hygiene deploy - #14

Merged
quangshuynh merged 5 commits into
mainfrom
chore/release-hygiene-deploy
Oct 17, 2026
Merged

quangshuynh merged 5 commits into
mainfrom
chore/release-hygiene-deploy

Conversation

@quangshuynh

Copy link
Copy Markdown
Member

No description provided.

- Verify the schema revision on worker startup, as the API and CLI already
  do and as docs/operations/worker.md claimed. The worker now exits 1
  instead of polling against a database it was not built for.
- Hold every outbound attempt to an overall deadline of the connect and
  read timeouts combined. The client timeouts each bound a single wait, so
  a destination trickling bytes could keep a request open indefinitely,
  outliving the lease and stalling the batch and worker shutdown.
- Stream the response and never read its body, so a destination cannot
  dictate how much memory an attempt uses.
- End the read transaction opened by load_submissions before sending, so
  no transaction is held across outbound HTTP calls.
- Record the rest of a batch when one completion fails to record, instead
  of abandoning every remaining result and forcing duplicate sends.
- Warn at startup when FORMS_WORKER_LEASE_SECONDS does not outlast one
  attempt.
An idempotent replay reported delivery.queued from the endpoint's current
webhook configuration. If the webhook was added or removed after the
original request, the replay claimed a delivery that did not exist, or
denied one that did. It now reports whether the stored submission owes a
delivery.
CI now installs SQLAlchemy 2.1, where Select is generic over a variadic
row type, so the existing bound Select[Any] no longer accepts a two-entity
select and mypy fails in list_submissions. Bound the type variable by a
small protocol for "has where()" instead, which type checks on both 2.0
and 2.1 (pyproject allows sqlalchemy>=2.0). No runtime change.
- docs/development/releasing.md: the release checklist (version bump,
  release notes, PG suite, mkdocs build, annotated tag on the merge
  commit) and a record of the v0.2.1 discrepancy: the tag points at
  235f8af, where __version__ is still 0.2.0, and has no release notes.
  The tag is not moved; the next release resolves it.
- Dockerfile: one non-root image for the API (default), the worker,
  migrations and the operator CLI. uvicorn runs with --no-proxy-headers
  so FORMS_TRUSTED_PROXY_HOPS stays the only trust knob for XFF.
- compose.yaml: example stack of postgres, one-shot migrate, api and
  worker, with a worker stop grace above the attempt deadline.
- docs/operations/deployment.md: the image, the example, the explicit
  stop-migrate-start sequence, and what health checking does and does
  not cover.
- api/health.py: replace the stale "readiness arrives with persistence"
  comment. No readiness route is added; that is a public-boundary
  decision left open and documented in Limitations.
/health stays liveness only and no database-checking route is added, so
the public surface remains /health and POST /f/{endpoint_id}. The
deployment page, Limitations and the health handler comment now state
this as a decision rather than an open question.
@quangshuynh
quangshuynh merged commit 9602bd3 into main Oct 17, 2026
6 checks passed
@quangshuynh
quangshuynh deleted the chore/release-hygiene-deploy branch October 17, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant