Repository navigation
refactor(ide): share python install helper across jupyter and marimo - #1684
Conversation
✅ Deploy Preview for images-devsy-sh canceled.
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shared installer and tests pkg/ide/internal/serverutil/python.go, pkg/ide/internal/serverutil/python_test.go |
Adds PythonTool and InstallPythonTool. The installer skips tools whose executable exists, runs uv tool install when needed, and wraps execution errors with the tool name and command output. Tests cover these cases. |
Jupyter and marimo integration pkg/ide/jupyter/jupyter.go, pkg/ide/marimo/marimo.go |
Both server installers call serverutil.InstallPythonTool and return installation errors before starting the server. Their local installation methods are removed. |
Priority:
Estimated code review effort: 2 (Simple) | ~15 minutes
Change: Refactor
Merge Risk: 
Minimal · up to 748f4
-
No installation regression is identified. The failing Windows CI check still needs investigation and a passing result before merge.
Pre-merge checks: 
3 · 
2
-
Failed checks: 2 warnings Passed checks: 3 passedFull details: Description check
-
Explanation
The description explains the refactor, rationale, validation results, CI status, and review limitations. However, it omits required template sections for the issue reference, type of change, AI assistance, checklist, and explicit manual verification details.
Resolution
Update the description to include the required template sections. State the issue reference or write "none"; mark the change as a refactor; disclose AI tool usage and complete the required attestations; record unit and integration-test decisions; list lint, test, documentation, security, and CLA checklist results; and document manual verification commands and outcomes. Include the known Windows CI failure and its blocking status.
-
Finishing Touches
-
✨ Simplify code
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
✅ Deploy Preview for devsydev canceled.
|
|
Needs human: current head 748f41f has a failing Windows ssh-tunnel-mode test (job 120819045768), so CI Success failed. The sequential-SSH spec failed during startDetachedTunnelUp with deadline_exceeded before workspace creation; three preceding specs passed. Logs do not prove a transient infrastructure failure, so no rerun or unrelated source change was made. All other CI checks are terminal. Non-test diff remains +54/-64 (118 lines); both commits are signed and verified. Auto-merge is blocked pending investigation and passing CI. Local CodeRabbit CLI was quota-limited; GitHub completed review is still required. |
|
@greptileai review |
[Low impact] The PR appears safe to merge; the shared helper preserves the existing install behavior. SummaryMoves the shared Python install steps into
Reviews (1) · Last reviewed commit: "test(ide): satisfy lint in python instal..." · Reviewed by Greptile |
|
Final cycle disposition: needs human. Greptile completed on 748f41f with 5/5 confidence, four files reviewed and no findings. CodeRabbit CLI and GitHub are quota-limited; the GitHub success status says Review rate limited and is not completed review coverage (reset advertised in 39 minutes at 08:17 UTC). CI is terminal: 99 successes including Greptile, 3 conditional skips, 7 neutral checks, and 2 failures (Windows ssh-tunnel-mode plus CI Success). No unresolved review threads. No rerun was made because logs do not establish a transient infrastructure failure. PR is ready for human investigation; workspace and branch retained for the next cycle. |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
|
@coderabbitai full review |
✅ Action performed
|
|
Current-head review disposition: CodeRabbit completed full coverage of 748f41f with no actionable findings. Its Windows failure note is stale: latest Windows ssh-tunnel-mode job 120922102759 and CI Success 120923558695 passed. Docstring warning: no change, following the refactor skill preference for self-documenting code and sparse comments. Description warning: the body follows the devsy-auto-refactor template; this is an AI-assisted behavior-preserving refactor, no linked issue, focused unit tests and full CI passed, no manual notebook installation was performed. Greptile reviewed the same head at 5/5. No unresolved threads; both commits verified. Local CodeRabbit CLI remained quota-blocked. |
Summary
serverutil.InstallPythonTool(pkg/ide/internal/serverutil/python.go) to own the existence check, install command selection, log lines, and error wrapping.jupyterandmarimoInstall()now call the helper with their ownName,Package, andExecutable. The duplicatedinstallNotebook/installMarimobodies are removed.SuOrSh(user, cmd, "")produces the samesu/sh -cargv as before.Why
Both IDEs carried a ~30-line copy of the same Python install path. The shared helper keeps install behavior and error wrapping consistent across tools, using the existing
serverutilinternal utility.Validation
Head
748f41ff08cd1b6199acd9bc05b70f1ff2a31a36.84a3290failed on the newpython_test.go(funcorder, gosec G306, gosec G304). Localcli:lint:ciat84a3290used--new-from-patch, which skips untracked files, so it did not cover that file. The earlier "0 issues" result did not include it.748f41f:useFakeUvmoved after the exported tests; the stub is written withos.OpenFile(filepath.Clean(path), …, 0o600)andf.Chmod(0o700)on the open handle; the read usesfilepath.Clean. Nonolintor#nosecadded.mise run cli:format: clean.go test ./pkg/ide/internal/serverutil/... -count=1: pass.golangci-lint run ./pkg/ide/...(full, no new-from-patch): no findings inserverutil/python*.go,jupyter/jupyter.go, ormarimo/marimo.go. The package still reports pre-existing findings in untouched files (rstudio, jetbrains, openvscode, zed, vscode, fleet, opener); out of scope.prek run --all-files: all hooks passed, including golangci-lint.jupyterandmarimohave no test files; no E2E run.CodeRabbit CLI
Blocked: free OSS quota exhausted (rate_limit). Attempts at
84a3290(--agent --fresh --committed) both returned rate_limit, about 5 min wait. A third attempt on748f41f(--agent --fresh --committed) also returned rate_limit (waitTime 2 min). No review on748f41f; no findings verified. GitHub review gates still apply.Auto-merge
Eligible under devsy-auto-refactor: behavior-preserving internal API change, +54 / -64 (118 non-test lines, cap 300), no excluded paths. Subject to all coordinator gates.
Summary by CodeRabbit