diff --git a/app/web/src/store/func_runs.store.ts b/app/web/src/store/func_runs.store.ts index b729814a35..8b34bdc0a8 100644 --- a/app/web/src/store/func_runs.store.ts +++ b/app/web/src/store/func_runs.store.ts @@ -44,7 +44,6 @@ export enum FuncBackendKind { JsAttribute, JsAuthentication, Json, - JsReconciliation, JsSchemaVariantDefinition, JsValidation, Map, @@ -65,7 +64,6 @@ export enum FuncBackendResponseType { Map, Object, Qualification, - Reconciliation, SchemaVariantDefinition, String, Unset, diff --git a/bin/cyclone/src/args.rs b/bin/cyclone/src/args.rs index def0a98efb..209bc92b85 100644 --- a/bin/cyclone/src/args.rs +++ b/bin/cyclone/src/args.rs @@ -107,14 +107,6 @@ pub(crate) struct Args { #[arg(long, group = "action_run")] pub(crate) disable_action_run: bool, - /// Enables reconciliation endpoint. - #[arg(long, group = "reconciliation")] - pub(crate) enable_reconciliation: bool, - - /// Disables reconciliation endpoint. - #[arg(long, group = "reconciliation")] - pub(crate) disable_reconciliation: bool, - /// Enables configuration endpoint. #[arg(long, group = "configuration")] pub(crate) enable_configuration: bool, diff --git a/bin/lang-js/src/function.ts b/bin/lang-js/src/function.ts index 15c991b34e..ad4312d778 100644 --- a/bin/lang-js/src/function.ts +++ b/bin/lang-js/src/function.ts @@ -8,9 +8,6 @@ import joi_validation, { JoiValidationFunc, JoiValidationResult, } from "./function_kinds/joi_validation"; -import reconciliation, { - ReconciliationFunc, -} from "./function_kinds/reconciliation"; import resolver_function, { ResolverFunc, } from "./function_kinds/resolver_function"; @@ -27,7 +24,6 @@ export enum FunctionKind { Before = "before", ResolverFunction = "resolverfunction", Validation = "validation", - Reconciliation = "reconciliation", SchemaVariantDefinition = "schemaVariantDefinition", } @@ -126,15 +122,6 @@ export async function executeFunction(kind: FunctionKind, request: Request, time }), ); - break; - case FunctionKind.Reconciliation: - result = await executor( - ctx, - request as ReconciliationFunc, - kind, - timeout, - reconciliation, - ); break; case FunctionKind.ResolverFunction: result = await executor( diff --git a/bin/lang-js/src/function_kinds/reconciliation.ts b/bin/lang-js/src/function_kinds/reconciliation.ts deleted file mode 100644 index 5037032ae9..0000000000 --- a/bin/lang-js/src/function_kinds/reconciliation.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { NodeVM } from "vm2"; -import * as _ from "lodash-es"; -import { Debug } from "../debug"; -import { - failureExecution, - Func, - ResultFailure, - ResultSuccess, -} from "../function"; -import { RequestCtx } from "../request"; - -const debug = Debug("langJs:reconciliation"); - -export interface ReconciliationFunc extends Func { - args: unknown; -} - -export type ReconciliationResult = - | ReconciliationResultSuccess - | ReconciliationResultFailure; - -export interface ReconciliationResultSuccess extends ResultSuccess { - updates: { [key: string]: unknown }; - actions: string[]; - message: string | undefined; -} - -export type ReconciliationResultFailure = ResultFailure; - -async function execute( - vm: NodeVM, - { executionId }: RequestCtx, - { args }: ReconciliationFunc, - code: string, -): Promise { - let reconciliationResult: Record; - try { - const reconciliationRunner = vm.run(code); - // Node(paulo): NodeVM doesn't support async rejection, we need a better way of handling it - reconciliationResult = await new Promise((resolve) => { - reconciliationRunner(args, (resolution: Record) => resolve(resolution)); - }); - - if (_.isUndefined(reconciliationResult) || _.isNull(reconciliationResult)) { - return { - protocol: "result", - status: "failure", - executionId, - error: { - kind: "InvalidReturnType", - message: "Return type must not be null or undefined", - }, - }; - } - - if (!_.isObject(reconciliationResult.updates)) { - return { - protocol: "result", - status: "failure", - executionId, - error: { - kind: "ReconciliationFieldWrongType", - message: "The updates field type must be an object", - }, - }; - } - - if ( - !_.isArray(reconciliationResult.actions) - || reconciliationResult.actions.some((v) => typeof v !== "string") - ) { - return { - protocol: "result", - status: "failure", - executionId, - error: { - kind: "ReconciliationFieldWrongType", - message: "The actions field type must be an array of strings", - }, - }; - } - - return { - protocol: "result", - status: "success", - executionId, - error: reconciliationResult.error as string | undefined, - updates: reconciliationResult.updates as { [key: string]: unknown }, - actions: reconciliationResult.actions as string[], - message: reconciliationResult.message as string | undefined, - }; - } catch (err) { - return failureExecution(err as Error, executionId); - } -} - -const wrapCode = (code: string, handle: string) => ` -module.exports = function(arg, callback) { - ${code} - const returnValue = ${handle}(arg, callback); - if (returnValue instanceof Promise) { - returnValue.then((data) => callback(data)) - .catch((err) => callback({ - message: err.message, - updates: {}, - actions: [] - })); - } else { - callback(returnValue); - } -};`; - -export default { - debug, - execute, - wrapCode, -}; diff --git a/bin/lang-js/src/request.ts b/bin/lang-js/src/request.ts index 4ddbec6816..a2260f1146 100644 --- a/bin/lang-js/src/request.ts +++ b/bin/lang-js/src/request.ts @@ -1,7 +1,6 @@ import { ActionRunFunc } from "./function_kinds/action_run"; import { BeforeFunc } from "./function_kinds/before"; import { JoiValidationFunc } from "./function_kinds/joi_validation"; -import { ReconciliationFunc } from "./function_kinds/reconciliation"; import { ResolverFunc } from "./function_kinds/resolver_function"; import { SchemaVariantDefinitionFunc, @@ -11,7 +10,6 @@ export type AnyFunction = | ActionRunFunc | JoiValidationFunc | BeforeFunc - | ReconciliationFunc | ResolverFunc | SchemaVariantDefinitionFunc; diff --git a/lib/cyclone-client/src/client.rs b/lib/cyclone-client/src/client.rs index dc657a96cb..5522a72466 100644 --- a/lib/cyclone-client/src/client.rs +++ b/lib/cyclone-client/src/client.rs @@ -11,10 +11,9 @@ use std::{ use async_trait::async_trait; use cyclone_core::{ ActionRunRequest, ActionRunResultSuccess, CycloneRequest, LivenessStatus, - LivenessStatusParseError, ReadinessStatus, ReadinessStatusParseError, ReconciliationRequest, - ReconciliationResultSuccess, ResolverFunctionRequest, ResolverFunctionResultSuccess, - SchemaVariantDefinitionRequest, SchemaVariantDefinitionResultSuccess, ValidationRequest, - ValidationResultSuccess, + LivenessStatusParseError, ReadinessStatus, ReadinessStatusParseError, ResolverFunctionRequest, + ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, + SchemaVariantDefinitionResultSuccess, ValidationRequest, ValidationResultSuccess, }; use http::{ request::Builder, @@ -152,14 +151,6 @@ where request: CycloneRequest, ) -> result::Result, ClientError>; - async fn prepare_reconciliation_execution( - &mut self, - request: CycloneRequest, - ) -> result::Result< - Execution, - ClientError, - >; - async fn prepare_validation_execution( &mut self, request: CycloneRequest, @@ -301,17 +292,6 @@ where Ok(execution::new_unstarted_execution(stream, request)) } - async fn prepare_reconciliation_execution( - &mut self, - request: CycloneRequest, - ) -> result::Result< - Execution, - ClientError, - > { - let stream = self.websocket_stream("/execute/reconciliation").await?; - Ok(execution::new_unstarted_execution(stream, request)) - } - async fn prepare_validation_execution( &mut self, request: CycloneRequest, @@ -1231,155 +1211,6 @@ mod tests { } } - #[allow(clippy::disallowed_methods)] // `$RUST_LOG` is checked for in macro - #[test(tokio::test)] - async fn http_execute_reconciliation() { - let mut builder = Config::builder(); - let mut client = http_client_for_running_server(builder.enable_reconciliation(true)).await; - - let req = ReconciliationRequest { - execution_id: "1234".to_string(), - handler: "workit".to_string(), - args: Default::default(), - code_base64: base64_encode( - r#"function workit() { - console.log('first'); - console.log('second'); - return { updates: { "myid": true }, actions: ["run"] }; - }"#, - ), - before: vec![], - }; - - // Start the protocol - let mut progress = client - .prepare_reconciliation_execution(CycloneRequest::from_parts(req, Default::default())) - .await - .expect("failed to establish websocket stream") - .start() - .await - .expect("failed to start protocol"); - - // Consume the output messages - loop { - match progress.next().await { - Some(Ok(ProgressMessage::OutputStream(output))) => { - assert_eq!(output.message, "first"); - break; - } - Some(Ok(ProgressMessage::Heartbeat)) => continue, - Some(Err(err)) => panic!("failed to receive 'first' output: err={err:?}"), - None => panic!("output stream ended early"), - }; - } - loop { - match progress.next().await { - Some(Ok(ProgressMessage::OutputStream(output))) => { - assert_eq!(output.message, "second"); - break; - } - Some(Ok(ProgressMessage::Heartbeat)) => continue, - Some(Err(err)) => panic!("failed to receive 'second' output: err={err:?}"), - None => panic!("output stream ended early"), - } - } - loop { - match progress.next().await { - None => { - assert!(true); - break; - } - Some(Ok(ProgressMessage::Heartbeat)) => continue, - Some(unexpected) => panic!("output stream should be done: {unexpected:?}"), - }; - } - let result = progress.finish().await.expect("failed to return result"); - match result { - FunctionResult::Success(_success) => { - // TODO(fnichol): assert some result data - } - FunctionResult::Failure(failure) => { - panic!("result should be success; failure={failure:?}") - } - } - } - - #[allow(clippy::disallowed_methods)] // `$RUST_LOG` is checked for in macro - #[test(tokio::test)] - async fn uds_execute_reconciliation() { - let tmp_socket = rand_uds(); - let mut builder = Config::builder(); - let mut client = - uds_client_for_running_server(builder.enable_reconciliation(true), &tmp_socket).await; - - let req = ReconciliationRequest { - execution_id: "1234".to_string(), - handler: "workit".to_string(), - args: Default::default(), - code_base64: base64_encode( - r#"function workit() { - console.log('first'); - console.log('second'); - return { updates: { "myid": true }, actions: ["run"] }; - }"#, - ), - before: vec![], - }; - - // Start the protocol - let mut progress = client - .prepare_reconciliation_execution(CycloneRequest::from_parts(req, Default::default())) - .await - .expect("failed to establish websocket stream") - .start() - .await - .expect("failed to start protocol"); - - // Consume the output messages - loop { - match progress.next().await { - Some(Ok(ProgressMessage::OutputStream(output))) => { - assert_eq!(output.message, "first"); - break; - } - Some(Ok(ProgressMessage::Heartbeat)) => continue, - Some(Err(err)) => panic!("failed to receive 'first' output: err={err:?}"), - None => panic!("output stream ended early"), - }; - } - loop { - match progress.next().await { - Some(Ok(ProgressMessage::OutputStream(output))) => { - assert_eq!(output.message, "second"); - break; - } - Some(Ok(ProgressMessage::Heartbeat)) => continue, - Some(Err(err)) => panic!("failed to receive 'second' output: err={err:?}"), - None => panic!("output stream ended early"), - }; - } - loop { - match progress.next().await { - None => { - assert!(true); - break; - } - Some(Ok(ProgressMessage::Heartbeat)) => continue, - Some(unexpected) => panic!("output stream should be done: {unexpected:?}"), - }; - } - // Get the result - let result = progress.finish().await.expect("failed to return result"); - match result { - FunctionResult::Success(_success) => { - // TODO(fnichol): assert some result data - } - FunctionResult::Failure(failure) => { - panic!("result should be success; failure={failure:?}") - } - } - } - #[allow(clippy::disallowed_methods)] // `$RUST_LOG` is checked for in macro #[test(tokio::test)] async fn http_execute_schema_variant_definition() { diff --git a/lib/cyclone-client/src/lib.rs b/lib/cyclone-client/src/lib.rs index 708e5adfc6..c89061c2c4 100644 --- a/lib/cyclone-client/src/lib.rs +++ b/lib/cyclone-client/src/lib.rs @@ -6,9 +6,9 @@ mod watch; pub use client::{Client, ClientConfig, ClientError, CycloneClient, HttpClient, UdsClient}; pub use cyclone_core::{ ActionRunRequest, ActionRunResultSuccess, CycloneRequest, LivenessStatus, - LivenessStatusParseError, ReadinessStatus, ReadinessStatusParseError, ReconciliationRequest, - ReconciliationResultSuccess, ResolverFunctionRequest, ResolverFunctionResultSuccess, - SchemaVariantDefinitionRequest, SchemaVariantDefinitionResultSuccess, SensitiveStrings, + LivenessStatusParseError, ReadinessStatus, ReadinessStatusParseError, ResolverFunctionRequest, + ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, + SchemaVariantDefinitionResultSuccess, SensitiveStrings, }; pub use execution::{Execution, ExecutionError}; pub use hyper::client::connect::Connection; diff --git a/lib/cyclone-core/src/lib.rs b/lib/cyclone-core/src/lib.rs index ec3c103135..acfd54517f 100644 --- a/lib/cyclone-core/src/lib.rs +++ b/lib/cyclone-core/src/lib.rs @@ -20,7 +20,6 @@ mod liveness; pub mod process; mod progress; mod readiness; -mod reconciliation; mod request; mod resolver_function; mod schema_variant_definition; @@ -40,7 +39,6 @@ pub use progress::{ FunctionResultFailureErrorKind, Message, OutputStream, ProgressMessage, }; pub use readiness::{ReadinessStatus, ReadinessStatusParseError}; -pub use reconciliation::{ReconciliationRequest, ReconciliationResultSuccess}; pub use request::CycloneRequest; pub use resolver_function::{ ResolverFunctionComponent, ResolverFunctionRequest, ResolverFunctionResponseType, diff --git a/lib/cyclone-core/src/progress.rs b/lib/cyclone-core/src/progress.rs index 2edfdee2e2..48adc14a49 100644 --- a/lib/cyclone-core/src/progress.rs +++ b/lib/cyclone-core/src/progress.rs @@ -150,7 +150,6 @@ pub enum FunctionResultFailureErrorKind { ActionFieldWrongType, InvalidReturnType, KilledExecution, - ReconciliationFieldWrongType, UserCodeException(String), VeritechServer, } diff --git a/lib/cyclone-core/src/reconciliation.rs b/lib/cyclone-core/src/reconciliation.rs deleted file mode 100644 index a4bde7c3db..0000000000 --- a/lib/cyclone-core/src/reconciliation.rs +++ /dev/null @@ -1,22 +0,0 @@ -use crate::BeforeFunction; -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; - -#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct ReconciliationRequest { - pub execution_id: String, - pub handler: String, - pub code_base64: String, - pub args: serde_json::Value, - pub before: Vec, -} - -#[derive(Debug, Deserialize, Eq, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct ReconciliationResultSuccess { - pub execution_id: String, - pub updates: HashMap, - pub actions: Vec, - pub message: Option, -} diff --git a/lib/cyclone-server/src/config.rs b/lib/cyclone-server/src/config.rs index 5508e7ece7..7f23947f70 100644 --- a/lib/cyclone-server/src/config.rs +++ b/lib/cyclone-server/src/config.rs @@ -37,9 +37,6 @@ pub struct Config { #[builder(default = "true")] enable_action_run: bool, - #[builder(default = "true")] - enable_reconciliation: bool, - #[builder(default = "true")] enable_validation: bool, @@ -99,12 +96,6 @@ impl Config { self.enable_action_run } - /// Gets a reference to the config's enable reconciliation. - #[must_use] - pub fn enable_reconciliation(&self) -> bool { - self.enable_reconciliation - } - /// Gets a reference to the config's enable validation #[must_use] pub fn enable_validation(&self) -> bool { diff --git a/lib/cyclone-server/src/handlers.rs b/lib/cyclone-server/src/handlers.rs index 3a710ed410..74f227b0ff 100644 --- a/lib/cyclone-server/src/handlers.rs +++ b/lib/cyclone-server/src/handlers.rs @@ -14,8 +14,7 @@ use axum::{ }; use cyclone_core::{ ActionRunRequest, ActionRunResultSuccess, LivenessStatus, Message, ReadinessStatus, - ReconciliationRequest, ReconciliationResultSuccess, ResolverFunctionRequest, - ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, + ResolverFunctionRequest, ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, SchemaVariantDefinitionResultSuccess, ValidationRequest, ValidationResultSuccess, }; use hyper::StatusCode; @@ -27,8 +26,8 @@ use super::extract::LimitRequestGuard; use crate::{ execution::{self, Execution}, result::{ - LangServerActionRunResultSuccess, LangServerReconciliationResultSuccess, - LangServerResolverFunctionResultSuccess, LangServerValidationResultSuccess, + LangServerActionRunResultSuccess, LangServerResolverFunctionResultSuccess, + LangServerValidationResultSuccess, }, state::{ LangServerFunctionTimeout, LangServerPath, LangServerProcessTimeout, TelemetryLevel, @@ -191,37 +190,6 @@ pub async fn ws_execute_action_run( }) } -pub async fn ws_execute_reconciliation( - wsu: WebSocketUpgrade, - State(lang_server_path): State, - State(telemetry_level): State, - State(lang_server_function_timeout): State, - State(lang_server_process_timeout): State, - limit_request_guard: LimitRequestGuard, - Extension(request_span): Extension, -) -> impl IntoResponse { - let lang_server_path = lang_server_path.as_path().to_path_buf(); - let telemetry_level = telemetry_level.is_debug_or_lower().await; - wsu.on_upgrade(move |socket| { - let request: PhantomData = PhantomData; - let lang_server_success: PhantomData = PhantomData; - let success: PhantomData = PhantomData; - handle_socket( - socket, - lang_server_path, - telemetry_level, - lang_server_function_timeout.inner(), - lang_server_process_timeout.inner(), - limit_request_guard, - "reconciliation".to_owned(), - request, - lang_server_success, - success, - request_span.into_inner(), - ) - }) -} - pub async fn ws_execute_schema_variant_definition( wsu: WebSocketUpgrade, State(lang_server_path): State, diff --git a/lib/cyclone-server/src/result/mod.rs b/lib/cyclone-server/src/result/mod.rs index 2fda074b7d..00b7c81be0 100644 --- a/lib/cyclone-server/src/result/mod.rs +++ b/lib/cyclone-server/src/result/mod.rs @@ -1,9 +1,7 @@ mod action_run; -mod reconciliation; mod resolver_function; mod validation; pub use action_run::LangServerActionRunResultSuccess; -pub use reconciliation::LangServerReconciliationResultSuccess; pub use resolver_function::LangServerResolverFunctionResultSuccess; pub use validation::LangServerValidationResultSuccess; diff --git a/lib/cyclone-server/src/result/reconciliation.rs b/lib/cyclone-server/src/result/reconciliation.rs deleted file mode 100644 index 985ed5e1b6..0000000000 --- a/lib/cyclone-server/src/result/reconciliation.rs +++ /dev/null @@ -1,26 +0,0 @@ -use cyclone_core::ReconciliationResultSuccess; -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; - -/// This struct contains the lang-js server execution response. All fields without the -/// `#[serde(default)]` macro must be populated. -#[derive(Debug, Deserialize, Eq, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct LangServerReconciliationResultSuccess { - pub execution_id: String, - pub updates: HashMap, - pub actions: Vec, - #[serde(default)] - pub message: Option, -} - -impl From for ReconciliationResultSuccess { - fn from(value: LangServerReconciliationResultSuccess) -> Self { - Self { - execution_id: value.execution_id, - updates: value.updates, - actions: value.actions, - message: value.message, - } - } -} diff --git a/lib/cyclone-server/src/routes.rs b/lib/cyclone-server/src/routes.rs index 5c97bdcb93..cbd0ba6bdd 100644 --- a/lib/cyclone-server/src/routes.rs +++ b/lib/cyclone-server/src/routes.rs @@ -93,12 +93,6 @@ fn execute_routes(config: &Config, shutdown_tx: mpsc::Sender) -> router = router.merge(Router::new().route("/command", get(handlers::ws_execute_action_run))); } - if config.enable_reconciliation() { - debug!("enabling reconciliation endpoint"); - router = router.merge( - Router::new().route("/reconciliation", get(handlers::ws_execute_reconciliation)), - ); - } if config.enable_schema_variant_definition() { debug!("enabling schema variant definition endpoint"); router = router.merge(Router::new().route( diff --git a/lib/dal/src/builtins/func/defaultReconciliation.json b/lib/dal/src/builtins/func/defaultReconciliation.json deleted file mode 100644 index ea032e572b..0000000000 --- a/lib/dal/src/builtins/func/defaultReconciliation.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "kind": "JsReconciliation", - "response_type": "Reconciliation", - "code_file": "defaultReconciliation.ts", - "code_entrypoint": "reconciliation", - "arguments": [] -} diff --git a/lib/dal/src/builtins/func/defaultReconciliation.ts b/lib/dal/src/builtins/func/defaultReconciliation.ts deleted file mode 100644 index d0b78b284d..0000000000 --- a/lib/dal/src/builtins/func/defaultReconciliation.ts +++ /dev/null @@ -1,20 +0,0 @@ -function reconciliation(arg: Input) { - // Map of attribute value ids of the domain sub-tree to the new value (from the resource) - const updates = {}; - - // Set of action names to be executed to update the resource based on the new domain - const actions = new Set(); - - for (const value of Object.values(arg)) { - // Updates domain to fit the new resource - updates[value.domain.id] = value.normalizedResource; - - actions.add("delete"); - actions.add("create"); - } - - return { - updates, - actions: Array.from(actions), - }; -} diff --git a/lib/dal/src/func.rs b/lib/dal/src/func.rs index 155153a75e..6ff1e021da 100644 --- a/lib/dal/src/func.rs +++ b/lib/dal/src/func.rs @@ -76,8 +76,6 @@ pub enum FuncError { Transactions(#[from] TransactionsError), #[error("could not acquire lock: {0}")] TryLock(#[from] tokio::sync::TryLockError), - #[error("unable to determine the function type for backend kind ({0}) and backend response type ({1})")] - UnknownFunctionType(FuncBackendKind, FuncBackendResponseType), #[error("utf8 error: {0}")] Utf8(#[from] FromUtf8Error), #[error("workspace snapshot error: {0}")] diff --git a/lib/dal/src/func/authoring/ts_types.rs b/lib/dal/src/func/authoring/ts_types.rs index fbf651fec2..d99f1feaae 100644 --- a/lib/dal/src/func/authoring/ts_types.rs +++ b/lib/dal/src/func/authoring/ts_types.rs @@ -43,13 +43,6 @@ pub(crate) fn compile_return_types( "type Output { valid: boolean; message: string; -}" - } - FuncBackendResponseType::Reconciliation => { - "type Output { - updates: { [key: string]: unknown }; - actions: string[]; - message: string | null; }" } FuncBackendResponseType::Action => { diff --git a/lib/dal/src/func/backend.rs b/lib/dal/src/func/backend.rs index 554133026b..912f6045de 100644 --- a/lib/dal/src/func/backend.rs +++ b/lib/dal/src/func/backend.rs @@ -23,7 +23,6 @@ pub mod identity; pub mod integer; pub mod js_action; pub mod js_attribute; -pub mod js_reconciliation; pub mod js_schema_variant_definition; pub mod json; pub mod map; @@ -88,7 +87,6 @@ pub enum FuncBackendKind { JsAttribute, JsAuthentication, Json, - JsReconciliation, JsSchemaVariantDefinition, JsValidation, Map, @@ -110,7 +108,6 @@ impl From for si_events::FuncBackendKind { FuncBackendKind::JsAttribute => si_events::FuncBackendKind::JsAttribute, FuncBackendKind::JsAuthentication => si_events::FuncBackendKind::JsAuthentication, FuncBackendKind::Json => si_events::FuncBackendKind::Json, - FuncBackendKind::JsReconciliation => si_events::FuncBackendKind::JsReconciliation, FuncBackendKind::JsSchemaVariantDefinition => { si_events::FuncBackendKind::JsSchemaVariantDefinition } @@ -136,7 +133,6 @@ impl From for FuncBackendKind { si_events::FuncBackendKind::JsAttribute => FuncBackendKind::JsAttribute, si_events::FuncBackendKind::JsAuthentication => FuncBackendKind::JsAuthentication, si_events::FuncBackendKind::Json => FuncBackendKind::Json, - si_events::FuncBackendKind::JsReconciliation => FuncBackendKind::JsReconciliation, si_events::FuncBackendKind::JsSchemaVariantDefinition => { FuncBackendKind::JsSchemaVariantDefinition } @@ -176,7 +172,6 @@ pub enum FuncBackendResponseType { Map, Object, Qualification, - Reconciliation, SchemaVariantDefinition, String, Unset, @@ -201,9 +196,6 @@ impl From for si_events::FuncBackendResponseType { FuncBackendResponseType::Qualification => { si_events::FuncBackendResponseType::Qualification } - FuncBackendResponseType::Reconciliation => { - si_events::FuncBackendResponseType::Reconciliation - } FuncBackendResponseType::SchemaVariantDefinition => { si_events::FuncBackendResponseType::SchemaVariantDefinition } @@ -232,9 +224,6 @@ impl From for FuncBackendResponseType { si_events::FuncBackendResponseType::Qualification => { FuncBackendResponseType::Qualification } - si_events::FuncBackendResponseType::Reconciliation => { - FuncBackendResponseType::Reconciliation - } si_events::FuncBackendResponseType::SchemaVariantDefinition => { FuncBackendResponseType::SchemaVariantDefinition } @@ -290,9 +279,6 @@ impl TryFrom for ResolverFunctionResponseType { FuncBackendResponseType::Validation => { return Err(InvalidResolverFunctionTypeError(value)); } - FuncBackendResponseType::Reconciliation => { - return Err(InvalidResolverFunctionTypeError(value)); - } FuncBackendResponseType::SchemaVariantDefinition => { return Err(InvalidResolverFunctionTypeError(value)); } diff --git a/lib/dal/src/func/backend/js_reconciliation.rs b/lib/dal/src/func/backend/js_reconciliation.rs deleted file mode 100644 index e35871a036..0000000000 --- a/lib/dal/src/func/backend/js_reconciliation.rs +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(nick,fletcher): destroy this file!! - -use async_trait::async_trait; -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; -use std::str::FromStr; -use veritech_client::{ - BeforeFunction, FunctionResult, ReconciliationRequest, ReconciliationResultSuccess, -}; - -use crate::func::backend::{ExtractPayload, FuncBackendResult, FuncDispatch, FuncDispatchContext}; -use crate::AttributeValueId; - -#[derive(Deserialize, Serialize, Debug, Clone)] -#[serde(rename_all = "camelCase")] -pub struct ReconciliationDiffDomain { - pub id: AttributeValueId, - pub value: serde_json::Value, -} - -#[derive(Deserialize, Serialize, Debug, Clone)] -#[serde(rename_all = "camelCase")] -pub struct ReconciliationDiff { - pub normalized_resource: Option, - pub resource: serde_json::Value, - pub domain: ReconciliationDiffDomain, -} - -#[derive(Deserialize, Serialize, Debug, Clone, Default)] -pub struct FuncBackendJsReconciliationArgs(HashMap); - -#[derive(Debug)] -pub struct FuncBackendJsReconciliation { - pub context: FuncDispatchContext, - pub request: ReconciliationRequest, -} - -#[async_trait] -impl FuncDispatch for FuncBackendJsReconciliation { - type Args = FuncBackendJsReconciliationArgs; - type Output = ReconciliationResultSuccess; - - fn new( - context: FuncDispatchContext, - code_base64: &str, - handler: &str, - args: Self::Args, - before: Vec, - ) -> Box { - let request = ReconciliationRequest { - execution_id: context.func_run_id.to_string(), - handler: handler.into(), - code_base64: code_base64.into(), - args: serde_json::to_value(args) - .expect("should be impossible to fail serialization here"), - before, - }; - - Box::new(Self { context, request }) - } - - /// This private function dispatches the assembled request to veritech for execution. - /// This is the "last hop" function in the dal before using the veritech client directly. - async fn dispatch(self: Box) -> FuncBackendResult> { - let (veritech, output_tx, workspace_id, change_set_id) = self.context.into_inner(); - let value = veritech - .execute_reconciliation( - output_tx.clone(), - &self.request, - &workspace_id.to_string(), - &change_set_id.to_string(), - ) - .await?; - let value = match value { - FunctionResult::Failure(failure) => FunctionResult::Success(Self::Output { - execution_id: failure.execution_id().to_owned(), - updates: Default::default(), - actions: Default::default(), - message: Some(failure.error().message.to_owned()), - }), - FunctionResult::Success(value) => FunctionResult::Success(value), - }; - - Ok(value) - } -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] -pub struct ReconciliationResult { - pub updates: HashMap, - pub actions: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - #[serde(default)] - pub message: Option, -} - -impl ExtractPayload for ReconciliationResultSuccess { - type Payload = ReconciliationResult; - - fn extract(self) -> FuncBackendResult { - Ok(ReconciliationResult { - updates: self - .updates - .into_iter() - .map(|(k, v)| Ok((AttributeValueId::from_str(&k)?, v))) - .collect::>>()?, - actions: self.actions, - message: self.message, - }) - } -} diff --git a/lib/dal/src/func/kind.rs b/lib/dal/src/func/kind.rs index f2d2693f66..2558deaedb 100644 --- a/lib/dal/src/func/kind.rs +++ b/lib/dal/src/func/kind.rs @@ -4,7 +4,7 @@ use strum::{AsRefStr, Display}; use telemetry::prelude::warn; use crate::func::FuncResult; -use crate::{FuncBackendKind, FuncBackendResponseType, FuncError}; +use crate::{FuncBackendKind, FuncBackendResponseType}; /// Describes the kind of [`Func`](crate::Func). #[remain::sorted] @@ -83,10 +83,6 @@ impl FuncKind { | FuncBackendKind::String | FuncBackendKind::Unset | FuncBackendKind::Validation => Ok(FuncKind::Intrinsic), - _ => Err(FuncError::UnknownFunctionType( - func_backend_kind, - func_backend_response_type, - )), } } } diff --git a/lib/dal/src/func/runner.rs b/lib/dal/src/func/runner.rs index 32ceb1903f..3d2469ffe5 100644 --- a/lib/dal/src/func/runner.rs +++ b/lib/dal/src/func/runner.rs @@ -49,7 +49,6 @@ use super::backend::{ integer::FuncBackendInteger, js_action::FuncBackendJsAction, js_attribute::{FuncBackendJsAttribute, FuncBackendJsAttributeArgs}, - js_reconciliation::FuncBackendJsReconciliation, js_schema_variant_definition::FuncBackendJsSchemaVariantDefinition, json::FuncBackendJson, map::FuncBackendMap, @@ -1499,15 +1498,6 @@ impl FuncRunnerExecutionTask { ) .await } - FuncBackendKind::JsReconciliation => { - FuncBackendJsReconciliation::create_and_execute( - self.func_dispatch_context, - &self.func, - &self.args, - self.before, - ) - .await - } FuncBackendKind::JsAttribute => { let args = FuncBackendJsAttributeArgs { component: ResolverFunctionComponent { diff --git a/lib/dal/src/pkg.rs b/lib/dal/src/pkg.rs index 57ecb5ded4..bf274c70b6 100644 --- a/lib/dal/src/pkg.rs +++ b/lib/dal/src/pkg.rs @@ -140,7 +140,6 @@ impl From for FuncSpecBackendKind { FuncBackendKind::JsAction => Self::JsAction, FuncBackendKind::JsAttribute => Self::JsAttribute, FuncBackendKind::Json => Self::Json, - FuncBackendKind::JsReconciliation => Self::JsReconciliation, FuncBackendKind::JsSchemaVariantDefinition => Self::JsSchemaVariantDefinition, FuncBackendKind::JsValidation => Self::JsValidation, FuncBackendKind::Map => Self::Map, @@ -164,7 +163,6 @@ impl From for FuncBackendKind { FuncSpecBackendKind::JsAction => Self::JsAction, FuncSpecBackendKind::JsAttribute => Self::JsAttribute, FuncSpecBackendKind::Json => Self::Json, - FuncSpecBackendKind::JsReconciliation => Self::JsReconciliation, FuncSpecBackendKind::JsSchemaVariantDefinition => Self::JsSchemaVariantDefinition, FuncSpecBackendKind::JsValidation => Self::JsValidation, FuncSpecBackendKind::Map => Self::Map, @@ -190,7 +188,6 @@ impl From for FuncSpecBackendResponseType { FuncBackendResponseType::Map => Self::Map, FuncBackendResponseType::Object => Self::Object, FuncBackendResponseType::Qualification => Self::Qualification, - FuncBackendResponseType::Reconciliation => Self::Reconciliation, FuncBackendResponseType::SchemaVariantDefinition => Self::SchemaVariantDefinition, FuncBackendResponseType::String => Self::String, FuncBackendResponseType::Unset => Self::Unset, @@ -213,7 +210,6 @@ impl From for FuncBackendResponseType { FuncSpecBackendResponseType::Map => Self::Map, FuncSpecBackendResponseType::Object => Self::Object, FuncSpecBackendResponseType::Qualification => Self::Qualification, - FuncSpecBackendResponseType::Reconciliation => Self::Reconciliation, FuncSpecBackendResponseType::SchemaVariantDefinition => Self::SchemaVariantDefinition, FuncSpecBackendResponseType::String => Self::String, FuncSpecBackendResponseType::Unset => Self::Unset, diff --git a/lib/sdf-server/src/server/service/component/resource_domain_diff.rs b/lib/sdf-server/src/server/service/component/resource_domain_diff.rs deleted file mode 100644 index b8f602fab0..0000000000 --- a/lib/sdf-server/src/server/service/component/resource_domain_diff.rs +++ /dev/null @@ -1,197 +0,0 @@ -use std::collections::HashMap; - -use axum::{extract::Query, Json}; -use serde::{Deserialize, Serialize}; - -use dal::func::backend::js_reconciliation::{ - ReconciliationDiff, ReconciliationDiffDomain, ReconciliationResult, -}; -use dal::func::before::before_funcs_for_component; -use dal::{ - AttributeReadContext, AttributeValue, AttributeView, Component, ComponentId, - ExternalProviderId, FuncBinding, InternalProviderId, Prop, ReconciliationPrototype, - ReconciliationPrototypeContext, StandardModel, Visibility, -}; -use telemetry::prelude::*; - -use crate::server::extract::{AccessBuilder, HandlerContext}; -use crate::service::component::ComponentError; - -use super::ComponentResult; - -#[derive(Deserialize, Serialize, Debug)] -#[serde(rename_all = "camelCase")] -pub struct GetResourceDomainDiffRequest { - #[serde(flatten)] - pub visibility: Visibility, -} - -#[derive(Deserialize, Serialize, Debug, Default)] -#[serde(rename_all = "camelCase")] -pub struct ResourceDomainDiff { - diff: HashMap, - reconciliation: Option, -} - -#[derive(Deserialize, Serialize, Debug, Default)] -#[serde(rename_all = "camelCase")] -pub struct GetResourceDomainDiffResponse { - diffs: HashMap, -} - -#[derive(Deserialize, Serialize, Debug, Default)] -#[serde(rename_all = "camelCase")] -struct DiffValue { - diff: bool, - new_value: Option, -} - -pub async fn get_diff( - HandlerContext(builder): HandlerContext, - AccessBuilder(request_ctx): AccessBuilder, - Query(request): Query, -) -> ComponentResult> { - let ctx = &builder.build(request_ctx.build(request.visibility)).await?; - let mut diffs = HashMap::new(); - - for component in Component::list(ctx).await? { - let schema_variant = component - .schema_variant(ctx) - .await? - .ok_or_else(|| ComponentError::SchemaVariantNotFound)?; - - // Check if resource prop has been filled yet - if component.resource(ctx).await?.payload.is_none() { - return Ok(Json(GetResourceDomainDiffResponse::default())); - } - - let props = Prop::find_by_attr(ctx, "schema_variant_id", schema_variant.id()).await?; - - let mut diff = HashMap::new(); - - for prop in props { - let (domain_prop_id, resource_prop_id) = match prop.refers_to_prop_id() { - None => continue, - Some(prop_id) => (*prop_id, *prop.id()), - }; - - let context = AttributeReadContext { - prop_id: Some(resource_prop_id), - internal_provider_id: Some(InternalProviderId::NONE), - external_provider_id: Some(ExternalProviderId::NONE), - component_id: Some(*component.id()), - }; - let resource_prop_av = AttributeValue::find_for_context(ctx, context) - .await? - .ok_or(ComponentError::AttributeValueNotFound)?; - - let view_context = AttributeReadContext { - prop_id: None, - internal_provider_id: Some(InternalProviderId::NONE), - external_provider_id: Some(ExternalProviderId::NONE), - component_id: Some(*component.id()), - }; - - let resource_prop_view = - AttributeView::new(ctx, view_context, Some(*resource_prop_av.id())).await?; - - let context = AttributeReadContext { - prop_id: Some(domain_prop_id), - internal_provider_id: Some(InternalProviderId::NONE), - external_provider_id: Some(ExternalProviderId::NONE), - component_id: Some(*component.id()), - }; - - let domain_prop_av = AttributeValue::find_for_context(ctx, context) - .await? - .ok_or(ComponentError::AttributeValueNotFound)?; - - let domain_prop_view = - AttributeView::new(ctx, view_context, Some(*domain_prop_av.id())).await?; - - if let Some(func_id) = prop.diff_func_id() { - let diff_value = { - let (_, func_binding_return_value) = FuncBinding::create_and_execute( - ctx, - serde_json::json!({ - "first": domain_prop_view.value(), - "second": resource_prop_view.value(), - }), - *func_id, - vec![], - ) - .await?; - - func_binding_return_value - .value() - .cloned() - .unwrap_or(serde_json::Value::Null) - }; - - let diff_value = DiffValue::deserialize(&diff_value)?; - - // TODO: Should we treat unset as equal or not? - if diff_value.diff { - diff.insert( - prop.path().with_replaced_sep("/"), - ReconciliationDiff { - normalized_resource: diff_value.new_value, - resource: resource_prop_view.value().clone(), - domain: ReconciliationDiffDomain { - id: *domain_prop_av.id(), - value: domain_prop_view.value().clone(), - }, - }, - ); - } - } else { - warn!("Prop {} does not have diff functions set, therefore can't be diffed with prop {domain_prop_id:?}", prop.path().as_str()); - } - } - - let context = ReconciliationPrototypeContext { - component_id: *component.id(), - schema_variant_id: *schema_variant.id(), - }; - let reconciliation = if let Some(reconciliation_prototype) = - ReconciliationPrototype::find_for_context(ctx, context).await? - { - let func = reconciliation_prototype.func(ctx).await?; - - let before = before_funcs_for_component(ctx, component.id()).await?; - - let (_, func_binding_return_value) = FuncBinding::create_and_execute( - ctx, - serde_json::to_value(&diff)?, - *func.id(), - before, - ) - .await?; - - let reconciliation = ReconciliationResult::deserialize( - func_binding_return_value - .value() - .unwrap_or(&serde_json::Value::Null), - )?; - Some(reconciliation) - } else { - warn!( - "No reconciliation prototype found for component {} of schema variant {}", - component.id(), - schema_variant.id() - ); - None - }; - diffs.insert( - *component.id(), - ResourceDomainDiff { - reconciliation, - diff, - }, - ); - } - - ctx.commit().await?; - - Ok(Json(GetResourceDomainDiffResponse { diffs })) -} diff --git a/lib/sdf-server/src/server/service/v2/func.rs b/lib/sdf-server/src/server/service/v2/func.rs index a4db19c805..ece0c8898e 100644 --- a/lib/sdf-server/src/server/service/v2/func.rs +++ b/lib/sdf-server/src/server/service/v2/func.rs @@ -103,7 +103,6 @@ impl IntoResponse for FuncAPIError { } FunctionResultFailureErrorKind::InvalidReturnType | FunctionResultFailureErrorKind::KilledExecution - | FunctionResultFailureErrorKind::ReconciliationFieldWrongType | FunctionResultFailureErrorKind::ActionFieldWrongType => { (StatusCode::UNPROCESSABLE_ENTITY, Some(message)) } diff --git a/lib/si-events-rs/src/func_run.rs b/lib/si-events-rs/src/func_run.rs index 003e597723..0c5181faa5 100644 --- a/lib/si-events-rs/src/func_run.rs +++ b/lib/si-events-rs/src/func_run.rs @@ -66,7 +66,6 @@ pub enum FuncBackendKind { JsAttribute, JsAuthentication, Json, - JsReconciliation, JsSchemaVariantDefinition, JsValidation, Map, @@ -102,7 +101,6 @@ pub enum FuncBackendResponseType { Map, Object, Qualification, - Reconciliation, SchemaVariantDefinition, String, Unset, diff --git a/lib/si-pkg/src/spec/func.rs b/lib/si-pkg/src/spec/func.rs index ab3fdb5b5b..bbba45b0d0 100644 --- a/lib/si-pkg/src/spec/func.rs +++ b/lib/si-pkg/src/spec/func.rs @@ -70,7 +70,6 @@ pub enum FuncSpecBackendKind { JsAttribute, JsAuthentication, Json, - JsReconciliation, JsSchemaVariantDefinition, JsValidation, Map, @@ -94,7 +93,6 @@ pub enum FuncSpecBackendResponseType { Map, Object, Qualification, - Reconciliation, SchemaVariantDefinition, String, Unset, diff --git a/lib/si-pool-noodle/src/instance/cyclone/local_http.rs b/lib/si-pool-noodle/src/instance/cyclone/local_http.rs index 2c231954e2..78b47d4ef2 100644 --- a/lib/si-pool-noodle/src/instance/cyclone/local_http.rs +++ b/lib/si-pool-noodle/src/instance/cyclone/local_http.rs @@ -12,8 +12,7 @@ use cyclone_client::{ use cyclone_core::{ process::{self, ShutdownError}, ActionRunRequest, ActionRunResultSuccess, CanonicalCommand, CycloneRequest, - ReconciliationRequest, ReconciliationResultSuccess, ResolverFunctionRequest, - ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, + ResolverFunctionRequest, ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, SchemaVariantDefinitionResultSuccess, ValidationRequest, ValidationResultSuccess, }; use derive_builder::Builder; @@ -187,23 +186,6 @@ impl CycloneClient for LocalHttpInstance { result } - async fn prepare_reconciliation_execution( - &mut self, - request: CycloneRequest, - ) -> result::Result< - Execution, - ClientError, - > { - self.ensure_healthy_client() - .await - .map_err(ClientError::unhealthy)?; - - let result = self.client.prepare_reconciliation_execution(request).await; - self.count_request(); - - result - } - async fn prepare_schema_variant_definition_execution( &mut self, request: CycloneRequest, diff --git a/lib/si-pool-noodle/src/instance/cyclone/local_uds.rs b/lib/si-pool-noodle/src/instance/cyclone/local_uds.rs index f660010775..f4100d9ac7 100644 --- a/lib/si-pool-noodle/src/instance/cyclone/local_uds.rs +++ b/lib/si-pool-noodle/src/instance/cyclone/local_uds.rs @@ -22,8 +22,7 @@ use cyclone_client::{ use cyclone_core::{ process::{self, ShutdownError}, ActionRunRequest, ActionRunResultSuccess, CanonicalCommand, CycloneRequest, - ReconciliationRequest, ReconciliationResultSuccess, ResolverFunctionRequest, - ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, + ResolverFunctionRequest, ResolverFunctionResultSuccess, SchemaVariantDefinitionRequest, SchemaVariantDefinitionResultSuccess, ValidationRequest, ValidationResultSuccess, }; use derive_builder::Builder; @@ -231,23 +230,6 @@ impl CycloneClient for LocalUdsInstance { result } - async fn prepare_reconciliation_execution( - &mut self, - request: CycloneRequest, - ) -> result::Result< - Execution, - ClientError, - > { - self.ensure_healthy_client() - .await - .map_err(ClientError::unhealthy)?; - // Use the websocket client for cyclone to execute reconciliation. - let result = self.client.prepare_reconciliation_execution(request).await; - self.count_request(); - - result - } - async fn prepare_schema_variant_definition_execution( &mut self, request: CycloneRequest, @@ -258,7 +240,6 @@ impl CycloneClient for LocalUdsInstance { self.ensure_healthy_client() .await .map_err(ClientError::unhealthy)?; - // Use the websocket client for cyclone to execute reconciliation. let result = self .client .prepare_schema_variant_definition_execution(request) diff --git a/lib/si-pool-noodle/src/lib.rs b/lib/si-pool-noodle/src/lib.rs index 437d1cec18..7bf804398a 100644 --- a/lib/si-pool-noodle/src/lib.rs +++ b/lib/si-pool-noodle/src/lib.rs @@ -24,10 +24,9 @@ pub use cyclone_core::{ ActionRunRequest, ActionRunResultSuccess, BeforeFunction, ComponentView, CycloneRequest, FunctionResult, FunctionResultFailure, FunctionResultFailureError, FunctionResultFailureErrorKind, KillExecutionRequest, OutputStream, ProgressMessage, - ReconciliationRequest, ReconciliationResultSuccess, ResolverFunctionRequest, - ResolverFunctionResultSuccess, ResourceStatus, SchemaVariantDefinitionRequest, - SchemaVariantDefinitionResultSuccess, SensitiveStrings, ValidationRequest, - ValidationResultSuccess, + ResolverFunctionRequest, ResolverFunctionResultSuccess, ResourceStatus, + SchemaVariantDefinitionRequest, SchemaVariantDefinitionResultSuccess, SensitiveStrings, + ValidationRequest, ValidationResultSuccess, }; /// [`PoolNoodleError`] implementations. diff --git a/lib/veritech-client/src/lib.rs b/lib/veritech-client/src/lib.rs index d7bad6241b..cd33e91f89 100644 --- a/lib/veritech-client/src/lib.rs +++ b/lib/veritech-client/src/lib.rs @@ -17,10 +17,10 @@ use veritech_core::{ pub use cyclone_core::{ ActionRunRequest, ActionRunResultSuccess, BeforeFunction, ComponentKind, ComponentView, FunctionResult, FunctionResultFailure, FunctionResultFailureErrorKind, KillExecutionRequest, - OutputStream, ReconciliationRequest, ReconciliationResultSuccess, ResolverFunctionComponent, - ResolverFunctionRequest, ResolverFunctionResponseType, ResolverFunctionResultSuccess, - ResourceStatus, SchemaVariantDefinitionRequest, SchemaVariantDefinitionResultSuccess, - SensitiveContainer, ValidationRequest, ValidationResultSuccess, + OutputStream, ResolverFunctionComponent, ResolverFunctionRequest, ResolverFunctionResponseType, + ResolverFunctionResultSuccess, ResourceStatus, SchemaVariantDefinitionRequest, + SchemaVariantDefinitionResultSuccess, SensitiveContainer, ValidationRequest, + ValidationResultSuccess, }; pub use veritech_core::{encrypt_value_tree, VeritechValueEncryptError}; @@ -35,8 +35,6 @@ pub enum ClientError { NoResult, #[error("unable to publish message: {0:?}")] PublishingFailed(si_data_nats::Message), - #[error("reconciliation functions no longer supported")] - ReconciliationFunctionsNoLongerSupported, #[error("root connection closed")] RootConnectionClosed, #[error("subscriber error: {0}")] @@ -93,21 +91,6 @@ impl Client { .await } - // TODO(nick,fletcher): remove reconcilation from both sides. As of the time of writing, we - // removed it from the veritech layer since we moved everything to jetstream for production - // hardening. As a result, reconciliation did not make the great journey. We landed on the - // landmine of dead code here, but we all collectively need to take the time to clean this up. - #[instrument(name = "client.execute_reconciliation", level = "info", skip_all)] - pub async fn execute_reconciliation( - &self, - _output_tx: mpsc::Sender, - _request: &ReconciliationRequest, - _workspace_id: &str, - _change_set_id: &str, - ) -> ClientResult> { - Err(ClientError::ReconciliationFunctionsNoLongerSupported) - } - #[instrument(name = "client.execute_resolver_function", level = "info", skip_all)] pub async fn execute_resolver_function( &self, diff --git a/lib/veritech-server/src/request.rs b/lib/veritech-server/src/request.rs index f9281d0e8e..f97ac2fb53 100644 --- a/lib/veritech-server/src/request.rs +++ b/lib/veritech-server/src/request.rs @@ -1,7 +1,7 @@ use si_crypto::VeritechDecryptionKey; use si_pool_noodle::{ - ActionRunRequest, BeforeFunction, ReconciliationRequest, ResolverFunctionRequest, - SchemaVariantDefinitionRequest, SensitiveStrings, ValidationRequest, + ActionRunRequest, BeforeFunction, ResolverFunctionRequest, SchemaVariantDefinitionRequest, + SensitiveStrings, ValidationRequest, }; use veritech_core::{decrypt_value_tree, VeritechValueDecryptError}; @@ -33,16 +33,6 @@ impl DecryptRequest for ActionRunRequest { } } -impl DecryptRequest for ReconciliationRequest { - fn decrypt( - &mut self, - sensitive_strings: &mut SensitiveStrings, - decryption_key: &VeritechDecryptionKey, - ) -> Result<(), VeritechValueDecryptError> { - decrypt_before_func_args(&mut self.before, sensitive_strings, decryption_key) - } -} - impl DecryptRequest for ValidationRequest { fn decrypt( &mut self,