Skip to content

Conversation

@andrewjstone
Copy link
Contributor

No description provided.

use nexus_types::deployment::CockroachDbPreserveDowngrade;
use nexus_types::deployment::{
blueprint_zone_type, BlueprintPhysicalDisksConfig,
blueprint_zone_type, BlueprintPhysicalDisksConfig, ClickhouseClusterConfig,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ClickhouseClusterConfig must be generated from the 3 tables. I plan to do that inside the db-query for blueprints.

Copy link
Contributor

@jgallagher jgallagher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple tiny nits

#[diesel(table_name = bp_clickhouse_keeper_zone_id_to_node_id)]
pub struct BpClickhouseKeeperZoneIdToNodeId {
pub blueprint_id: Uuid,
pub omicron_zone_id: Uuid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be DbTypedUuid<OmicronZoneKind> (a la

pub omicron_zone_id: DbTypedUuid<OmicronZoneKind>,
), and the same for the other Omicron zone Uuids below.

Comment on lines 5 to 7
max_used_keeper_id INT8 NOT NULL
cluster_name TEXT NOT NULL
cluster_secret TEXT NOT NULL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
max_used_keeper_id INT8 NOT NULL
cluster_name TEXT NOT NULL
cluster_secret TEXT NOT NULL
max_used_keeper_id INT8 NOT NULL,
cluster_name TEXT NOT NULL,
cluster_secret TEXT NOT NULL,

(and the same in dbinit.sql)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, how did I miss that 🤦. I ran the db-model tests and they passed I thought.

@andrewjstone
Copy link
Contributor Author

Thanks for the eagle eyed review @jgallagher

@andrewjstone andrewjstone enabled auto-merge (squash) September 18, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants