Skip to content

Rollouts: no prepared-statement cache, so adding a column never fails the previous release's SELECT * (#178's rollout 500) - #201

Merged
ndbroadbent merged 1 commit into
mainfrom
no-stale-statements
Dec 4, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
no-stale-statements

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

The second rollout 500 of 4 Dec. POST /api/v1/builds answered 500 at 09:02:37 (request 30e0b60c), during #178's rollout.

Cause (logs and timeline from talira infra)

Fix

  • config::without_statement_cache adds statement-cache-capacity=0 to the database URL, which sqlx 0.9.1 reads. Every query is then planned against the schema as it is now. A URL that sets the capacity keeps it.
  • This costs a parse per query, which is negligible at our load.
  • It applies to every process that loads the config: web, worker, scheduler, migrate, and the live listener.
  • AGENTS.md says why the cache stays off.

Tests

  • tests/rollouts.rs: run the build query, add a column, run it again.
    • Against main it fails with production's exact error: cached plan must not change result type (... select "builds".* from "builds" where "builds"."id" = $1 limit 1).
    • With the fix it passes.
  • A unit test covers the URL cases. The whole app suite, fmt and clippy pass.

Also from the timeline, for infra

@visualci-com

visualci-com Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #649 · 486 unchanged · no changes

This PR vs base: 23 changed, 72 added since #577, across 3 builds

docspring/visualci · journeys · build #646 · 50 unchanged · no changes

This PR vs base: 1 changed, 8 added since #548, across 3 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

…ts, so a migration that adds a column never fails the previous release's SELECT * (cached plan must not change result type: #178's rollout 500)
@ndbroadbent
ndbroadbent merged commit 04cab7c into main Dec 4, 2026
16 checks passed
@ndbroadbent
ndbroadbent deleted the no-stale-statements branch December 4, 2026 11:33
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