Skip to content

Commit 343d121

Browse files
committed
[2/N] restate-types use restate-ty
1 parent ad27318 commit 343d121

File tree

126 files changed

+342
-5478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+342
-5478
lines changed

Cargo.lock

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ restate-time-util = { path = "crates/time-util" }
8484
restate-timer = { path = "crates/timer" }
8585
restate-timer-queue = { path = "crates/timer-queue" }
8686
restate-tracing-instrumentation = { path = "crates/tracing-instrumentation" }
87+
restate-ty = { path = "crates/lib/ty" }
8788
restate-types = { path = "crates/types" }
8889
restate-utoipa = { path = "crates/utoipa" }
8990
restate-wal-protocol = { path = "crates/wal-protocol" }

cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ restate-cli-util = { workspace = true }
3131
restate-cloud-tunnel-client = { workspace = true }
3232
restate-serde-util = { workspace = true }
3333
restate-time-util = { workspace = true }
34+
restate-ty = { workspace = true }
3435
restate-types = { workspace = true }
3536
restate-lite = { workspace = true, optional = true }
3637
mock-service-endpoint = { workspace = true, optional = true }

cli/src/clients/admin_interface.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ use restate_admin_rest_model::invocations::RestartAsNewInvocationResponse;
1818
use restate_admin_rest_model::services::*;
1919
use restate_admin_rest_model::version::VersionInformation;
2020
use restate_serde_util::SerdeableHeaderHashMap;
21-
use restate_types::identifiers::{DeploymentId, LambdaARN};
21+
use restate_types::LambdaARN;
22+
use restate_types::identifiers::DeploymentId;
2223
use restate_types::schema::deployment::ProtocolType;
2324
use restate_types::schema::service::ServiceMetadata;
2425

cli/src/commands/deployments/register.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use restate_admin_rest_model::version::AdminApiVersion;
2626
use restate_cli_util::ui::console::{Styled, StyledTable, confirm_or_exit};
2727
use restate_cli_util::ui::stylesheet::Style;
2828
use restate_cli_util::{c_eprintln, c_error, c_indent_table, c_indentln, c_success, c_warn};
29-
use restate_types::identifiers::LambdaARN;
29+
use restate_ty::LambdaARN;
3030
use restate_types::schema::service::ServiceMetadata;
3131

3232
use crate::cli_env::CliEnv;

crates/admin-rest-model/src/deployments.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
// the Business Source License, use of this software will be governed
99
// by the Apache License, Version 2.0.
1010

11+
use std::collections::HashMap;
12+
1113
use http::{Uri, Version};
14+
use serde::{Deserialize, Serialize};
15+
use serde_with::serde_as;
16+
1217
use restate_serde_util::SerdeableHeaderHashMap;
13-
use restate_types::identifiers::ServiceRevision;
14-
use restate_types::identifiers::{DeploymentId, LambdaARN};
18+
use restate_types::LambdaARN;
19+
use restate_types::identifiers::DeploymentId;
1520
use restate_types::schema::deployment::{EndpointLambdaCompression, ProtocolType};
1621
use restate_types::schema::info::Info;
1722
use restate_types::schema::service::ServiceMetadata;
18-
use serde::{Deserialize, Serialize};
19-
use serde_with::serde_as;
20-
use std::collections::HashMap;
2123

2224
// This enum could be a struct with a nested enum to avoid repeating some fields, but serde(flatten) unfortunately breaks the openapi code generation
2325
#[serde_as]
@@ -160,7 +162,7 @@ pub enum RegisterDeploymentRequest {
160162
#[derive(Clone, Debug, Serialize, Deserialize)]
161163
pub struct ServiceNameRevPair {
162164
pub name: String,
163-
pub revision: ServiceRevision,
165+
pub revision: u32,
164166
}
165167

166168
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]

crates/admin/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99

1010
[features]
1111
default = ["serve-web-ui"]
12-
options_schema = ["restate-service-client/options_schema", "restate-types/schemars"]
12+
options_schema = ["restate-service-client/options_schema", "restate-types/schemars", "restate-ty/schemars"]
1313
serve-web-ui = ["restate-web-ui", "mime_guess"]
1414
storage-query = []
1515
metadata-api = []
@@ -27,6 +27,7 @@ restate-service-client = { workspace = true }
2727
restate-service-protocol = { workspace = true, features = ["discovery"] }
2828
restate-storage-query-datafusion = { workspace = true }
2929
restate-time-util = { workspace = true }
30+
restate-ty = { workspace = true }
3031
restate-types = { workspace = true }
3132
restate-wal-protocol = { workspace = true }
3233
restate-web-ui = { git = "https://github.com/restatedev/restate-web-ui-crate", optional = true, version = "0.1.11", tag = "v0.1.11" }

crates/admin/src/cluster_controller/service/scheduler_task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ use restate_core::{
1919
Metadata, ShutdownError, TaskCenter, TaskHandle, TaskKind, cancellation_watcher,
2020
};
2121
use restate_metadata_store::MetadataStoreClient;
22+
use restate_ty::metadata::MetadataKind;
2223
use restate_types::cluster::cluster_state::LegacyClusterState;
2324
use restate_types::cluster_state::ClusterState;
2425
use restate_types::epoch::EpochMetadata;
2526
use restate_types::identifiers::PartitionId;
2627
use restate_types::metadata_store::keys::partition_processor_epoch_key;
27-
use restate_types::net::metadata::MetadataKind;
2828
use restate_types::nodes_config::NodesConfiguration;
2929
use restate_types::partitions::PartitionTable;
3030

crates/admin/src/rest_api/deployments.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ use okapi_operation::*;
2121
use restate_admin_rest_model::deployments::*;
2222
use restate_admin_rest_model::version::AdminApiVersion;
2323
use restate_errors::warn_it;
24+
use restate_ty::identifiers::DeploymentId;
25+
use restate_ty::invocation::ServiceRevision;
26+
use restate_ty::lambda::InvalidLambdaARN;
2427
use restate_types::deployment::{HttpDeploymentAddress, LambdaDeploymentAddress};
25-
use restate_types::identifiers::{DeploymentId, InvalidLambdaARN, ServiceRevision};
2628
use restate_types::schema;
2729
use restate_types::schema::deployment::{Deployment, DeploymentType};
2830
use restate_types::schema::registry::{

crates/bifrost/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ restate-futures-util = { workspace = true }
2222
restate-metadata-store = { workspace = true }
2323
restate-rocksdb = { workspace = true, optional = true }
2424
restate-test-util = { workspace = true, optional = true }
25+
restate-ty = { workspace = true }
2526
restate-types = { workspace = true }
2627

2728
ahash = { workspace = true }
@@ -81,4 +82,4 @@ tikv-jemallocator = { workspace = true }
8182

8283
[[bench]]
8384
name = "replicated_loglet_serde"
84-
harness = false
85+
harness = false

0 commit comments

Comments
 (0)