Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[devbin] Local UI development proxy server #13632

Merged
merged 6 commits into from
Oct 27, 2023

Conversation

daniel-goldstein
Copy link
Contributor

@daniel-goldstein daniel-goldstein commented Sep 15, 2023

This adds a script that runs an aiohttp server on localhost that by default proxies all requests to whatever batch namespace hailctl is pointed to but serves static assets and renders all HTML locally. This allows for local editing of HTML / CSS / SCSS files.

To run, this branch needs to be deployed in the relevant namespace (to pick up the changes to web_common.py), and you need to have the sass CLI installed (brew install sass/sass/sass). Then run in a separate terminal make devserver SERVICE=batch and open up localhost:8000. If you want to supply fake data instead of proxying an endpoint to the k8s deployment of the service, you can override that endpoint in dev_proxy.py.

If this looks good, I'll add the above instructions to the dev docs.

Resolves #13629

@daniel-goldstein
Copy link
Contributor Author

@iris-garden bump

@daniel-goldstein
Copy link
Contributor Author

@iris-garden bump. It's a bit tedious to keep resolving the requirements conflicts

@danking danking added the WIP label Oct 26, 2023
@danking
Copy link
Contributor

danking commented Oct 26, 2023

WIP until I get things merged

@iris-garden
Copy link
Contributor

@daniel-goldstein sorry for the slow review turnaround! the code looks good to me, and i'll try it out tomorrow morning to make sure i don't have any additional feedback. thanks!

@iris-garden
Copy link
Contributor

iris-garden commented Oct 27, 2023

to be included in the dev docs:

the devserver uses the default_namespace configured via hailctl dev config, so make sure to change that to your dev namespace or the default namespace as desired

whatever service you're trying to hack on the UI of needs to be pip installed, as well as web_common and gear; for example, pip install -e web_common gear batch

@danking danking merged commit 8ec5361 into hail-is:main Oct 27, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[batch] Batch should support a fast local UI development mode
3 participants