repl: Use uv to install ipykernel for uv-managed venv#51897
repl: Use uv to install ipykernel for uv-managed venv#51897probably-neb merged 3 commits intozed-industries:mainfrom
Conversation
crates/repl/src/repl_store.rs
Outdated
| cx.notify(); | ||
| } | ||
|
|
||
| pub fn mark_ipykernel_installed(&mut self, cx: &mut Context<Self>, spec: &PythonEnvKernelSpecification) { |
There was a problem hiding this comment.
What is the problem this function is solving, and why did adding the uv install path make this necessary?
There was a problem hiding this comment.
Oops I should have documented this better. This is admittedly a secondary bug that I just found while I was working on the uv thing, heres demo of the behavior before and after this change:
the actual behavior it fixes it that after installing the ipykernel, the repl isnt made aware of that, and it doesnt update the display, so you can just click on it again and it will 'reinstall' the kernel. worth noting that it doesn't actually effect the functionality, after the first install the kernel will work and you can run cells, it just isnt updating the UI properly.
Behavior Before:
https://github.com/user-attachments/assets/ec1134e5-637b-42cf-8e93-81fc4512de7f
Behavior After:
https://github.com/user-attachments/assets/7359f35e-0fb8-4fee-8160-165673ec219f
| "pip", | ||
| "install", | ||
| "ipykernel", | ||
| "--python", |
There was a problem hiding this comment.
Why is the --python flag here necessary? I'm sorry, but I'm not too familiar with uv tooling flag details.
There was a problem hiding this comment.
I'm not 100% sure its necessary but its a nice extra way to ensure you're calling it on the correct python installation and not like a the global python install or something.
this should make it slightly more robust to things like trying to use a kernel with a uv managed venv that isn't the one in your project directory.
## Context The permissions ceiling bug (fixed in #51948) left two open PRs (#51897, #50372) with failed `check-size` runs. The Check Runs API requires GitHub App auth, so we can't post passing checks from the CLI — it needs to run inside Actions with `checks: write`. This adds a `workflow_dispatch` workflow that takes comma-separated PR numbers, computes sizes, applies labels, and posts passing check runs. Delete after use. ## How to Review - Single file: `.github/workflows/fix-size-check.yml` - Uses the same size logic and ignored patterns as `pr-size-check.yml` - Input is `pr_numbers` (comma-separated integers), accessed via JS API, not shell interpolation ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
## Context Cleanup of the one-off workflow added in #51958. Both affected PRs (#51897, #50372) now have passing checks and correct size labels. ## How to Review - Single file deletion: `.github/workflows/fix-size-check.yml` ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
…es#51958) ## Context The permissions ceiling bug (fixed in zed-industries#51948) left two open PRs (zed-industries#51897, zed-industries#50372) with failed `check-size` runs. The Check Runs API requires GitHub App auth, so we can't post passing checks from the CLI — it needs to run inside Actions with `checks: write`. This adds a `workflow_dispatch` workflow that takes comma-separated PR numbers, computes sizes, applies labels, and posts passing check runs. Delete after use. ## How to Review - Single file: `.github/workflows/fix-size-check.yml` - Uses the same size logic and ignored patterns as `pr-size-check.yml` - Input is `pr_numbers` (comma-separated integers), accessed via JS API, not shell interpolation ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
## Context Cleanup of the one-off workflow added in zed-industries#51958. Both affected PRs (zed-industries#51897, zed-industries#50372) now have passing checks and correct size labels. ## How to Review - Single file deletion: `.github/workflows/fix-size-check.yml` ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
…es#51958) ## Context The permissions ceiling bug (fixed in zed-industries#51948) left two open PRs (zed-industries#51897, zed-industries#50372) with failed `check-size` runs. The Check Runs API requires GitHub App auth, so we can't post passing checks from the CLI — it needs to run inside Actions with `checks: write`. This adds a `workflow_dispatch` workflow that takes comma-separated PR numbers, computes sizes, applies labels, and posts passing check runs. Delete after use. ## How to Review - Single file: `.github/workflows/fix-size-check.yml` - Uses the same size logic and ignored patterns as `pr-size-check.yml` - Input is `pr_numbers` (comma-separated integers), accessed via JS API, not shell interpolation ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
## Context Cleanup of the one-off workflow added in zed-industries#51958. Both affected PRs (zed-industries#51897, zed-industries#50372) now have passing checks and correct size labels. ## How to Review - Single file deletion: `.github/workflows/fix-size-check.yml` ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
…es#51958) ## Context The permissions ceiling bug (fixed in zed-industries#51948) left two open PRs (zed-industries#51897, zed-industries#50372) with failed `check-size` runs. The Check Runs API requires GitHub App auth, so we can't post passing checks from the CLI — it needs to run inside Actions with `checks: write`. This adds a `workflow_dispatch` workflow that takes comma-separated PR numbers, computes sizes, applies labels, and posts passing check runs. Delete after use. ## How to Review - Single file: `.github/workflows/fix-size-check.yml` - Uses the same size logic and ignored patterns as `pr-size-check.yml` - Input is `pr_numbers` (comma-separated integers), accessed via JS API, not shell interpolation ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
## Context Cleanup of the one-off workflow added in zed-industries#51958. Both affected PRs (zed-industries#51897, zed-industries#50372) now have passing checks and correct size labels. ## How to Review - Single file deletion: `.github/workflows/fix-size-check.yml` ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
|
@zed-industries/approved |
Context
Closes #51874
the repl is able to recognize that the venv is managed by uv, but still runs
python -m pip install ipykernel, despite this not working. this PR fixes that behavior and uses uv to install ipkernel.How to Review
Added a path that uses uv to install ipykernel in repl_editor.rs
Added a function to repl_store.rs that allows updating the venv as having ipykernel installed after installing it.
Videos
Old Behavior:
before.mov
New Behavior:
after.mov
Self-Review Checklist
Release Notes: