Skip to content

fix(pool): workers now boot (AMI+IAM), no queue leak on failure, fault detail (#70) - #461

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/70-pool-create-real-aws
Jul 31, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/70-pool-create-real-aws

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Three spawn pool create fixes, all found by the first real-AWS smoke test of the pooled engine (2 × t3.micro in the dev account; instances torn down, leak-checked clean).

1. Workers never booted — MissingParameter

provisionPoolWorkers built a raw aws.LaunchConfig and the taskcohort Actuator calls Client.Launch (RunInstances) directly — bypassing the AMI auto-detect and IAM-profile setup that launcher.Provision does for spawn task run. With no ImageId, every worker failed MissingParameter and the pool never reached min-viable. Fix: resolve GetRecommendedAMI + SetupSporedIAMRole once up front (workers are homogeneous) and launch with a complete config. Verified: workers now reach running with the spored profile and correct tags.

2. Failed create leaked the SQS queue

The queue is created before provisioning; on a provisioning failure there were no workers to drain it, so it lingered. create now deletes the queue on the failure path.

3. Opaque failure

"failed to reach min viable" gave no cause. Now renders each worker's terminal fault (AWS code + phase from the cohort Record), mirroring launchCohort. This is literally what turned #1 from "mystery" into "MissingParameter at launch-acked" in ~2 minutes.

go build ./..., go vet ./cmd/, and the cmd SDK-import / flag-convention gates pass.

Note: the smoke also surfaced a separate, more serious release-distribution bug — the v0.96.0 spored bootstrap fails at "Failed to download checksum" (empty reply from spawn-binaries-us-east-1), which blocks ALL spored instances, not just pools. Filed separately (see #70 thread) — it is not fixed here.

Refs #70.

…rface fault detail (#70)

Found by a real-AWS smoke test: pool create launched workers with no AMI/IAM
(RunInstances MissingParameter → never reached min-viable), left the SQS queue
orphaned when provisioning failed, and reported no cause. All three fixed.
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/pool.go 0.00% 37 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 47e4620 into main Jul 31, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the fix/70-pool-create-real-aws branch July 31, 2026 04:00
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