From 3ac5fcf7c68876c960c29dc63abbc1f065e341b3 Mon Sep 17 00:00:00 2001 From: ZzIsGod1019 <1498852723@qq.com> Date: Fri, 8 Mar 2024 01:09:04 -0800 Subject: [PATCH 1/3] reach: fix missing iam base url --- .../flow/tests/config/conf-default.toml | 2 +- sdk/invoke/src/invoke_enumeration.rs | 40 ++++++++++--------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/middleware/flow/tests/config/conf-default.toml b/middleware/flow/tests/config/conf-default.toml index e738508db..6712dca91 100644 --- a/middleware/flow/tests/config/conf-default.toml +++ b/middleware/flow/tests/config/conf-default.toml @@ -6,7 +6,7 @@ [csm.flow.invoke] spi_app_id = "app001" [csm.flow.invoke.module_urls] -Kv = "https://localhost:8080/spi-kv" +kv = "https://localhost:8080/spi-kv" [fw.web_server] port = 8080 diff --git a/sdk/invoke/src/invoke_enumeration.rs b/sdk/invoke/src/invoke_enumeration.rs index 2521a6fa4..92351f0e8 100644 --- a/sdk/invoke/src/invoke_enumeration.rs +++ b/sdk/invoke/src/invoke_enumeration.rs @@ -1,10 +1,12 @@ +use std::fmt::Display; + use serde::{Deserialize, Serialize}; #[cfg(feature = "reldb-core")] use tardis::db::sea_orm; -use tardis::{derive_more::Display, web::poem_openapi}; +use tardis::{web::poem_openapi}; -#[cfg(feature = "reldb-core")] -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum, strum::EnumString)] +#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] +#[cfg_attr(feature = "reldb-core", derive(strum::EnumString))] pub enum InvokeModuleKind { #[oai(rename = "search")] Search, @@ -30,18 +32,20 @@ pub enum InvokeModuleKind { Event, } -#[cfg(not(feature = "reldb-core"))] -#[derive(Display, Clone, Debug, PartialEq, Eq, Deserialize, Serialize, poem_openapi::Enum)] -pub enum InvokeModuleKind { - Search, - Plugin, - Kv, - Log, - Object, - Cache, - Graph, - Stats, - Schedule, - Iam, - Event, -} +impl Display for InvokeModuleKind { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + InvokeModuleKind::Search => write!(f, "search"), + InvokeModuleKind::Plugin => write!(f, "Plugin"), + InvokeModuleKind::Kv => write!(f, "kv"), + InvokeModuleKind::Log => write!(f, "log"), + InvokeModuleKind::Object => write!(f, "object"), + InvokeModuleKind::Cache => write!(f, "cache"), + InvokeModuleKind::Graph => write!(f, "graph"), + InvokeModuleKind::Stats => write!(f, "stats"), + InvokeModuleKind::Schedule => write!(f, "schedule"), + InvokeModuleKind::Iam => write!(f, "iam"), + InvokeModuleKind::Event => write!(f, "event"), + } + } +} \ No newline at end of file From 25537b4e7f624a458373a1f907778b65c7c6194a Mon Sep 17 00:00:00 2001 From: ZzIsGod1019 <1498852723@qq.com> Date: Sat, 9 Mar 2024 20:35:51 -0800 Subject: [PATCH 2/3] merge --- sdk/invoke/src/invoke_enumeration.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdk/invoke/src/invoke_enumeration.rs b/sdk/invoke/src/invoke_enumeration.rs index 661e2bc73..04e1a7440 100644 --- a/sdk/invoke/src/invoke_enumeration.rs +++ b/sdk/invoke/src/invoke_enumeration.rs @@ -33,11 +33,7 @@ pub enum InvokeModuleKind { Event, } -<<<<<<< HEAD -impl Display for InvokeModuleKind { -======= impl std::fmt::Display for InvokeModuleKind { ->>>>>>> 49f8e058103a0bafc185e2c6639356573401a473 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { InvokeModuleKind::Search => write!(f, "search"), From da6b29cd7c1c9bc02992d137eb1acc05bfc8ab77 Mon Sep 17 00:00:00 2001 From: ZzIsGod1019 <1498852723@qq.com> Date: Mon, 11 Mar 2024 01:26:22 -0700 Subject: [PATCH 3/3] update tardis version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 52eb0663c..2b11e7f2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ strum = { version = "0.25", features = ["derive"] } # tardis # tardis = { version = "0.1.0-rc.9" } # tardis = { path = "../tardis/tardis" } -tardis = { git = "https://github.com/ideal-world/tardis.git", rev = "8d37621" } +tardis = { git = "https://github.com/ideal-world/tardis.git", rev = "aa8931b" } #spacegate spacegate-kernel = { git = "https://github.com/ideal-world/spacegate.git", rev = "f37a81a", features = [