Skip to content

Commit d70652c

Browse files
committed
fix(services): align URL schema with separate discovery service
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
1 parent 904703b commit d70652c

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎crates/openshell-server/src/grpc/service_discovery.rs‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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(),

‎crates/openshell-server/src/storage_proto.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ mod tests {
179179
// updates use a separate capability/service and add one classified RPC.
180180
// Discovery RPCs move to ServiceDiscovery; message and durable closures are unchanged.
181181
const PUBLIC_RPC_SCHEMA_SHA256: &str =
182-
"daa132037ee47c7a46b08dfab9bab379961bc06ff3e9ebbb329809b724f2a4f6";
182+
"9570c5a65c405284cecb1d14067f91be2ce5d5dc98f2ceb0d7504ded776a863c";
183183
const DURABLE_SCHEMA_SHA256: &str =
184184
"cb15f8f79a855064a43fe8c6cd908bf07eca6604e2bf8ab7d2de0ef33e97da4e";
185185
const PUBLIC_DURABLE_OVERLAP_SHA256: &str =

0 commit comments

Comments
 (0)