Skip to content
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

V7: Untrusted notebook on releoad. #6828

Closed
Carreau opened this issue Apr 5, 2023 · 6 comments
Closed

V7: Untrusted notebook on releoad. #6828

Carreau opened this issue Apr 5, 2023 · 6 comments
Labels
Milestone

Comments

@Carreau
Copy link
Member

Carreau commented Apr 5, 2023

V7 seem to emit invalid notebooks.

I see the following in the terminal

MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.
  validate(nb)

This seem to prevent notebooks to be trusted.

@Carreau Carreau added the bug label Apr 5, 2023
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to issues that need triage label Apr 5, 2023
@jtpio
Copy link
Member

jtpio commented Apr 5, 2023

This was recently investigated in jupyterlab/jupyterlab#14025.

With some incremental improvements upstream in jupyterlab/jupyterlab#14039.

cc @krassowski who probably knows more about it

@jtpio jtpio added this to the 7.0 milestone Apr 5, 2023
@krassowski
Copy link
Member

Yes it's also on my schedule for this weekend ;) this will need a PR to shared models/ydoc

@jtpio jtpio removed the status:Needs Triage Applied to issues that need triage label Apr 5, 2023
@jtpio
Copy link
Member

jtpio commented Apr 5, 2023

Nice, thanks @krassowski!

@krassowski
Copy link
Member

MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use normalize() on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.

If nbformat is fixing the issue transparently, then it should not be the reason for untrusted notebook, right? I opened jupyter/nbformat#359 to discuss.

@krassowski
Copy link
Member

@Carreau would you be able to provide a bit more detailed reproduction steps? I could not replicate this behaviour. Both Notebook and Lab emit notebooks with cell IDs present for me.

@Carreau
Copy link
Member Author

Carreau commented Apr 17, 2023

Hu, I can't in a fresh env... This is weird. Maybe there is a sequence of interaction that create a cell that has no ID... I'll close this for now and reopen if I encounter it again.

@Carreau Carreau closed this as completed Apr 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants