From c5705fefda540b3f8db0c4fd172385e201cb0b6f Mon Sep 17 00:00:00 2001 From: Thomas Santerre Date: Tue, 7 Oct 2025 13:48:10 -0300 Subject: [PATCH] fix: update REST API route syntax for axum 0.8 compatibility Change route parameter syntax from :param to {param} to fix runtime panics when starting scheduler with REST API enabled. --- ballista/scheduler/src/api/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ballista/scheduler/src/api/mod.rs b/ballista/scheduler/src/api/mod.rs index 94bc36402..05cf27180 100644 --- a/ballista/scheduler/src/api/mod.rs +++ b/ballista/scheduler/src/api/mod.rs @@ -29,24 +29,24 @@ pub fn get_routes< .route("/api/state", get(handlers::get_scheduler_state::)) .route("/api/executors", get(handlers::get_executors::)) .route("/api/jobs", get(handlers::get_jobs::)) - .route("/api/job/:job_id", patch(handlers::cancel_job::)) + .route("/api/job/{job_id}", patch(handlers::cancel_job::)) .route( - "/api/job/:job_id/stages", + "/api/job/{job_id}/stages", get(handlers::get_query_stages::), ) .route( - "/api/job/:job_id/dot", + "/api/job/{job_id}/dot", get(handlers::get_job_dot_graph::), ) .route( - "/api/job/:job_id/stage/:stage_id/dot", + "/api/job/{job_id}/stage/{stage_id}/dot", get(handlers::get_query_stage_dot_graph::), ) .route("/api/metrics", get(handlers::get_scheduler_metrics::)); #[cfg(feature = "graphviz-support")] let router = router.route( - "/api/job/:job_id/dot_svg", + "/api/job/{job_id}/dot_svg", get(handlers::get_job_svg_graph::), );