Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 38 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ members = [
"src/sqllogictest",
"src/stash",
"src/stash-debug",
"src/stash-types",
"src/storage",
"src/storage-client",
"src/storage-controller",
Expand Down
5 changes: 5 additions & 0 deletions ci/test/lint-deps.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,31 @@ name = "mz-transform"
dependencies = [
"mz-compute-client",
"mz-storage-client",
"mz-stash",
]

[[deny]]
name = "mz-sql"
dependencies = [
"mz-compute-client",
"mz-storage-client",
"mz-stash",
]

[[deny]]
name = "mz-compute"
dependencies = [
"mz-storage-controller",
"mz-storage",
"mz-stash",
]

[[deny]]
name = "mz-storage"
dependencies = [
"mz-storage-controller",
"mz-compute",
"mz-stash",
]

# Keep various crates in only one of environmentd or clusterd.
Expand All @@ -57,6 +61,7 @@ dependencies = [
name = "mz-clusterd"
dependencies = [
"mz-storage-controller",
"mz-stash",
]

# Persist is meant to be a strong enough abstraction that it doesn't depend on
Expand Down
1 change: 1 addition & 0 deletions src/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ mz-sql = { path = "../sql" }
mz-sql-parser = { path = "../sql-parser" }
mz-ssh-util = { path = "../ssh-util" }
mz-stash = { path = "../stash" }
mz-stash-types = { path = "../stash-types" }
mz-storage-client = { path = "../storage-client" }
mz-storage-types = { path = "../storage-types" }
mz-tls-util = { path = "../tls-util" }
Expand Down
8 changes: 4 additions & 4 deletions src/adapter/src/catalog/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub enum ErrorKind {
#[error("{0}")]
Unstructured(String),
#[error(transparent)]
Stash(#[from] mz_stash::StashError),
Stash(#[from] mz_stash_types::StashError),
#[error("stash in unexpected state")]
UnexpectedStashState,
#[error(transparent)]
Expand Down Expand Up @@ -119,15 +119,15 @@ impl From<SqlCatalogError> for Error {
}
}

impl From<mz_stash::StashError> for Error {
fn from(e: mz_stash::StashError) -> Error {
impl From<mz_stash_types::StashError> for Error {
fn from(e: mz_stash_types::StashError) -> Error {
Error::new(ErrorKind::from(e))
}
}

impl From<TryFromProtoError> for Error {
fn from(e: TryFromProtoError) -> Error {
Error::new(ErrorKind::from(mz_stash::StashError::from(e)))
Error::new(ErrorKind::from(mz_stash_types::StashError::from(e)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use mz_sql_parser::ast::display::AstDisplay;
use mz_sql_parser::ast::{
CreateIndexStatement, FetchStatement, Ident, Raw, RawClusterName, RawItemName, Statement,
};
use mz_stash::StashError;
use mz_stash_types::StashError;
use mz_storage_types::controller::StorageError;
use mz_transform::TransformError;
use tokio::sync::mpsc::UnboundedSender;
Expand Down
2 changes: 1 addition & 1 deletion src/audit-log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
anyhow = "1.0.66"
mz-ore = { path = "../ore" }
mz-proto = { path = "../proto" }
mz-stash = { path = "../stash" }
mz-stash-types = { path = "../stash-types" }
proptest = { git = "https://github.com/MaterializeInc/proptest.git", default-features = false, features = ["std"]}
proptest-derive = { git = "https://github.com/MaterializeInc/proptest.git", features = ["boxed_union"]}
serde = { version = "1.0.152", features = ["derive"] }
Expand Down
6 changes: 3 additions & 3 deletions src/audit-log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

use mz_ore::now::EpochMillis;
use mz_proto::{IntoRustIfSome, ProtoType};
use mz_stash::objects::{proto, RustType, TryFromProtoError};
use mz_stash_types::objects::{proto, RustType, TryFromProtoError};
use proptest_derive::Arbitrary;
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -193,7 +193,7 @@ impl RustType<proto::audit_log_event_v1::EventType> for EventType {

fn from_proto(
proto: proto::audit_log_event_v1::EventType,
) -> Result<Self, mz_stash::objects::TryFromProtoError> {
) -> Result<Self, mz_stash_types::objects::TryFromProtoError> {
match proto {
proto::audit_log_event_v1::EventType::Create => Ok(EventType::Create),
proto::audit_log_event_v1::EventType::Drop => Ok(EventType::Drop),
Expand Down Expand Up @@ -1286,7 +1286,7 @@ mod tests {
EventDetails, EventType, EventV1, IdNameV1, ObjectType, VersionedEvent,
VersionedStorageUsage,
};
use mz_stash::objects::RustType;
use mz_stash_types::objects::RustType;
use proptest::prelude::*;

// Test all versions of events. This test hard codes bytes so that
Expand Down
4 changes: 2 additions & 2 deletions src/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ breaking:
# reason: still under active development
- persist-types/src/stats.proto
# reason: does currently not require backward-compatibility
- stash/protos/objects.proto
- stash-types/protos/objects.proto
# reason: does currently not require backward-compatibility
- stash/protos/objects_v40.proto
- stash-types/protos/objects_v40.proto
# reason: does currently not require backward-compatibility
- storage-client/src/client.proto
# reason: Ignored until #21887 is reverted
Expand Down
1 change: 1 addition & 0 deletions src/catalog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ mz-repr = { path = "../repr", features = ["tracing_"] }
mz-sql = { path = "../sql" }
mz-sql-parser = { path = "../sql-parser" }
mz-stash = { path = "../stash" }
mz-stash-types = { path = "../stash-types" }
mz-storage-client = { path = "../storage-client" }
mz-storage-types = { path = "../storage-types" }
proptest = { version = "1.0.0", default-features = false, features = ["std"] }
Expand Down
3 changes: 2 additions & 1 deletion src/catalog/src/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ use mz_sql::names::{
};
use mz_sql::rbac;
use mz_sql::session::user::{MZ_SUPPORT_ROLE_ID, MZ_SYSTEM_ROLE_ID};
use mz_stash::{STASH_VERSION, USER_VERSION_KEY};
use mz_stash::USER_VERSION_KEY;
use mz_stash_types::STASH_VERSION;
use mz_storage_types::sources::Timeline;

use crate::builtin::BUILTIN_ROLES;
Expand Down
5 changes: 3 additions & 2 deletions src/catalog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ use std::time::Duration;

use mz_proto::TryFromProtoError;
use mz_sql::catalog::CatalogError as SqlCatalogError;
use mz_stash::{DebugStashFactory, StashError};
use mz_stash::DebugStashFactory;
use mz_stash_types::StashError;

use crate::objects::Snapshot;
pub use crate::objects::{
Expand Down Expand Up @@ -165,7 +166,7 @@ impl From<StashError> for Error {

impl From<TryFromProtoError> for Error {
fn from(e: TryFromProtoError) -> Error {
Error::Stash(mz_stash::StashError::from(e))
Error::Stash(mz_stash_types::StashError::from(e))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/catalog/src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use mz_sql::catalog::{
RoleMembership, RoleVars,
};
use mz_sql::names::{CommentObjectId, DatabaseId, QualifiedItemName, SchemaId};
use mz_stash::objects::{proto, RustType, TryFromProtoError};
use mz_stash_types::objects::{proto, RustType, TryFromProtoError};
use mz_storage_types::sources::Timeline;
use proptest_derive::Arbitrary;
use std::collections::BTreeMap;
Expand Down
5 changes: 3 additions & 2 deletions src/catalog/src/stash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ use mz_repr::{GlobalId, Timestamp};
use mz_sql::catalog::{
CatalogError as SqlCatalogError, DefaultPrivilegeAclItem, DefaultPrivilegeObject,
};
use mz_stash::objects::proto;
use mz_stash::{AppendBatch, DebugStashFactory, Stash, StashError, StashFactory, TypedCollection};
use mz_stash::{AppendBatch, DebugStashFactory, Stash, StashFactory, TypedCollection};
use mz_stash_types::objects::proto;
use mz_stash_types::StashError;
use mz_storage_types::sources::Timeline;

use crate::initialize::DEPLOY_GENERATION;
Expand Down
2 changes: 1 addition & 1 deletion src/catalog/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ use mz_sql::names::{
};
use mz_sql::session::user::MZ_SYSTEM_ROLE_ID;
use mz_sql_parser::ast::QualifiedReplica;
use mz_stash::objects::proto;
use mz_stash::TableTransaction;
use mz_stash_types::objects::proto;
use mz_storage_types::sources::Timeline;
use std::collections::{BTreeMap, BTreeSet};
use std::time::Duration;
Expand Down
2 changes: 1 addition & 1 deletion src/cluster-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ http = "0.2.8"
itertools = "0.10.5"
mz-ore = { path = "../ore", features = ["tracing_"] }
mz-proto = { path = "../proto" }
mz-stash = { path = "../stash" }
mz-stash-types = { path = "../stash-types" }
once_cell = "1.16.0"
prometheus = { version = "0.13.3", default-features = false }
proptest = { version = "1.0.0", default-features = false, features = ["std"]}
Expand Down
Loading