Skip to content

Commit

Permalink
it works
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjstone committed Dec 17, 2024
1 parent 08cd4c8 commit 605e71f
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 30 deletions.
18 changes: 2 additions & 16 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ diesel = { version = "2.2.4", features = ["i-implement-a-third-party-backend-and
diesel-dtrace = "0.4.2"
#diffus = { version = "0.10.0", features = ["uuid-impl", "derive"] }
diffus = { path = "../diffus/diffus", features = ["uuid-impl", "derive"] }
diffus-derive = "0.10.0"
dns-server = { path = "dns-server" }
dns-server-api = { path = "dns-server-api" }
dns-service-client = { path = "clients/dns-service-client" }
Expand Down
1 change: 0 additions & 1 deletion clickhouse-admin/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ camino-tempfile.workspace = true
chrono.workspace = true
derive_more.workspace = true
diffus.workspace = true
diffus-derive.workspace = true
itertools.workspace = true
omicron-common.workspace = true
omicron-workspace-hack.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-admin/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use atomicwrites::AtomicFile;
use camino::Utf8PathBuf;
use chrono::{DateTime, Utc};
use derive_more::{Add, AddAssign, Display, From};
use diffus_derive::Diffus;
use diffus::Diffus;
use itertools::Itertools;
use omicron_common::api::external::Generation;
use schemars::{
Expand Down
1 change: 0 additions & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ backoff.workspace = true
camino.workspace = true
chrono.workspace = true
diffus.workspace = true
diffus-derive.workspace = true
dropshot.workspace = true
futures.workspace = true
hex.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion common/src/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use anyhow::bail;
use camino::{Utf8Path, Utf8PathBuf};
use diffus_derive::Diffus;
use diffus::Diffus;
use omicron_uuid_kinds::DatasetUuid;
use omicron_uuid_kinds::PhysicalDiskUuid;
use omicron_uuid_kinds::ZpoolUuid;
Expand Down
2 changes: 1 addition & 1 deletion common/src/zpool_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Zpool labels and kinds shared between Nexus and Sled Agents
use camino::{Utf8Path, Utf8PathBuf};
use diffus_derive::Diffus;
use diffus::Diffus;
use omicron_uuid_kinds::ZpoolUuid;
use schemars::JsonSchema;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
Expand Down
1 change: 1 addition & 0 deletions nexus/reconfigurator/planning/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ anyhow.workspace = true
clickhouse-admin-types.workspace = true
chrono.workspace = true
debug-ignore.workspace = true
diffus.workspace = true
gateway-client.workspace = true
illumos-utils.workspace = true
indexmap.workspace = true
Expand Down
7 changes: 7 additions & 0 deletions nexus/reconfigurator/planning/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ mod test {
use chrono::Utc;
use clickhouse_admin_types::ClickhouseKeeperClusterMembership;
use clickhouse_admin_types::KeeperId;
use diffus::Diffable;
use expectorate::assert_contents;
use nexus_sled_agent_shared::inventory::ZoneKind;
use nexus_types::deployment::blueprint_zone_type;
Expand Down Expand Up @@ -909,6 +910,12 @@ mod test {
"2 -> 3 (expect new NTP zone on new sled):\n{}",
diff.display()
);
let diffus_diff = blueprint3.diff(&blueprint2);
println!("_______DIFFUS __________\n");
let change = diffus_diff.change();
println!("{:#?}", diffus_diff);
println!("{:#?}", change);
println!("________DIFFUS __________\n");
assert_contents(
"tests/output/planner_basic_add_sled_2_3.txt",
&diff.display().to_string(),
Expand Down
1 change: 0 additions & 1 deletion nexus/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cookie.workspace = true
derive-where.workspace = true
derive_more.workspace = true
diffus.workspace = true
diffus-derive.workspace = true
dropshot.workspace = true
futures.workspace = true
http.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion nexus/types/src/deployment/clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Types used in blueprints related to clickhouse configuration
use clickhouse_admin_types::{KeeperId, ServerId};
use diffus_derive::Diffus;
use diffus::Diffus;
use omicron_common::api::external::Generation;
use omicron_uuid_kinds::OmicronZoneUuid;
use schemars::JsonSchema;
Expand Down
2 changes: 1 addition & 1 deletion nexus/types/src/deployment/planning_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::external_api::views::SledState;
use chrono::DateTime;
use chrono::Utc;
use clap::ValueEnum;
use diffus_derive::Diffus;
use diffus::Diffus;
use ipnetwork::IpNetwork;
use omicron_common::address::IpRange;
use omicron_common::address::Ipv6Subnet;
Expand Down
4 changes: 2 additions & 2 deletions nexus/types/src/deployment/zone_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! that is not needed by sled-agent.
use super::OmicronZoneExternalIp;
use diffus_derive::Diffus;
use diffus::Diffus;
use nexus_sled_agent_shared::inventory::OmicronZoneDataset;
use nexus_sled_agent_shared::inventory::OmicronZoneType;
use nexus_sled_agent_shared::inventory::ZoneKind;
Expand Down Expand Up @@ -328,7 +328,7 @@ pub mod blueprint_zone_type {
use crate::deployment::OmicronZoneExternalFloatingAddr;
use crate::deployment::OmicronZoneExternalFloatingIp;
use crate::deployment::OmicronZoneExternalSnatIp;
use diffus_derive::Diffus;
use diffus::Diffus;
use nexus_sled_agent_shared::inventory::OmicronZoneDataset;
use omicron_common::api::internal::shared::NetworkInterface;
use schemars::JsonSchema;
Expand Down
2 changes: 1 addition & 1 deletion nexus/types/src/external_api/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::identity::AssetIdentityMetadata;
use api_identity::ObjectIdentity;
use chrono::DateTime;
use chrono::Utc;
use diffus_derive::Diffus;
use diffus::Diffus;
use omicron_common::api::external::{
AllowedSourceIps as ExternalAllowedSourceIps, ByteCount, Digest, Error,
IdentityMetadata, InstanceState, Name, ObjectIdentity, RoleName,
Expand Down
1 change: 0 additions & 1 deletion uuid-kinds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ workspace = true

[dependencies]
diffus.workspace = true
diffus-derive.workspace = true
newtype-uuid.workspace = true
schemars = { workspace = true, optional = true }
paste.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion uuid-kinds/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub use newtype_uuid::{
};

#[cfg(feature = "diffus")]
use diffus_derive::Diffus;
use diffus::Diffus;
#[cfg(feature = "schemars08")]
use schemars::JsonSchema;

Expand Down

0 comments on commit 605e71f

Please sign in to comment.