Commit e5e2285
authored
chore(runtime-core): Add deepnote runtime-core dependency, and use it instead of existing implementation (#355)
* chore(dep): Update deepnote database integrations package
* Reformat code
* chore(runtime-core): Add deepnote runtime-core dependency, and use it instead of existing implementation
* Refactor Deepnote server management to utilize a new mock child process helper
- Introduced `createMockChildProcess` in `deepnoteTestHelpers.ts` for consistent mock process creation in tests.
- Updated `DeepnoteLspClientManager` and `DeepnoteServerStarter` to include the mock process in server info.
- Removed unnecessary `runtimeCoreServerInfo` from `ProjectContext` and adjusted related logic to use the new `serverInfo` structure.
- Ensured all relevant tests are updated to reflect these changes, improving test reliability and maintainability.
* Fix eslint error
* Enhance Deepnote server stopping logic to handle missing project context
- Added a warning log when no project context is found, preventing server stop attempts.
- Updated the `stopServerForEnvironment` method to require a non-null project context, ensuring safer operation handling.
* Refactor Deepnote server management to use fileKey instead of serverKey
- Updated the DeepnoteServerStarter class to consistently use fileKey for managing pending operations and project contexts, improving clarity and reducing potential errors.
- Adjusted logging messages to reflect the change, ensuring accurate information is logged during server operations.
* Refactor DeepnoteServerStarter to remove port allocation logic
- Eliminated the port allocation serialization logic from the DeepnoteServerStarter class, as it is now handled by the @deepnote/runtime-core's startServer method.
- Updated related logging messages to reflect the changes in server startup processes.
- Adjusted unit tests to focus on SQL environment variable gathering and lifecycle orchestration, removing tests related to port reservation.
* Enhance DeepnoteServerStarter with output tracking and error reporting improvements
- Introduced a new `serverOutputByFile` map to track stdout and stderr outputs for each server instance, limiting the output length to improve performance and manageability.
- Updated error handling in the server startup process to capture and report both stdout and stderr in case of failures, providing better diagnostics.
- Adjusted the `dispose` method to ensure all internal states, including the new output tracking, are cleared appropriately.
- Enhanced unit tests to validate the new output tracking functionality and ensure proper handling of cancellation errors.
* Update error handling in DeepnoteServerStarter to improve diagnostics
- Modified the error reporting logic to ensure that stderr output is captured only when available, enhancing clarity in error messages.
- This change aims to streamline the error handling process during server startup, providing more accurate feedback in case of failures.
* Reformat code1 parent 62a5275 commit e5e2285
10 files changed
Lines changed: 361 additions & 1014 deletions
File tree
- src
- kernels/deepnote
- environments
- notebooks/deepnote
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2676 | 2676 | | |
2677 | 2677 | | |
2678 | 2678 | | |
| 2679 | + | |
2679 | 2680 | | |
2680 | 2681 | | |
2681 | 2682 | | |
| |||
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
169 | | - | |
| 172 | + | |
| 173 | + | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
| |||
0 commit comments