-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Prevent user from breaking Toolkit's dependencies #23
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
Conversation
part of OSS-135
📝 WalkthroughWalkthroughIn DeepnoteServerStarter.startServerImpl (src/kernels/deepnote/deepnoteServerStarter.node.ts), the process environment prepared for server startup now includes DEEPNOTE_ENFORCE_PIP_CONSTRAINTS='true' — set after VIRTUAL_ENV and before removing PYTHONHOME. Separately, the Deepnote toolkit wheel URL constant in src/kernels/deepnote/types.ts was updated to use DEEPNOTE_TOOLKIT_VERSION='0.2.30.post23' (wheel URL now derived from that template). No control flow, error handling, or public/exported signatures were changed. Sequence Diagram(s)sequenceDiagram
autonumber
participant Starter as DeepnoteServerStarter
participant Env as Process Env
participant Spawn as Child Process (Jupyter server)
note over Starter,Env #f8fbff: startServerImpl prepares environment
Starter->>Env: set VIRTUAL_ENV
Starter->>Env: set DEEPNOTE_ENFORCE_PIP_CONSTRAINTS = "true"
Starter->>Env: remove PYTHONHOME
note right of Env #eef8f1: Env includes DEEPNOTE_ENFORCE_PIP_CONSTRAINTS
Starter->>Spawn: spawn(server, env=Env)
note right of Spawn #fff8e1: Jupyter server inherits env
Spawn->>Spawn: on startup, pip install flows may use\nPIP constraints (if implemented)
note over Starter,Spawn #f7f7f7: types.ts: DEEPNOTE_TOOLKIT_VERSION = 0.2.30.post23\nDEEPNOTE_TOOLKIT_WHEEL_URL derived from version
Possibly related PRs
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)**/!(*.node|*.web).ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/kernels/**/*.ts📄 CodeRabbit inference engine (.github/instructions/kernel.instructions.md)
Files:
🧠 Learnings (1)📓 Common learnings🔇 Additional comments (1)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/kernels/deepnote/types.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/!(*.node|*.web).ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Place shared cross-platform logic in common
.tsfiles (not suffixed with.nodeor.web)
Files:
src/kernels/deepnote/types.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.log
Preserve error details while scrubbing PII in messages and telemetry
Include the Microsoft copyright header in source files
Prefer async/await and handle cancellation withCancellationToken
**/*.{ts,tsx}: Order class members (methods, fields, properties) first by accessibility, then alphabetically
Separate third-party imports from local file imports
Files:
src/kernels/deepnote/types.ts
src/kernels/**/*.ts
📄 CodeRabbit inference engine (.github/instructions/kernel.instructions.md)
src/kernels/**/*.ts: Use event-driven updates (EventEmitter) for state changes
Monitor and dispose pending promises to prevent leaks during teardown
Use WeakRef/weak references for notebook/object backreferences to avoid memory leaks
Respect CancellationToken in all async operations
Files:
src/kernels/deepnote/types.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: hc2p
PR: deepnote/environments#62
File: gpu/Dockerfile:0-0
Timestamp: 2025-09-25T13:16:13.796Z
Learning: In Deepnote's Docker environment setup, packages installed in the underlying Docker image should be in system site packages, not in virtual environments. Server/kernels are launched in a virtual environment created by the installer, which creates a pth file where system site packages are appended first, giving them higher precedence and making them first in the search path. This is expected behavior for the deepnote-toolkit setup.
🔇 Additional comments (1)
src/kernels/deepnote/types.ts (1)
145-145: Wheel URL verified. URL returns HTTP 200 OK.
part of OSS-135
related to https://github.com/deepnote/deepnote-toolkit/pull/218
Summary by CodeRabbit