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

Run pre_save_hook before model check #643

Merged
merged 2 commits into from
Dec 22, 2021

Conversation

davidbrochart
Copy link
Contributor

The pre_save_hook can potentially change the model, so checking for the type and content should be done after the call to the hook.
This will be needed in JupyterLab when we save documents from the back-end. In this case, the content won't be sent through the HTTP endpoint, but the hook will populate the model's content from the RTC server.

See jupyterlab/jupyterlab#11599.

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@4d2f85a). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #643   +/-   ##
=======================================
  Coverage        ?   77.73%           
=======================================
  Files           ?      110           
  Lines           ?    10465           
  Branches        ?     1419           
=======================================
  Hits            ?     8135           
  Misses          ?     1931           
  Partials        ?      399           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d2f85a...ca3ecf1. Read the comment docs.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@Zsailer Zsailer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @davidbrochart. I don't see a major risk in moving the model checks after the pre_save_hook.

@blink1073 blink1073 merged commit e789676 into jupyter-server:main Dec 22, 2021
@davidbrochart davidbrochart deleted the pre_save_hook branch December 22, 2021 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants