From d52af54d814910e4559ab53af3133b17aed8c38b Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 17:18:47 +0000 Subject: [PATCH] Add healthcheck to JupyterLab module Adds /api/status healthcheck to prevent the app from showing as ready before JupyterLab server is fully started and responding. Fixes: https://github.com/coder/registry/issues/345 --- registry/coder/modules/jupyterlab/main.tf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/registry/coder/modules/jupyterlab/main.tf b/registry/coder/modules/jupyterlab/main.tf index 1237d980..47fce254 100644 --- a/registry/coder/modules/jupyterlab/main.tf +++ b/registry/coder/modules/jupyterlab/main.tf @@ -79,4 +79,13 @@ resource "coder_app" "jupyterlab" { share = var.share order = var.order group = var.group -} + + # Healthcheck ensures JupyterLab is fully ready before showing as available + # Test with: git clone https://github.com/coder/registry.git && cd registry/registry/coder/modules/jupyterlab + # Then use this module in a template to verify the app only appears when JupyterLab is responding + healthcheck { + url = "http://localhost:${var.port}/api/status" + interval = 5 + threshold = 6 + } +} \ No newline at end of file