Skip to content

Conversation

blink-so[bot]
Copy link
Contributor

@blink-so blink-so bot commented Aug 20, 2025

Adds /api/status healthcheck to the JupyterLab module to prevent the app from showing as ready before JupyterLab server is fully started and responding.

Changes

  • Added healthcheck block to coder_app resource
  • Uses JupyterLab's built-in /api/status endpoint
  • 5-second interval with 6 successful checks required (30 seconds total)
  • Handles both subdomain true and false cases

Testing

Use this module in your template:

module "jupyterlab" {
  source   = "git::https://github.com/coder/registry.git//registry/coder/modules/jupyterlab?ref=blink/jupyterlab-healthcheck"
  agent_id = coder_agent.main.id
}

Fixes #345

Adds /api/status healthcheck to prevent the app from showing as ready
before JupyterLab server is fully started and responding.

Fixes: #345
Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

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

Suggested a few things. Also snippet should be as in how to use the module a copy pastable block with source set to the correct git path and branch.

Comment on lines 83 to 85
# 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
Copy link
Member

Choose a reason for hiding this comment

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

Remove the comment.

# 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"
Copy link
Member

Choose a reason for hiding this comment

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

This should handle both subdomain true and false case.

@matifali matifali self-assigned this Aug 20, 2025
- Remove testing comment as requested
- Update healthcheck URL to handle both subdomain true/false cases
- Match the same URL pattern as the main app URL
@bpmct bpmct closed this Aug 23, 2025
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.

JupyterLab module does not include app health checks, therefore shows up too early

2 participants