Skip to content

fix(executor): the spot-reclaim and capacity-wait requeues bind their wait (#1383) - #1387

Merged
athvin merged 1 commit into
mainfrom
fix/561-requeue-interval-cast
Nov 29, 2026
Merged

athvin merged 1 commit into
mainfrom
fix/561-requeue-interval-cast

Conversation

@athvin

@athvin athvin commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #1383

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

requeue_launch and capacity_wait cast $wait_secs to bigint inside make_interval(secs => …). Without the cast Postgres infers float8 and every call failed at parameter serialization.

Why

Found live by #561 on er-dev. A spot runner node was drained under a running reconcile. The dispatcher saw the disruption and logged requeueing the row failed: error serializing parameter 0 28 times. The try stayed running with no pod, so the job hung. The capacity-wait path (vCPU quota) is broken the same way. No test had ever executed either statement.

Proof

make check exit 0. pg_task_instances now executes both statements. With the cast reverted it fails with WrongType { postgres: Float8, rust: \"i64\" }, the production error.

Risk & rollback

SQL text only; no schema or behaviour change other than the requeue now working. Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:24d16c2e-fec6-49d8-9797-060338df4848 on brians-MacBook-Pro · 2026-11-29T05:06:00Z

Specific to this change

  • the requeue works live — er-dev, p3live job 01a22524…: the reconcile try of node i-05b77c95 (drained) was marked vanished and relaunched as er-t-13b0239076c5491c1d9f-l2 on a fresh spot node i-076b44d5, same try number (no try spent), instead of the 28 serialization failures before
Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

After deploy, the stuck p3live job 01a22524… (reconcile try 1, k8s job er-t-13b0239076c5491c1d9f-l1) is the live re-check: the new dispatcher should requeue the orphaned try and the job should finish. The analyser gap is #1384.

🤖 Generated with Claude Code

… wait (#1383)

requeue_launch and capacity_wait passed $wait_secs (declared bigint,
bound as i64) into make_interval(secs => ...), where Postgres infers
float8. Every call therefore failed at parameter serialization:
'requeueing the row failed: error serializing parameter 0'. A spot
reclaimed or capacity-starved try stayed running with no pod. Found by
#561's drain on er-dev, where the dispatcher logged exactly that.

Both statements now cast the parameter. pg_task_instances executes
both (a stale id, so zero rows and no state change); with the cast
reverted it fails with WrongType { postgres: Float8, rust: "i64" }.
The analyser gap that let this plan cleanly is #1384.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin
athvin merged commit 4c9a639 into main Nov 29, 2026
44 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 29, 2026 04:03 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 7f85bfdb Deployed Nov 29, 2026 by athvin via remove closed PR previews #138
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.

Spot-reclaim and capacity-wait requeues fail at parameter serialization (make_interval infers float8)

2 participants