Skip to content

Add instance restart policy#233

Draft
sjmiller609 wants to merge 2 commits into
hypeship/add-healthcheck-policyfrom
hypeship/restart-policy
Draft

Add instance restart policy#233
sjmiller609 wants to merge 2 commits into
hypeship/add-healthcheck-policyfrom
hypeship/restart-policy

Conversation

@sjmiller609
Copy link
Copy Markdown
Collaborator

@sjmiller609 sjmiller609 commented May 16, 2026

Summary

  • add restart_policy and restart_status API fields with generated bindings
  • add a restart-policy controller for whole-instance restarts with backoff, max attempts, stable reset, and manual-stop suppression
  • stack on the healthcheck branch and restart unhealthy running instances through restart policy when policy is on_failure or always
  • document the healthcheck/restart-policy interaction

Testing

  • go test ./lib/restart-policy ./lib/healthcheck ./lib/providers
  • go test -tags containers_image_openpgp ./lib/instances -run 'Test(ValidateCreateRequestHealthCheck|ValidateUpdateInstanceRequestAllowsRestartPolicyOnly|NormalizeRestartPolicyWrapsInvalidRequest|RestartStatusAfterPolicyUpdatePreservesManualStop|RestartStatusAfterPolicyUpdateClearsRetryState)$'
  • go test -tags containers_image_openpgp ./cmd/api/api -run 'Test(CreateInstance_MapsHealthCheckPolicy|CreateInstance_MapsRestartPolicy|UpdateInstance_MapsHealthCheckPatch|UpdateInstance_MapsRestartPolicyPatch|UpdateInstance_RejectsInvalidRestartPolicy)$'
  • go test -tags containers_image_openpgp ./cmd/api -run 'Test(StartImageRetentionControllerSkipsNilController|StartImageRetentionControllerStartsRunner|ConfigureOCICacheGCSkipsDisabled|ConfigureOCICacheGCRejectsInvalidInterval)$'

Not run: full ./cmd/api/api package; it enters broader lifecycle coverage outside this focused change.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

✱ Stainless preview builds for hypeman

This PR will update the hypeman SDKs with the following commit message.

feat: Add instance restart policy

Edit this comment to update it. It will appear in the SDK's changelogs.

hypeman-openapi studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅

New diagnostics (5 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheck`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckExec`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckHTTP`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckTCP`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/InstanceHealthStatus`
hypeman-typescript studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/hypeman-typescript/bdc11989c649690cb7fd9456cb36d4ee88e2c9d9/dist.tar.gz
New diagnostics (5 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheck`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckExec`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckHTTP`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckTCP`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/InstanceHealthStatus`
hypeman-go studio · code · diff

Your SDK build had at least one new note diagnostic, which is a regression from the base state.
generate ✅build ✅lint ✅test ✅

go get github.com/stainless-sdks/hypeman-go@996b10ce7f9b95aaef949179d44172397256553c
New diagnostics (6 note)
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheck`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckExec`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckHTTP`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/HealthCheckTCP`
💡 Model/Recommended: We recommend you use a model for `#/components/schemas/InstanceHealthStatus`
💡 Schema/EnumHasOneMember: Confirm intentional use of `enum` with single member.

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-05-16 03:02:38 UTC

@sjmiller609 sjmiller609 force-pushed the hypeship/restart-policy branch from 383ad8b to 365fa7d Compare May 16, 2026 03:00
@sjmiller609 sjmiller609 changed the base branch from main to hypeship/add-healthcheck-policy May 16, 2026 03:01
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