Skip to content

fix(pool): keep pooled sessions claimable across pier upgrades - #44

Merged
kerem-kaynak merged 1 commit into
mainfrom
fix/pool-survives-upgrades
Sep 30, 2026
Merged

kerem-kaynak merged 1 commit into
mainfrom
fix/pool-survives-upgrades

Conversation

@kerem-kaynak

Copy link
Copy Markdown
Collaborator

What does this PR do and why?

A claim never reinstalled the in-VM supervisor, so the pool generation included the pier build that filled each member. Every pier upgrade therefore invalidated every pooled session. The first session after an upgrade found nothing claimable and started cold, and only its refill rebuilt the pool. Now the claim installs the claiming pier's supervisor and its units, with the same install block a create uses, and the build is no longer part of the generation. A pier upgrade leaves pools claimable. Image, disk, instance type and setup-script changes still recycle members.

The claim pushes one more file, the supervisor binary (about 5 MB), which every create already sends.

Related issue

None.

Tests

  • TestFreshenInstallsTheClaimingSupervisor: freshen installs the supervisor after dropping the restored layout, restarts the running one, and uses the same block as bootstrap.
  • TestGeneration no longer takes a build input.
  • go test ./..., go vet ./..., gofmt -l and make build all pass.

Checklist

  • gofmt -l . produces no output and go vet ./... passes
  • make build succeeds (if this touches supervisor/session code)
  • Tests added or updated for behavior changes
  • Docs updated if applicable

A claim never reinstalled the in-VM supervisor, so pooled sessions were fingerprinted with the pier build that filled them and every upgrade turned the whole pool stale: the next session always started cold. The claim now installs the claiming pier's supervisor the same way a create does, and the build is no longer part of the pool generation.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@kerem-kaynak
kerem-kaynak merged commit af5e85b into main Sep 30, 2026
3 checks passed
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