Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refactor(notebook-migration-service): compute jupyter iframe url per request #7602
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
base: main
Are you sure you want to change the base?
refactor(notebook-migration-service): compute jupyter iframe url per request #7602
Changes from all commits
d2b4c3b13b4cdd96889a6File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
The block being removed also carried a deployment warning — "Do NOT deploy this service as a shared multi-user instance without adding per-user keying here". Removing the state removes one reason for it, but not the hazard:
jupyterUrlandjupyterTokenare still single process-wide values, so a shared instance would hand every user the same Jupyter and the same token.Since this is explicitly stage 1, worth keeping a line to that effect so the constraint survives to the stage that actually lifts it.
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.
Following up: #7390 notes the shared state "blocks running the service as a single global instance", and it closes with this PR — so with the warning comment going too, I'm not sure what's left tracking the jupyterUrl/jupyterToken half. Maybe a follow-up issue like #7636?
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.
This mirrors setNotebook's validation, but the comment over there still justifies itself partly with "keeps notebookName out of the raw-interpolated jupyterIframeURL JSON" — and
jupyterIframeURLis gone as of this PR. Same stale-reference class Copilot flagged on the frontend. Its path-traversal half still stands; worth fixing the other half while it's in scope.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.
This fallback is only reachable because the frontend still sends a fixed
notebook.ipynbfor every workflow. Its comment there justifies that with "each user runs their own pod, so a single notebook.ipynb never collides" — true across users, but not across one user's workflows: they all land on the samework/notebook.ipynb, so switching workflows overwrites it, and since nothing writes back from Jupyter, edits made in the panel are gone. Two tabs on different workflows likewise end up on the same file while each keeps its own cell-highlight mapping.This PR is what makes the fix possible —
notebook_<wid>.ipynbalready passes the regex and needs nothing further from the backend.Uh oh!
There was an error while loading. Please reload this page.