Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions client-sdks/manager/openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 76 additions & 0 deletions client-sdks/manager/rust/openapi-3.0.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-sdks/platform/openapi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client-sdks/platform/rust/openapi-3.0.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client-sdks/platform/rust/openapi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/alien-cli/src/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ pub async fn deploy_task(args: DeployArgs, ctx: ExecutionMode) -> Result<()> {
} else {
LoopOperation::Deploy
},
delay_threshold: None,
delay_strategy: alien_deployment::runner::DelayStrategy::Inline,
};

let runner_result = alien_deployment::runner::run_step_loop(
Expand Down
2 changes: 1 addition & 1 deletion crates/alien-cli/src/commands/destroy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ pub async fn destroy_task(args: DestroyArgs, ctx: ExecutionMode) -> Result<()> {
let policy = RunnerPolicy {
max_steps: 400,
operation: LoopOperation::Delete,
delay_threshold: None,
delay_strategy: alien_deployment::runner::DelayStrategy::Inline,
};

let runner_result = match alien_deployment::runner::run_step_loop(
Expand Down
6 changes: 3 additions & 3 deletions crates/alien-deploy-cli/src/commands/up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3576,7 +3576,7 @@ pub async fn push_initial_setup(
// The CLI drives Pending → InitialSetup → Provisioning, then stops.
// The manager picks up from Provisioning and drives to Running.
operation: LoopOperation::InitialSetup,
delay_threshold: None,
delay_strategy: alien_deployment::runner::DelayStrategy::Inline,
};

let runner_result = shared_run_step_loop(
Expand Down Expand Up @@ -3840,7 +3840,7 @@ async fn run_runtime_deletion(
let policy = RunnerPolicy {
max_steps: 400,
operation: LoopOperation::Delete,
delay_threshold: None,
delay_strategy: alien_deployment::runner::DelayStrategy::Inline,
};

let runner_result = shared_run_step_loop(
Expand Down Expand Up @@ -3938,7 +3938,7 @@ async fn run_setup_deletion(
let policy = RunnerPolicy {
max_steps: 400,
operation: LoopOperation::Delete,
delay_threshold: None,
delay_strategy: alien_deployment::runner::DelayStrategy::Inline,
};

let runner_result = alien_deployment::setup_teardown::run_setup_teardown_after_handoff(
Expand Down
2 changes: 2 additions & 0 deletions crates/alien-deployment/src/loop_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ pub enum LoopStopReason {
Handoff,
/// No work was available (no target release, no config, etc.).
NoWork,
/// The next useful reconciliation is scheduled for later.
Delayed,
/// Step budget exhausted without reaching a terminal state.
BudgetExceeded,
/// Loop was cancelled by an external signal.
Expand Down
16 changes: 16 additions & 0 deletions crates/alien-deployment/src/manager_api_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ impl ManagerApiTransport {

#[async_trait]
impl DeploymentLoopTransport for ManagerApiTransport {
async fn renew_lease(&self, deployment_id: &str) -> Result<(), AlienError> {
self.client
.renew()
.body(alien_manager_api::types::RenewRequest {
deployment_id: deployment_id.to_string(),
session: self.session.clone(),
})
.send()
.await
.into_sdk_error()
.context(alien_error::GenericError {
message: "Failed to renew deployment lease via manager API".to_string(),
})?;
Ok(())
}

async fn reconcile_step(
&self,
deployment_id: &str,
Expand Down
3 changes: 2 additions & 1 deletion crates/alien-deployment/src/provisioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alien_core::{
ComputeClusterOutputs, Platform, ResourceLifecycle, Stack, StackState, StackStatus,
};
use alien_error::{AlienError, Context};
use alien_infra::StackExecutor;
use alien_infra::{RunningResourcePolicy, StackExecutor};
use tracing::{debug, info};

fn machines_deployment_has_zero_machines(platform: Platform, stack_state: &StackState) -> bool {
Expand Down Expand Up @@ -108,6 +108,7 @@ pub async fn handle_provisioning(
let executor = StackExecutor::builder(&target_stack, client_config)
.deployment_config(&config)
.lifecycle_filter(vec![ResourceLifecycle::Live])
.running_resource_policy(RunningResourcePolicy::OptIn)
.service_provider(service_provider)
.build()
.context(ErrorData::StackExecutionFailed {
Expand Down
Loading
Loading