Description
As part of #4938, we converted the InstanceCreate
type to use a validated hostname. This ensures that all new instances have valid hostnames. However, to handle any existing instances which might have had invalid hostnames, we kept the hostname in the DB model type as a generic string:
omicron/nexus/db-model/src/instance.rs
Lines 49 to 54 in 8e26331
It's also a string in the publicly returned instance view type, as well as in the sled-agent's API. This issue tracks converting all those code paths to use a validated hostname newtype, so that we only ever work with valid hostnames for this field. This will require a small SQL wrapper type like we have for the various unsigned integers, that impls {To,From}Sql
.