-
Notifications
You must be signed in to change notification settings - Fork 62
Add DB tables & models for blueprint clickhouse clusters #6591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| use nexus_types::deployment::CockroachDbPreserveDowngrade; | ||
| use nexus_types::deployment::{ | ||
| blueprint_zone_type, BlueprintPhysicalDisksConfig, | ||
| blueprint_zone_type, BlueprintPhysicalDisksConfig, ClickhouseClusterConfig, |
There was a problem hiding this comment.
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.
jgallagher
left a comment
There was a problem hiding this 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
nexus/db-model/src/deployment.rs
Outdated
| #[diesel(table_name = bp_clickhouse_keeper_zone_id_to_node_id)] | ||
| pub struct BpClickhouseKeeperZoneIdToNodeId { | ||
| pub blueprint_id: Uuid, | ||
| pub omicron_zone_id: Uuid, |
There was a problem hiding this comment.
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>, |
Uuids below.
| max_used_keeper_id INT8 NOT NULL | ||
| cluster_name TEXT NOT NULL | ||
| cluster_secret TEXT NOT NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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)
There was a problem hiding this comment.
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.
|
Thanks for the eagle eyed review @jgallagher |
No description provided.