Skip to main content

Deployment lifecycle

Keep the original idempotency key after a timeout or disconnect. Inspect the durable operation and its events before retrying; a new key represents a new mutation intent.
Create and apply requests are validated and persisted before external provisioning begins. A leased worker resumes incomplete steps after a control-plane restart. Each replica intent has one deterministic provider identity, so replay adopts the same resource rather than submitting another. Readiness requires the provisioned runtime to serve the expected model. Updates create immutable candidates, Release Guard records a deterministic decision, promotion switches routing generations atomically, and old capacity drains before termination. A bad candidate never replaces the active revision. A production endpoint combines this lifecycle with stable endpoint identity, admission, distributed tenant quotas, and qualified autoscaling. Follow the self-contained, version-controlled production service recipe for those commands, their safe order, isolated bad-candidate testing, and the mandatory real-provider gate. Test failures against isolated candidate/staging traffic; the active route does not become a safe test target merely because its lifecycle is durable.

Recover a failed worker or replace a deployment

InferCrane has no imperative restart command. If an owned provider resource disappears, the reconciler uses the persisted replica intent and provider identity to observe, adopt, or recreate it; closing the CLI is not a reason to submit another deployment. Follow the same durable work:
If the desired serving configuration itself must change, create an immutable replacement through a version-controlled DeploymentSpec:
The active revision remains routed until the candidate passes readiness and Release Guard. After the operation converges, verify the stable data path and inspect the exact request attribution:
Use the X-Request-Id response header as REQUEST_ID. Provider-native systems may not expose a physical replica identity; the inspection leaves that field unavailable instead of guessing.

Decide whether provider drift is recoverable

Compare the persisted provider identity, intent digest, ownership tags, revision, and replica ordinal from inspect with a read-only provider inventory before allowing reconciliation: An empty infercrane orphans result is not enough when provider credentials cannot see the full account or namespace. Manual intervention ends only when one authoritative provider identity can be matched to one durable replica intent - or absence is proven by the owning provider boundary. Delete first withdraws desired routing, then drains and removes external resources. Restarting midway resumes cleanup. Completion requires provider absence, removed targets and replicas, and a deployment tombstone. Operators should still verify provider inventory after paid acceptance tests. Cancelling a deployment’s first deploy while it runs uses the same cleanup. It removes any capacity the deploy started and finishes with the same tombstone, so the name is released exactly as after a delete. A deploy cancelled before any work started leaves the deployment in place; delete it to release the name.

Delete without losing recovery state

Preview the exact effect before mutation. Confirm explicitly, give the request a stable retry key, and wait for the durable provider cleanup operation:
Before --yes, verify the plan names only the intended deployment, revisions, targets, replicas, and provider identities. Inspect every endpoint binding that references the deployment and decide whether it needs a replacement plan. Confirm ownership mode: observe-only and traffic-managed adoptions do not grant lifecycle deletion of the upstream; lifecycle-managed capacity must have matching durable provider ownership. Also check external fallback, async jobs, active streams, and retained release evidence required by your policy. InferCrane will not guess how an application should replace a deleted endpoint dependency. The endpoint InferCrane created for the deployment (its own name, or the endpoint_name it published) is deleted together with the deployment, because nothing else can serve it. If you bound another backend to that endpoint, InferCrane keeps it and leaves the replacement plan to you. Endpoints you created and bound yourself are never deleted with a deployment. If the terminal disconnects, do not submit a new intent with a new key. Reattach with the operation ID returned by delete, or inspect the persisted deployment events. After completion, verify both InferCrane state and the provider boundary:
The deployment must be absent from the first result and no run-owned orphan may appear in the second. For a paid or real-cluster operation, independently inspect the provider inventory too. Provider deletion is not proven solely by a missing database row. Never erase PostgreSQL or use --keep-resources while cleanup is unresolved unless you intentionally accept external ownership.

Deploy a deleted name again

Once a delete, or the cleanup after a cancelled first deploy, has finished, the same name can be deployed again. The new deployment gets a new ID, a new endpoint, and, for a managed deployment, a new prepaid hold. The deleted deployment keeps its events, revisions, evidence, and settled hold under its old ID, so history from the two deployments is never mixed. Lookups by name, such as the deployment page, its benchmarks, and its quality evidence, show only the live deployment. An optimization report reads its candidates’ evidence by record ID, so it still shows results measured on candidate deployments that cleanup deleted. A name stays taken while its deletion is still running. Submitting it again returns a conflict that says the deletion is in progress; wait for the delete operation to finish. A name is also taken while another live endpoint uses it, for example one you created yourself or one InferCrane kept because you bound another backend to it. Delete that endpoint or choose another deployment name.