Skip to content

Conversation

@OlegWock
Copy link
Contributor

@OlegWock OlegWock commented Dec 3, 2025

This replaces legacy setup we had with deepnote/deepnote-toolkit-local-hotreload image. General idea is same, create empty container and mount source as volume, just updated to work with latest toolkit (as original version was made before major changes we did before open-sourcing)

Summary by CodeRabbit

  • Documentation

    • Updated local toolkit development setup instructions with a streamlined three-step workflow using hot-reload capabilities.
  • New Features

    • Introduced local development container setup with mounted toolkit source for immediate code reflection after kernel restart.
  • Chores

    • Updated Docker configuration and entrypoint scripts to support local development environment with editable dependency installation.

✏️ Tip: You can customize this high-level summary in your review settings.

@linear
Copy link

linear bot commented Dec 3, 2025

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

📦 Python package built successfully!

  • Version: 1.1.6.dev2+417822d
  • Wheel: deepnote_toolkit-1.1.6.dev2+417822d-py3-none-any.whl
  • Install:
    pip install "deepnote-toolkit @ https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/1.1.6.dev2%2B417822d/deepnote_toolkit-1.1.6.dev2%2B417822d-py3-none-any.whl"

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

The changes restructure local toolkit development workflows across documentation and Docker configuration. CONTRIBUTING.md documentation is updated to replace the previous Deepnote-specific image workflow with steps for local webapp hot-reload development. A new Dockerfile (jupyter-for-local-hotreload/Dockerfile) is introduced with updated system dependencies, Poetry configuration pointing to /opt/venvs, and /toolkit as the working directory. A corresponding entrypoint script (jupyter-for-local-hotreload/entrypoint.sh) validates toolkit presence, installs dependencies in editable mode, and launches the server. The legacy run-installer.sh script is removed. The flow emphasizes mounting toolkit source into the container for development.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately summarizes the main change: updating local development setup. Directly aligns with changeset updates to CONTRIBUTING.md, Dockerfile, and entrypoint scripts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a251c6b and 40a871a.

📒 Files selected for processing (4)
  • CONTRIBUTING.md (2 hunks)
  • dockerfiles/jupyter-for-local-hotreload/Dockerfile (1 hunks)
  • dockerfiles/jupyter-for-local-hotreload/entrypoint.sh (1 hunks)
  • dockerfiles/jupyter-for-local-hotreload/run-installer.sh (0 hunks)
💤 Files with no reviewable changes (1)
  • dockerfiles/jupyter-for-local-hotreload/run-installer.sh
🧰 Additional context used
🪛 Checkov (3.2.334)
dockerfiles/jupyter-for-local-hotreload/Dockerfile

[low] 1-52: Ensure that HEALTHCHECK instructions have been added to container images

(CKV_DOCKER_2)


[low] 1-52: Ensure that a user for the container has been created

(CKV_DOCKER_3)

🪛 Hadolint (2.14.0)
dockerfiles/jupyter-for-local-hotreload/Dockerfile

[warning] 16-16: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 37-37: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

🪛 markdownlint-cli2 (0.18.1)
CONTRIBUTING.md

159-159: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


166-166: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Test - Python 3.11
  • GitHub Check: Test - Python 3.10
  • GitHub Check: Test - Python 3.9
  • GitHub Check: Build and push artifacts for Python 3.10
  • GitHub Check: Build and push artifacts for Python 3.13
  • GitHub Check: Build and push artifacts for Python 3.9
  • GitHub Check: Build and push artifacts for Python 3.12
  • GitHub Check: Build and push artifacts for Python 3.11
🔇 Additional comments (2)
dockerfiles/jupyter-for-local-hotreload/entrypoint.sh (1)

1-28: Solid implementation of entrypoint logic.

Error handling is robust, git configuration for poetry-dynamic-versioning is correct, and using exec to launch the final command is appropriate. Clear error messages guide users when the toolkit source is missing. The script properly passes through CLI arguments.

dockerfiles/jupyter-for-local-hotreload/Dockerfile (1)

30-31: Poetry 2.2.0 is available and maintained.

Poetry 2.2.0 was released on September 14, 2025, and is published on PyPI. The version is recent and actively maintained, making this explicit pinning appropriate.

Comment on lines +158 to +168
1. Build the local development image:
```bash
docker build -t deepnote/jupyter-for-local:local -f ./dockerfiles/jupyter-for-local-hotreload/Dockerfile .
```

