Skip to content

feat: add healthcheck and config options to JupyterLab Module #363

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

Merged
merged 9 commits into from
Aug 23, 2025

Conversation

bpmct
Copy link
Member

@bpmct bpmct commented Aug 23, 2025

Description

Simplified JupyterLab module configuration and added automatic CSP headers for iFrame embedding for Coder Tasks. The module now works out of the box without requiring users to manually configure Content-Security-Policy headers.

Changes:

  • Removed redundant configuration examples from README that duplicated existing module variables
  • Added fallback CSP configuration when user doesn't provide custom config
  • Cleaned up locals logic with better naming and clearer conditionals
  • Updated README to show minimal usage with CSP example for custom configurations

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/jupyterlab
New version: v1.2.0
Breaking change: [x] Yes [ ] No

Breaking change: Config behavior changed - now automatically includes CSP when no user config provided

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

Closes #345

@Copilot Copilot AI review requested due to automatic review settings August 23, 2025 02:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds health check functionality and automatic CSP configuration to the JupyterLab module to simplify setup for iframe embedding in Coder workspaces.

  • Added automatic Content-Security-Policy fallback configuration when no custom config is provided
  • Added health check endpoint monitoring for the JupyterLab service
  • Introduced configurable JupyterLab server settings through a new config variable

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
registry/coder/modules/jupyterlab/main.tf Added locals for CSP fallback config, new config variable, config script resource, and healthcheck block
registry/coder/modules/jupyterlab/main.test.ts Added test coverage for config file creation and validation of empty config behavior
registry/coder/modules/jupyterlab/README.md Updated documentation with configuration examples and CSP requirements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@matifali matifali added the version:minor Add to PRs requiring a minor version upgrade label Aug 23, 2025
Copy link

❌ Version Bump Validation Failed

Bump Type: minor

Module versions need to be updated but haven't been bumped yet.

Required Actions:

  1. Run the version bump script locally: ./.github/scripts/version-bump.sh minor
  2. Commit the changes: git add . && git commit -m "chore: bump module versions (minor)"
  3. Push the changes: git push

Script Output:

🔍 Detecting modified modules...
Found modules:
registry/coder/modules/jupyterlab

📦 Processing: coder/jupyterlab
Found git tag: release/coder/jupyterlab/v1.1.1 (v1.1.1)
Current version: 1.1.1
New version: 1.2.0
Updating version references for coder/jupyterlab in registry/coder/modules/jupyterlab/README.md

🔧 Running formatter to ensure consistent formatting...

📋 Summary:
Bump Type: minor

Modules Updated:

- coder/jupyterlab: v1.1.1 → v1.2.0

READMEs Updated:

- coder/jupyterlab

✅ Version bump completed successfully!
📝 README files have been updated with new versions.

Next steps:
1. Review the changes: git diff
2. Commit the changes: git add . && git commit -m 'chore: bump module versions (minor)'
3. Push the changes: git push

Please update the module versions and push the changes to continue.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@bpmct bpmct enabled auto-merge (squash) August 23, 2025 14:49
@bpmct bpmct merged commit 5764ff2 into main Aug 23, 2025
4 checks passed
@bpmct bpmct deleted the jupyterlab-health-config branch August 23, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:minor Add to PRs requiring a minor version upgrade
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