Skip to content

feat(scheduler): Redirect '/' to nighlies.a.o WebTUI#2059

Open
martin-g wants to merge 14 commits into
mainfrom
redirect-root-to-nightlies
Open

feat(scheduler): Redirect '/' to nighlies.a.o WebTUI#2059
martin-g wants to merge 14 commits into
mainfrom
redirect-root-to-nightlies

Conversation

@martin-g

Copy link
Copy Markdown
Member

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.o

Are there any user-facing changes?

No API changes!
New GET endpoint is added.

@martin-g
martin-g marked this pull request as draft July 16, 2026 12:07
@martin-g
martin-g marked this pull request as ready for review July 16, 2026 12:56
@martin-g
martin-g requested a review from milenkovicm July 16, 2026 12:56
@milenkovicm

Copy link
Copy Markdown
Contributor

Can we override endpoint using configuration?

@milenkovicm milenkovicm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@martin-g martin-g Jul 17, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also take into account external_host from scheduler configuration g?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with aed9569

@martin-g
martin-g force-pushed the redirect-root-to-nightlies branch from f7f6bd9 to 1c81a45 Compare July 17, 2026 17:40
@martin-g

Copy link
Copy Markdown
Member Author

Can we override endpoint using configuration?

Done with 327979a

@martin-g

Copy link
Copy Markdown
Member Author

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

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:

HeaderValue::from_static("http://localhost:8080"),
HeaderValue::from_static("https://nightlies.apache.org"),

So, unless you overwrite this with --cors-allowed-origins=... when starting the Scheduler this shouldn't be the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants