Skip to content

Commit aed4b7a

Browse files
authored
fix: update REST API route syntax for axum 0.8 compatibility (#1330)
Change route parameter syntax from :param to {param} to fix runtime panics when starting scheduler with REST API enabled.
1 parent 6e3154b commit aed4b7a

File tree

1 file changed

+5
-5
lines changed
  • ballista/scheduler/src/api

1 file changed

+5
-5
lines changed

ballista/scheduler/src/api/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@ pub fn get_routes<
2929
.route("/api/state", get(handlers::get_scheduler_state::<T, U>))
3030
.route("/api/executors", get(handlers::get_executors::<T, U>))
3131
.route("/api/jobs", get(handlers::get_jobs::<T, U>))
32-
.route("/api/job/:job_id", patch(handlers::cancel_job::<T, U>))
32+
.route("/api/job/{job_id}", patch(handlers::cancel_job::<T, U>))
3333
.route(
34-
"/api/job/:job_id/stages",
34+
"/api/job/{job_id}/stages",
3535
get(handlers::get_query_stages::<T, U>),
3636
)
3737
.route(
38-
"/api/job/:job_id/dot",
38+
"/api/job/{job_id}/dot",
3939
get(handlers::get_job_dot_graph::<T, U>),
4040
)
4141
.route(
42-
"/api/job/:job_id/stage/:stage_id/dot",
42+
"/api/job/{job_id}/stage/{stage_id}/dot",
4343
get(handlers::get_query_stage_dot_graph::<T, U>),
4444
)
4545
.route("/api/metrics", get(handlers::get_scheduler_metrics::<T, U>));
4646

4747
#[cfg(feature = "graphviz-support")]
4848
let router = router.route(
49-
"/api/job/:job_id/dot_svg",
49+
"/api/job/{job_id}/dot_svg",
5050
get(handlers::get_job_svg_graph::<T, U>),
5151
);
5252

0 commit comments

Comments
 (0)