Tweak comments and todos

This commit is contained in:
Stéphane Bidoul 2021-11-06 12:08:35 +01:00
parent bb9b372933
commit cb7dfb4642
No known key found for this signature in database
GPG key ID: BCAB2555446B5B92
2 changed files with 9 additions and 6 deletions

View file

@ -131,22 +131,22 @@ Prototype (min required to open the project):
MVP: MVP:
- deployment and more load testing
- build/log and build/init-log api endpoints - build/log and build/init-log api endpoints
- secure github webhooks
- better error handling in API (return 400 on user errors) - better error handling in API (return 400 on user errors)
- more tests - more tests
- publish runboat container image
- look at other TODO in code to see if anything important remains - look at other TODO in code to see if anything important remains
- basic UI (single page with a combo box to select repo and show builds by branch/pr, - basic UI (single page with a combo box to select repo and show builds by branch/pr,
with start/stop buttons) with start/stop buttons)
- better target_url in GitHub status: instead of providing the link to the ingress,
provide a link to the build, which redirects to the ingress if the build is started,
or to a build details page with action buttons (start, stop, view log, etc)
- secure github webhooks
- deployment and more load testing
More: More:
- shiny UI - shiny UI
- websocket stream of build changes, for a dynamic UI - websocket stream of build changes, for a dynamic UI
- better target_url in GitHub status: instead of providing the link to the ingress,
provide a link to the build, which redirects to the ingress if the build is started
- handle PR close (delete all builds for PR) - handle PR close (delete all builds for PR)
- handle branch delete (delete all builds for branch) - handle branch delete (delete all builds for branch)
- create builds for all supported repos on startup (goes with sticky branches) - create builds for all supported repos on startup (goes with sticky branches)

View file

@ -182,7 +182,7 @@ def _render_kubefiles(deployment_vars: DeploymentVars) -> Generator[Path, None,
__package__, "kubefiles" __package__, "kubefiles"
) as kubefiles_path, tempfile.TemporaryDirectory() as tmp_dir: ) as kubefiles_path, tempfile.TemporaryDirectory() as tmp_dir:
tmp_path = Path(tmp_dir) tmp_path = Path(tmp_dir)
# TODO async copytree # TODO async copytree, or make this whole _runder_kubefiles run_in_executor
shutil.copytree(kubefiles_path, tmp_path, dirs_exist_ok=True) shutil.copytree(kubefiles_path, tmp_path, dirs_exist_ok=True)
template = Template((tmp_path / "kustomization.yaml.jinja").read_text()) template = Template((tmp_path / "kustomization.yaml.jinja").read_text())
(tmp_path / "kustomization.yaml").write_text( (tmp_path / "kustomization.yaml").write_text(
@ -202,6 +202,9 @@ async def _kubectl(args: list[str]) -> None:
async def deploy(deployment_vars: DeploymentVars) -> None: async def deploy(deployment_vars: DeploymentVars) -> None:
with _render_kubefiles(deployment_vars) as tmp_path: with _render_kubefiles(deployment_vars) as tmp_path:
# Dry-run first to avoid creaing some resources when the creation of the
# deployment fails. In such cases, we would have resource leak as the existence
# of deployment is how the controller knows it has something to manage.
await _kubectl( await _kubectl(
[ [
"apply", "apply",