pub struct DeploymentState {
pub status: DeploymentStatus,
pub platform: Platform,
pub current_release: Option<ReleaseInfo>,
pub target_release: Option<ReleaseInfo>,
pub stack_state: Option<StackState>,
pub error: Option<AlienError>,
pub environment_info: Option<EnvironmentInfo>,
pub runtime_metadata: Option<RuntimeMetadata>,
pub retry_requested: bool,
pub protocol_version: u32,
}Expand description
Deployment state
Represents the current state of deployed infrastructure, including release tracking. This is platform-agnostic - no backend IDs or database relationships.
The deployment engine manages releases internally: when a deployment succeeds,
it promotes target_release to current_release and clears target_release.
Fields§
§status: DeploymentStatusCurrent lifecycle phase
platform: PlatformTarget cloud platform (AWS, GCP, Azure, Kubernetes)
current_release: Option<ReleaseInfo>Currently deployed release (None for first deployment)
target_release: Option<ReleaseInfo>Target release to deploy (None when synced with current)
stack_state: Option<StackState>Infrastructure resource tracking (which resources exist, their status, outputs)
error: Option<AlienError>Deployment-level error for failures not owned by a specific resource.
Resource controller failures belong in stack_state.resources[*].error.
environment_info: Option<EnvironmentInfo>Cloud account details (account ID, project number, region)
runtime_metadata: Option<RuntimeMetadata>Deployment-specific data (prepared stacks, phase tracking, etc.)
retry_requested: boolWhether a retry has been requested for a failed deployment When true and status is a failed state, the deployment system will retry failed resources
protocol_version: u32Protocol version for cross-actor compatibility. All actors (manager, push client, agent) check this before stepping. Mismatched versions produce a clear error instead of silent corruption. See docs/02-manager/10-deployment-protocol.md.
Implementations§
Source§impl DeploymentState
impl DeploymentState
Sourcepub fn builder() -> DeploymentStateBuilder
pub fn builder() -> DeploymentStateBuilder
Create an instance of DeploymentState using the builder syntax
Source§impl DeploymentState
impl DeploymentState
Sourcepub fn has_desired(&self) -> bool
pub fn has_desired(&self) -> bool
Returns whether this state carries desired infrastructure for the deployment runner to converge.
Sourcepub fn unfinished_update(&self) -> Option<(&str, &Stack)>
pub fn unfinished_update(&self) -> Option<(&str, &Stack)>
The stack an unfinished update is still applying after a newer target release arrived,
with the release it was prepared from. Such an update finishes on that stack before the
newer target is prepared, so its resources need that release’s extensions, not the
target’s. None when no update is unfinished or it applies the target release.
Sourcepub fn applied_stack(&self) -> Option<&Stack>
pub fn applied_stack(&self) -> Option<&Stack>
The stack whose resources the deployment applies: an unfinished update’s, otherwise the target release’s, otherwise the current release’s.