feat(scheduler): Redirect '/' to nighlies.a.o WebTUI#2059
Conversation
|
Can we override endpoint using configuration? |
milenkovicm
left a comment
There was a problem hiding this comment.
thanks @martin-g, it looks good, but it does redirect but for some reason im getting scheduler down when i run with default configuration, not sure why
| )); | ||
| } | ||
|
|
||
| let target = format!("{NIGHTLIES_URL}/{BALLISTA_VERSION}/?{query_string}"); |
There was a problem hiding this comment.
it would be great if we could make target configurable and forward to NIGHTLIES_URL only if there is no such configuration, this would allow users to have its own version of tui deployed somewhere else
There was a problem hiding this comment.
If they have their own deployment then they do not need to use http://localhost:50050/... at all. They could just point to their deployment.
| ) -> Result<Redirect, (StatusCode, String)> { | ||
| const NIGHTLIES_URL: &str = "https://nightlies.apache.org/datafusion/ballista/tui"; | ||
|
|
||
| let ballista_scheduler_url = |
There was a problem hiding this comment.
should we also take into account external_host from scheduler configuration g?
Opening http://localhost:50050 in a browser will now redirect to the convenience deployment of the WebTUI app at https://nightlies.apache.org/datafusion/ballista/tui/...
Use x-forwarded-proto request header to read the url protocol for Scheduler server
f7f6bd9 to
1c81a45
Compare
Done with 327979a |
You fine the error in the browser Dev Tools > Console (or Network) tab. By default the Scheduler web server allows Ajax requests from localhost:8080 and https://nightlies.apache.org: datafusion-ballista/ballista/scheduler/src/api/routes.rs Lines 88 to 89 in fbd8525 So, unless you overwrite this with |
Fallback to http://external_host:bind_port
Which issue does this PR close?
N/A
Rationale for this change
Opening http://localhost:50050 in a browser will now redirect to the convenience deployment of the WebTUI app at
https://nightlies.apache.org/datafusion/ballista/tui/...
What changes are included in this PR?
Add a new GET handler for the root (
/) that redirects to the convenience deployment of the WebTUI app at https://nightlies.a.oAre there any user-facing changes?
No API changes!
New GET endpoint is added.