milenkovicm commented on code in PR #1506:
URL:
https://github.com/apache/datafusion-ballista/pull/1506#discussion_r2936722133
##########
ballista/scheduler/src/scheduler_process.rs:
##########
@@ -130,17 +132,42 @@ pub async fn start_grpc_service<
tonic_builder.add_service(ExternalScalerServer::new(scheduler.clone()));
let tonic = tonic_builder.routes().into_axum_router();
- let tonic = tonic.fallback(|| async { (StatusCode::NOT_FOUND, "404 - Not
Found") });
+
+ // registering default handler for unmatched requests
+ let tonic =
+ tonic.fallback(|| async {
SchedulerErrorResponse::new(StatusCode::NOT_FOUND) });
#[cfg(feature = "rest-api")]
- let axum = get_routes(Arc::new(scheduler));
- #[cfg(feature = "rest-api")]
- let final_route = axum
- .merge(tonic)
- .into_make_service_with_connect_info::<SocketAddr>();
+ let final_route = if config.disable_rest {
+ tonic
+ .route(
+ "/api/{*path}",
Review Comment:
api module not loaded if rest api disabled, but i agree with you otherwise
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]