@@ -484,25 +484,25 @@ async fn publish_installations(
484484 previous. routes
485485 } ;
486486 for ( bytes, route) in installation. routes . iter ( ) . zip ( installed_routes) {
487- let hostname = if route. application_hostname . is_empty ( ) {
488- // Legacy reports can only be current against legacy configuration.
489- state. config . supervisor_app_listener . service_hostname (
490- workspace,
491- sandbox. object_name ( ) ,
492- & route. name ,
493- state. config . service_routing_discriminator ( ) ,
494- )
495- } else {
496- route. application_hostname . clone ( )
497- } ;
498- let label = hostname
499- . strip_suffix ( & format ! ( ".{}" , installation. service_domain) )
500- . ok_or_else ( || Status :: internal ( "installed hostname domain mismatch" ) ) ?;
501- if label. is_empty ( ) || label. len ( ) > 63 || label. contains ( '.' ) {
502- return Err ( Status :: failed_precondition (
503- "service hostname exceeds DNS label limit" ,
504- ) ) ;
505- }
487+ let hostname = if route. application_hostname . is_empty ( ) {
488+ // Legacy reports can only be current against legacy configuration.
489+ state. config . supervisor_app_listener . service_hostname (
490+ workspace,
491+ sandbox. object_name ( ) ,
492+ & route. name ,
493+ state. config . service_routing_discriminator ( ) ,
494+ )
495+ } else {
496+ route. application_hostname . clone ( )
497+ } ;
498+ let label = hostname
499+ . strip_suffix ( & format ! ( ".{}" , installation. service_domain) )
500+ . ok_or_else ( || Status :: internal ( "installed hostname domain mismatch" ) ) ?;
501+ if label. is_empty ( ) || label. len ( ) > 63 || label. contains ( '.' ) {
502+ return Err ( Status :: failed_precondition (
503+ "service hostname exceeds DNS label limit" ,
504+ ) ) ;
505+ }
506506 let version = installation_version ( & installation, bytes) ?;
507507 routes. push ( DiscoveredServiceRoute {
508508 workspace : workspace. to_string ( ) ,
0 commit comments