From 3cc4b5f9db39116b2c90617374cddfb533a031bf Mon Sep 17 00:00:00 2001 From: MasterPtato Date: Thu, 5 Jun 2025 01:10:56 +0000 Subject: [PATCH] chore: fix dc wf --- packages/core/services/cluster/src/types.rs | 4 +++- .../cluster/src/workflows/datacenter/mod.rs | 20 +++++++++++++------ .../install_scripts/components/vector.rs | 1 - .../pegboard/src/workflows/actor/runtime.rs | 1 - .../pegboard/src/workflows/actor/setup.rs | 3 +-- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/packages/core/services/cluster/src/types.rs b/packages/core/services/cluster/src/types.rs index ca74c26248..d58dba79b8 100644 --- a/packages/core/services/cluster/src/types.rs +++ b/packages/core/services/cluster/src/types.rs @@ -157,7 +157,9 @@ pub struct Server { pub state: ServerState, } -#[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, FromRepr)] +#[derive( + Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, FromRepr, +)] pub enum ServerState { Provisioning = 0, Installing = 1, diff --git a/packages/core/services/cluster/src/workflows/datacenter/mod.rs b/packages/core/services/cluster/src/workflows/datacenter/mod.rs index 025cab686e..04cbe459c6 100644 --- a/packages/core/services/cluster/src/workflows/datacenter/mod.rs +++ b/packages/core/services/cluster/src/workflows/datacenter/mod.rs @@ -47,13 +47,21 @@ pub(crate) async fn cluster_datacenter(ctx: &mut WorkflowCtx, input: &Input) -> }; match ctx.check_version(2).await? { - 1 => ctx.activity(v1).await?, + 1 => { + // We remove here because the hash doesn't calculate correctly anymore + ctx.removed::>().await?; + } + 2 => { + // We remove here because the hash doesn't calculate correctly anymore + ctx.removed::>().await?; + } _latest => { - ctx.activity(InsertDbInputV2 { - v1, - guard_public_hostname: input.guard_public_hostname.clone(), - }) - .await? + ctx.v(3) + .activity(InsertDbInputV2 { + v1, + guard_public_hostname: input.guard_public_hostname.clone(), + }) + .await? } } } diff --git a/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/vector.rs b/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/vector.rs index c8b9337e0a..752fc08017 100644 --- a/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/vector.rs +++ b/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/vector.rs @@ -235,4 +235,3 @@ pub fn configure(namespace: &str, config: &Config, pool_type: PoolType) -> Globa Ok(include_str!("../files/vector_configure.sh").replace("__VECTOR_CONFIG__", &config_str)) } - diff --git a/packages/edge/services/pegboard/src/workflows/actor/runtime.rs b/packages/edge/services/pegboard/src/workflows/actor/runtime.rs index d9d674252a..b2915be492 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/runtime.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/runtime.rs @@ -9,7 +9,6 @@ use foundationdb::{ }; use futures_util::{FutureExt, TryStreamExt}; use sqlx::Acquire; -use util::serde::AsHashableExt; use super::{ destroy::{self, KillCtx}, diff --git a/packages/edge/services/pegboard/src/workflows/actor/setup.rs b/packages/edge/services/pegboard/src/workflows/actor/setup.rs index 9037a3889a..6e4cf28e52 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/setup.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/setup.rs @@ -4,9 +4,8 @@ use cluster::types::BuildDeliveryMethod; use fdb_util::FormalKey; use foundationdb as fdb; use sqlx::Acquire; -use util::serde::AsHashableExt; -use super::{analytics::InsertClickHouseInput, Input, Port}; +use super::{Input, Port}; use crate::{ keys, protocol, types::{ActorLifecycle, ActorResources, GameGuardProtocol, NetworkMode, Routing},