From 99aa0330aa3e54cb47ead35b4fb6f6fa417f34f5 Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Tue, 4 Jul 2023 15:58:04 +0200 Subject: [PATCH] Fix imports again :) --- src/invoker/src/options.rs | 2 +- src/invoker/src/service/input_command.rs | 4 ++-- .../src/service/invocation_state_machine.rs | 2 -- src/invoker/src/service/mod.rs | 14 ++++++++++---- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/invoker/src/options.rs b/src/invoker/src/options.rs index 534126bc3..9d7e14014 100644 --- a/src/invoker/src/options.rs +++ b/src/invoker/src/options.rs @@ -6,7 +6,7 @@ use std::time::Duration; use restate_hyper_util::proxy_connector::Proxy; use restate_service_metadata::ServiceEndpointRegistry; -use restate_types::journal::raw::{PlainRawEntry, RawEntryCodec}; +use restate_types::journal::raw::PlainRawEntry; use restate_types::retries::RetryPolicy; use serde_with::serde_as; diff --git a/src/invoker/src/service/input_command.rs b/src/invoker/src/service/input_command.rs index e6c357f27..09cdd5132 100644 --- a/src/invoker/src/service/input_command.rs +++ b/src/invoker/src/service/input_command.rs @@ -4,8 +4,8 @@ use crate::{ }; use futures::future::BoxFuture; use futures::FutureExt; -use restate_common::journal::Completion; -use restate_common::types::{EntryIndex, PartitionLeaderEpoch, ServiceInvocationId}; +use restate_types::identifiers::{EntryIndex, PartitionLeaderEpoch, ServiceInvocationId}; +use restate_types::journal::Completion; use tokio::sync::mpsc; // -- Input messages diff --git a/src/invoker/src/service/invocation_state_machine.rs b/src/invoker/src/service/invocation_state_machine.rs index 0bf9c3a46..1a553ab94 100644 --- a/src/invoker/src/service/invocation_state_machine.rs +++ b/src/invoker/src/service/invocation_state_machine.rs @@ -243,9 +243,7 @@ impl InvocationStateMachine { mod tests { use super::*; - use restate_types::retry_policy::RetryPolicy; use restate_test_util::{check, test}; - use restate_types::retries::RetryPolicy; use std::time::Duration; #[test] diff --git a/src/invoker/src/service/mod.rs b/src/invoker/src/service/mod.rs index fca4099e6..01fa8ca6d 100644 --- a/src/invoker/src/service/mod.rs +++ b/src/invoker/src/service/mod.rs @@ -7,6 +7,7 @@ use drain::ReleaseShutdown; use input_command::{InputCommand, InvokeCommand}; use invocation_state_machine::InvocationStateMachine; use invocation_task::{InvocationTaskOutput, InvocationTaskOutputInner}; +use restate_errors::warn_it; use restate_hyper_util::proxy_connector::{Proxy, ProxyConnector}; use restate_queue::SegmentQueue; use restate_service_metadata::ServiceEndpointRegistry; @@ -14,8 +15,10 @@ use restate_timer_queue::TimerQueue; use restate_types::errors::{InvocationError, InvocationErrorCode, UserErrorCode}; use restate_types::identifiers::ServiceInvocationId; use restate_types::identifiers::{EntryIndex, PartitionLeaderEpoch}; +use restate_types::journal::enriched::EnrichedRawEntry; use restate_types::journal::Completion; use restate_types::retries::RetryPolicy; +use restate_types::service_endpoint::{EndpointMetadata, ProtocolType}; use std::collections::{HashMap, HashSet}; use std::future::Future; use std::path::PathBuf; @@ -504,7 +507,7 @@ where restate.invocation.sid = %service_invocation_id, restate.invoker.partition_leader_epoch = ?partition, restate.journal.index = entry_index, - restate.journal.entry_type = ?entry.header.to_entry_type(), + restate.journal.entry_type = ?entry.ty(), ) )] async fn handle_new_entry( @@ -905,13 +908,16 @@ mod tests { use bytes::Bytes; use quota::InvokerConcurrencyQuota; use restate_service_metadata::InMemoryServiceEndpointRegistry; - use restate_test_util::{check, test}; - use std::future::{pending, ready}; - use tempfile::tempdir; + use restate_test_util::{check, let_assert, test}; use restate_types::identifiers::InvocationId; use restate_types::identifiers::ServiceInvocationId; + use restate_types::journal::enriched::EnrichedEntryHeader; + use restate_types::journal::raw::RawEntry; use restate_types::retries::RetryPolicy; + use restate_types::service_endpoint::{EndpointMetadata, ProtocolType}; + use std::future::{pending, ready}; use std::time::Duration; + use tempfile::tempdir; use tokio::sync::mpsc; // -- Mocks