Skip to content

Commit 609928e

Browse files
MasterPtatoNathanFlurry
authored andcommitted
fix(toolchain): dont upgrade for deploys by default
1 parent 1f02007 commit 609928e

File tree

6 files changed

+15
-18
lines changed

6 files changed

+15
-18
lines changed

packages/toolchain/cli/src/commands/actor/create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl Opts {
203203
skip_route_creation: None,
204204
keep_existing_routes: None,
205205
non_interactive: false,
206-
skip_upgrade: false,
206+
upgrade: false,
207207
})
208208
.await?;
209209

packages/toolchain/cli/src/commands/build/publish.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ pub struct Opts {
5656
#[clap(long)]
5757
unstable_compression: Option<config::build::Compression>,
5858

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

6363
// Docker options
6464
/// Specify a pre-built Docker image instead of building from a Dockerfile
@@ -174,7 +174,7 @@ impl Opts {
174174
version_name,
175175
build_name: self.name.clone(),
176176
runtime,
177-
skip_upgrade: self.skip_upgrade,
177+
upgrade: self.upgrade,
178178
},
179179
)
180180
.await?;

packages/toolchain/cli/src/commands/deploy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pub struct Opts {
3131
#[clap(long)]
3232
non_interactive: bool,
3333

34-
/// Skip upgrading actors
34+
/// Update existing actors with the new build after deploying
3535
#[clap(long)]
36-
skip_upgrade: bool,
36+
upgrade: bool,
3737
}
3838

3939
impl Opts {
@@ -65,7 +65,7 @@ impl Opts {
6565
skip_route_creation: self.skip_route_creation,
6666
keep_existing_routes: self.keep_existing_routes,
6767
non_interactive: self.non_interactive,
68-
skip_upgrade: self.skip_upgrade,
68+
upgrade: self.upgrade,
6969
})
7070
.await?;
7171

packages/toolchain/cli/src/util/deploy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub struct DeployOpts<'a> {
9191
pub skip_route_creation: Option<bool>,
9292
pub keep_existing_routes: Option<bool>,
9393
pub non_interactive: bool,
94-
pub skip_upgrade: bool,
94+
pub upgrade: bool,
9595
}
9696

9797
pub async fn deploy(opts: DeployOpts<'_>) -> Result<Vec<Uuid>> {
@@ -258,7 +258,7 @@ pub async fn deploy(opts: DeployOpts<'_>) -> Result<Vec<Uuid>> {
258258
filter_tags: opts.filter_tags.clone(),
259259
build_tags: opts.build_tags.clone(),
260260
version_name: opts.version.clone(),
261-
skip_upgrade: opts.skip_upgrade,
261+
upgrade: opts.upgrade,
262262
},
263263
)
264264
.await?;

packages/toolchain/toolchain/src/tasks/build_publish/mod.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct Input {
2626
pub build_name: String,
2727
pub runtime: config::build::Runtime,
2828
#[serde(default)]
29-
pub skip_upgrade: bool,
29+
pub upgrade: bool,
3030
}
3131

3232
#[derive(Serialize)]
@@ -64,7 +64,7 @@ impl task::Task for Task {
6464
input.build_name.clone(),
6565
input.build_tags.clone(),
6666
&input.runtime,
67-
input.skip_upgrade,
67+
input.upgrade,
6868
)
6969
.await?;
7070

@@ -83,7 +83,7 @@ async fn build_and_upload(
8383
build_name: String,
8484
extra_build_tags: Option<HashMap<String, String>>,
8585
runtime: &Runtime,
86-
skip_upgrade: bool,
86+
upgrade: bool,
8787
) -> Result<Uuid> {
8888
task.log("");
8989

@@ -171,8 +171,7 @@ async fn build_and_upload(
171171
}
172172
complete_res.context("complete_res")?;
173173

174-
// Upgrade actors
175-
if !skip_upgrade {
174+
if upgrade {
176175
task.log(format!("[Upgrading Actors]"));
177176
let res = apis::actors_api::actors_upgrade_all(
178177
&ctx.openapi_config_cloud,
@@ -193,8 +192,6 @@ async fn build_and_upload(
193192
res.count,
194193
if res.count == 1 { "" } else { "s" }
195194
));
196-
} else {
197-
task.log(format!("[Skipping Actor Upgrade]"));
198195
}
199196

200197
let hub_origin = &ctx.bootstrap.origins.hub;

packages/toolchain/toolchain/src/tasks/deploy/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct Input {
1818
pub filter_tags: Option<HashMap<String, String>>,
1919
pub build_tags: Option<HashMap<String, String>>,
2020
pub version_name: Option<String>,
21-
pub skip_upgrade: bool,
21+
pub upgrade: bool,
2222
}
2323

2424
#[derive(Serialize)]
@@ -132,7 +132,7 @@ async fn perform_builds(
132132
version_name: version_name.to_string(),
133133
build_name: build_name.to_string(),
134134
runtime: build.runtime.clone(),
135-
skip_upgrade: input.skip_upgrade,
135+
upgrade: input.upgrade,
136136
},
137137
)
138138
.await?;

0 commit comments

Comments
 (0)