```yml
jupyter:
image: 'screwdrivercd/noop-container'
```
2. Setup `DEEPNOTE_TOOLKIT_SOURCE_PATH` env variable pointing to folder with toolkit source. This can go either in `.zshrc` (or similar file for your shell) or set per shell session with `export DEEPNOTE_TOOLKIT_SOURCE_PATH=...`. If not set, webapp will try to resolve it to `../deepnote-toolkit` relative to webapp root folder.

And change `JUPYTER_HOST` variable of executor to point to host machine:
3. In the webapp repository, run:
```bash
pnpm dev:app:local-toolkit
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add blank lines around code fences (MD031).

Lines 159–161 and 166–168 need blank lines before and after the fenced code blocks per markdown linting standards.

Apply this diff:

 1. Build the local development image:
+
     ```bash
     docker build -t deepnote/jupyter-for-local:local -f ./dockerfiles/jupyter-for-local-hotreload/Dockerfile .
     ```
+

 3. In the webapp repository, run:
+
     ```bash
     pnpm dev:app:local-toolkit
     ```
+
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

159-159: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


166-166: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🤖 Prompt for AI Agents
In CONTRIBUTING.md around lines 158 to 168, the two fenced code blocks do not
have blank lines immediately before and after them (MD031); add one blank line
before the opening ```bash and one blank line after the closing ``` for both the
docker build block (lines ~159–161) and the pnpm block (lines ~166–168),
adjusting the surrounding list spacing so the numbered list remains correct and
the markdown linter no longer flags MD031.

Comment on lines 16 to +37
RUN apt-get update && \
apt-get install -y openjdk-17-jdk && \
apt-get install --no-install-recommends -y \
rsync \
git \
# Required for pymssql
freetds-dev \
# Required for database connectivity through ODBC
unixodbc-dev \
# Required for secure connections (SSL/TLS)
libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip install poetry==2.2.0
# Install Poetry and required plugins
RUN pip install --no-cache-dir poetry==2.2.0 && \
poetry self add 'poetry-dynamic-versioning[plugin]>=1.0.0,<2.0.0'

WORKDIR /deepnote-toolkit
# Configure Poetry to create virtualenv outside the mounted source directory
RUN poetry config virtualenvs.path /opt/venvs

ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_VIRTUALENVS_IN_PROJECT=0 \
POETRY_CACHE_DIR=/tmp/poetry_cache
# Create toolkit directory (will be mounted over, but needed for initial setup)
RUN mkdir -p /toolkit /opt/venvs
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider consolidating RUN instructions to reduce layer count.

The multiple RUN commands (lines 16, 30, 34, 37) can be consolidated into fewer layers. For example, combining apt-get install, Poetry installation, Poetry config, and directory creation into two or three RUN instructions would improve build efficiency and reduce image size.

Consolidation example:

-# Install system dependencies
-RUN apt-get update && \
+# Install system dependencies and Poetry
+RUN apt-get update && \
     apt-get install --no-install-recommends -y \
     rsync \
     git \
-    # Required for pymssql
     freetds-dev \
-    # Required for database connectivity through ODBC
     unixodbc-dev \
-    # Required for secure connections (SSL/TLS)
     libssl-dev && \
     apt-get clean && \
-    rm -rf /var/lib/apt/lists/*
+    rm -rf /var/lib/apt/lists/* && \
+    pip install --no-cache-dir poetry==2.2.0 && \
+    poetry self add 'poetry-dynamic-versioning[plugin]>=1.0.0,<2.0.0' && \
+    poetry config virtualenvs.path /opt/venvs && \
+    mkdir -p /toolkit /opt/venvs

This reduces from 4+ RUN layers to 1, improving build time and image size.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Hadolint (2.14.0)

[warning] 16-16: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[info] 37-37: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.04%. Comparing base (a251c6b) to head (40a871a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #40   +/-   ##
=======================================
  Coverage   73.04%   73.04%           
=======================================
  Files          93       93           
  Lines        5149     5149           
  Branches      754      754           
=======================================
  Hits         3761     3761           
  Misses       1144     1144           
  Partials      244      244           
Flag Coverage Δ
combined 73.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@deepnote-bot
Copy link

🚀 Review App Deployment Started

📝 Description 🌐 Link / Info
🌍 Review application ra-40
🔑 Sign-in URL Click to sign-in
📊 Application logs View logs
🔄 Actions Click to redeploy
🚀 ArgoCD deployment View deployment
Last deployed 2025-12-03 09:48:58 (UTC)
📜 Deployed commit 78b6bd73294e4fcff8aae1f6f10de29444525ebe
🛠️ Toolkit version 417822d

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.

3 participants