Skip to content

poll-ci v1.4.0

Choose a tag to compare

@extremeshok extremeshok released this 11 Jun 16:32
· 3 commits to main since this release

What's changed in v1.4.0

A reliability and hardening release, driven by an audit of poll-ci's production
status output on a busy watched repo plus a full code review.

Fixes

  • Status posts retry on transient failures. A single dropped POST (network
    blip, GitHub 5xx) left that context pending forever — observed in
    production on a green, already-promoted commit. Posts now retry with backoff
    and honor Retry-After; permanent failures (token permissions) still
    surface immediately.
  • A still-running check can no longer be scored as passed. docker start -a returning is no guarantee the container exited, and a running
    container's inspect reports exit code 0. The outcome now comes from the
    container state (plus docker wait), so a broken attach stream can't
    produce a false green that promotes untested code.
  • Crash/restart reconciliation. Runs persist an in-flight marker; on
    startup, statuses stranded pending by a mid-run kill (watchtower recreate,
    reboot, OOM) are resolved as interrupted by restart when the branch has
    moved on. The startup sweep also removes containers and checkouts the dead
    process orphaned (instance-scoped label; prune pre-v1.4 orphans once with
    docker ps -aq -f label=poll-ci | xargs docker rm -f).
  • Short-circuit race fixed. A run that completed every step keeps its
    results (and promotes) even if a newer tip's cancellation raced in at the
    very end.
  • Force-push reverts re-run. Superseded SHAs are no longer marked
    processed, so a branch force-pushed back to one re-tests it instead of
    showing stale superseded by statuses forever.
  • Heartbeat: HEARTBEAT_MAX_LAG defaults to 0 — with 1, a failed
    promotion affecting only the tip commit never alerted. The no-jq fallback
    also extracted the wrong sha from the compare payload; fixed. Existing
    installs keep their env file: set HEARTBEAT_MAX_LAG=0 there to adopt the
    new default.
  • Polish: invalid env values warn instead of being silently ignored,
    scan.path rejects .., and open-PR listing paginates past 100.

Security / hardening

  • The git auth header is passed via environment (GIT_CONFIG_*) instead of
    argv, so it is no longer visible in process listings; log scrubbing also
    redacts the base64 header form. Plain-binary deployments need git >= 2.31.
  • Optional resource limits for check/scan containers: CHECK_MEMORY,
    CHECK_CPUS, CHECK_PIDS.
  • Engine image base bumped to alpine:3.24 with apk upgrade at build time.

Opt-in features (defaults preserve existing behavior)

  • MARK_SKIPPED=true — post a terminal ci status (not tested — superseded by <sha>) on the intermediate commits a fast push skipped.
  • CONCURRENCY=N — sweep multiple repos in parallel.
  • IMAGE_REFRESH_HOURS=N — periodically re-pull present check images so
    :latest tags don't freeze at first pull.
  • PR runs now short-circuit on force-push like branch runs do (under the
    existing SHORT_CIRCUIT).

The state file migrates transparently from older versions, and is now pruned
after ~6 months (a branch's last result is always kept).

Install

docker pull ghcr.io/extremeshok/poll-ci:v1.4.0     # or :latest
go install github.com/extremeshok/poll-ci@v1.4.0

Prebuilt binaries below (verify with poll-ci_v1.4.0_checksums.txt).