Skip to content
Closed
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
2 changes: 1 addition & 1 deletion packages/toolchain/cli/src/commands/actor/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl Opts {
skip_route_creation: None,
keep_existing_routes: None,
non_interactive: false,
skip_upgrade: false,
upgrade: false,
})
.await?;

Expand Down
6 changes: 3 additions & 3 deletions packages/toolchain/cli/src/commands/build/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ pub struct Opts {
#[clap(long)]
unstable_compression: Option<config::build::Compression>,

/// Skip upgrading actors
/// Upgrade existing actors with the new build after publishing
#[clap(long)]
skip_upgrade: bool,
upgrade: bool,

// Docker options
/// Specify a pre-built Docker image instead of building from a Dockerfile
Expand Down Expand Up @@ -174,7 +174,7 @@ impl Opts {
version_name,
build_name: self.name.clone(),
runtime,
skip_upgrade: self.skip_upgrade,
upgrade: self.upgrade,
},
)
.await?;
Expand Down
6 changes: 3 additions & 3 deletions packages/toolchain/cli/src/commands/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ pub struct Opts {
#[clap(long)]
non_interactive: bool,

/// Skip upgrading actors
/// Update existing actors with the new build after deploying
#[clap(long)]
skip_upgrade: bool,
upgrade: bool,
}

impl Opts {
Expand Down Expand Up @@ -65,7 +65,7 @@ impl Opts {
skip_route_creation: self.skip_route_creation,
keep_existing_routes: self.keep_existing_routes,
non_interactive: self.non_interactive,
skip_upgrade: self.skip_upgrade,
upgrade: self.upgrade,
})
.await?;

Expand Down
4 changes: 2 additions & 2 deletions packages/toolchain/cli/src/util/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub struct DeployOpts<'a> {
pub skip_route_creation: Option<bool>,
pub keep_existing_routes: Option<bool>,
pub non_interactive: bool,
pub skip_upgrade: bool,
pub upgrade: bool,
}

pub async fn deploy(opts: DeployOpts<'_>) -> Result<Vec<Uuid>> {
Expand Down Expand Up @@ -258,7 +258,7 @@ pub async fn deploy(opts: DeployOpts<'_>) -> Result<Vec<Uuid>> {
filter_tags: opts.filter_tags.clone(),
build_tags: opts.build_tags.clone(),
version_name: opts.version.clone(),
skip_upgrade: opts.skip_upgrade,
upgrade: opts.upgrade,
},
)
.await?;
Expand Down
11 changes: 4 additions & 7 deletions packages/toolchain/toolchain/src/tasks/build_publish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct Input {
pub build_name: String,
pub runtime: config::build::Runtime,
#[serde(default)]
pub skip_upgrade: bool,
pub upgrade: bool,
}

#[derive(Serialize)]
Expand Down Expand Up @@ -64,7 +64,7 @@ impl task::Task for Task {
input.build_name.clone(),
input.build_tags.clone(),
&input.runtime,
input.skip_upgrade,
input.upgrade,
)
.await?;

Expand All @@ -83,7 +83,7 @@ async fn build_and_upload(
build_name: String,
extra_build_tags: Option<HashMap<String, String>>,
runtime: &Runtime,
skip_upgrade: bool,
upgrade: bool,
) -> Result<Uuid> {
task.log("");

Expand Down Expand Up @@ -171,8 +171,7 @@ async fn build_and_upload(
}
complete_res.context("complete_res")?;

// Upgrade actors
if !skip_upgrade {
if upgrade {
task.log(format!("[Upgrading Actors]"));
let res = apis::actors_api::actors_upgrade_all(
&ctx.openapi_config_cloud,
Expand All @@ -193,8 +192,6 @@ async fn build_and_upload(
res.count,
if res.count == 1 { "" } else { "s" }
));
} else {
task.log(format!("[Skipping Actor Upgrade]"));
}

let hub_origin = &ctx.bootstrap.origins.hub;
Expand Down
4 changes: 2 additions & 2 deletions packages/toolchain/toolchain/src/tasks/deploy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct Input {
pub filter_tags: Option<HashMap<String, String>>,
pub build_tags: Option<HashMap<String, String>>,
pub version_name: Option<String>,
pub skip_upgrade: bool,
pub upgrade: bool,
}

#[derive(Serialize)]
Expand Down Expand Up @@ -132,7 +132,7 @@ async fn perform_builds(
version_name: version_name.to_string(),
build_name: build_name.to_string(),
runtime: build.runtime.clone(),
skip_upgrade: input.skip_upgrade,
upgrade: input.upgrade,
},
)
.await?;
Expand Down
Loading