From 86505219f289c1780a5b3d5c0f2e73191bf7ac6e Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Mon, 16 Oct 2023 14:26:25 -0700 Subject: [PATCH] compiler panic --- nexus/db-model/src/inventory.rs | 2 -- nexus/db-model/src/schema.rs | 1 - nexus/inventory/src/builder.rs | 5 +---- nexus/src/app/background/inventory_collection.rs | 1 - nexus/types/src/inventory.rs | 2 -- schema/crdb/dbinit.sql | 1 - 6 files changed, 1 insertion(+), 11 deletions(-) diff --git a/nexus/db-model/src/inventory.rs b/nexus/db-model/src/inventory.rs index c8d15f219c..6f134fcc70 100644 --- a/nexus/db-model/src/inventory.rs +++ b/nexus/db-model/src/inventory.rs @@ -145,7 +145,6 @@ pub struct InvCollection { pub time_started: DateTime, pub time_done: DateTime, pub collector: String, - pub comment: String, } impl<'a> From<&'a Collection> for InvCollection { @@ -155,7 +154,6 @@ impl<'a> From<&'a Collection> for InvCollection { time_started: c.time_started, time_done: c.time_done, collector: c.collector.clone(), - comment: c.comment.clone(), } } } diff --git a/nexus/db-model/src/schema.rs b/nexus/db-model/src/schema.rs index 0c018c618a..bb6a2b91ee 100644 --- a/nexus/db-model/src/schema.rs +++ b/nexus/db-model/src/schema.rs @@ -1142,7 +1142,6 @@ table! { time_started -> Timestamptz, time_done -> Timestamptz, collector -> Text, - comment -> Text, } } diff --git a/nexus/inventory/src/builder.rs b/nexus/inventory/src/builder.rs index 47d29d3e87..505a87ef45 100644 --- a/nexus/inventory/src/builder.rs +++ b/nexus/inventory/src/builder.rs @@ -27,7 +27,6 @@ pub struct CollectionBuilder { errors: Vec, time_started: DateTime, collector: String, - comment: String, baseboards: BTreeSet>, cabooses: BTreeSet>, sps: BTreeMap, ServiceProcessor>, @@ -37,12 +36,11 @@ pub struct CollectionBuilder { } impl CollectionBuilder { - pub fn new(collector: &str, comment: &str) -> Self { + pub fn new(collector: &str) -> Self { CollectionBuilder { errors: vec![], time_started: Utc::now(), collector: collector.to_owned(), - comment: comment.to_owned(), baseboards: BTreeSet::new(), cabooses: BTreeSet::new(), sps: BTreeMap::new(), @@ -58,7 +56,6 @@ impl CollectionBuilder { time_started: self.time_started, time_done: Utc::now(), collector: self.collector, - comment: self.comment, baseboards: self.baseboards, cabooses: self.cabooses, sps: self.sps, diff --git a/nexus/src/app/background/inventory_collection.rs b/nexus/src/app/background/inventory_collection.rs index 97d9e11099..dd492bdf71 100644 --- a/nexus/src/app/background/inventory_collection.rs +++ b/nexus/src/app/background/inventory_collection.rs @@ -110,7 +110,6 @@ async fn inventory_activate( // Run a collection. let inventory = nexus_inventory::Collector::new( creator, - "activation", // XXX-dap useless &mgs_clients, ); let collection = diff --git a/nexus/types/src/inventory.rs b/nexus/types/src/inventory.rs index b24bc293b0..ea54f6f42c 100644 --- a/nexus/types/src/inventory.rs +++ b/nexus/types/src/inventory.rs @@ -33,8 +33,6 @@ pub struct Collection { pub time_done: DateTime, /// name of the agent doing the collecting (generally, this Nexus's uuid) pub collector: String, - /// reason for triggering this collection - pub comment: String, pub baseboards: BTreeSet>, pub cabooses: BTreeSet>, diff --git a/schema/crdb/dbinit.sql b/schema/crdb/dbinit.sql index a65f7ab26a..1c90a93afe 100644 --- a/schema/crdb/dbinit.sql +++ b/schema/crdb/dbinit.sql @@ -2590,7 +2590,6 @@ CREATE TABLE IF NOT EXISTS inv_collection ( time_started TIMESTAMPTZ NOT NULL, time_done TIMESTAMPTZ NOT NULL, collector TEXT NOT NULL, - comment TEXT NOT NULL ); -- Supports finding latest collection (to use) or the oldest collection (to -- clean up)