fix(chains): defer promotion until chainlets are ACTIVE#2162
Draft
fix(chains): defer promotion until chainlets are ACTIVE#2162
Conversation
…tates When chainlets (especially H100/MCM) deploy without min_replicas set, they can immediately scale to zero after reaching ACTIVE state. When traffic arrives or health checks run, they transition to WAKING_UP (SCALING_FROM_ZERO). Previously, WAKING_UP was not in DEPLOYING_STATUSES, causing the CLI to incorrectly report "Deployment failed" for chainlets that were actually in a valid transitional state. Similarly, SCALED_TO_ZERO is a valid terminal state for deployments without min replicas - it's not a failure, just an idle state. This fix adds both states to DEPLOYING_STATUSES so they are treated as non-failure states during deployment status checks. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When `--promote` is passed to `truss chains push`, promotion is now deferred until after all chainlets reach ACTIVE status. This prevents routing traffic to non-ready deployments. Changes: - Add `promote_chain_deployment()` API method to call the backend promotion endpoint - Track `promote` flag separately in PushOptionsBaseten - Deploy as published without environment, wait for ACTIVE, then call separate promote API - Add warning when using `--promote --no-wait` (promotion skipped) - Add `chain_id` and `chain_deployment_id` properties to BasetenChainService for use in promotion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What
Defer chain promotion until all chainlets reach ACTIVE status, preventing traffic routing to non-ready deployments.
💻 How
promote_chain_deployment()API method to call backend promotion endpointpromoteflag separately inPushOptionsBaseten(don't set environment at deploy time)--promote --no-wait(promotion skipped)🔬 Testing
🚢 Release requirements
🤖 Generated with Claude Code