Hide internal silos in utilization#4943
Conversation
| pub struct SiloUtilization { | ||
| pub silo_id: Uuid, | ||
| pub silo_name: Name, | ||
| pub silo_discoverable: bool, |
There was a problem hiding this comment.
Strictly speaking, while this is fine to add, you don't actually need this line, right? In the query you're using it in SQL directly.
There was a problem hiding this comment.
Hmmm, perhaps. I thought this struct is what generated the type to use for the dsl but that might actually be from the table! call. Yeah, regardless, it shouldn't matter.
| /// This should be updated whenever the schema is changed. For more details, | ||
| /// refer to: schema/crdb/README.adoc | ||
| pub const SCHEMA_VERSION: SemverVersion = SemverVersion::new(30, 0, 0); | ||
| pub const SCHEMA_VERSION: SemverVersion = SemverVersion::new(31, 0, 0); |
|
Logically this makes sense to me. I don't know what specifically cockroachdb supports but if this is similar to postgres you may need to use |
|
@augustuswm pointed out using
I'm not using the parenthesis after that name in the same way they've expressed so I assume what I have is okay? It wasn't clear to me if they're saying the select order matters. |
|
I've updated the PR w/ a comment in the migration about what's being added and bumped the schema version an extra number to avoid clashing with #4852 |
|
Looks like based on the failure it might need a drop / create instead of a replace. |
I reordered it such that the new column is at the end of the view and that causes it to pass. Seems like view migrations are order sensitive (which is what the docs I quoted above implied, I just didn't know if that meant for the select statement too). |
Fixes #4708.
I've updated the
/v1/system/utilization/silosendpoint to only return non-discoverable silos if they have a quota set. I believe thedefault-silodoes get a quota set currently which is non-ideal, but that should be the only one that shows up on the list.I need specific eyes on the migration b/c I've never written a view migration before.