Skip to content

Add jupyter_server_documents to fix window OS file corruption due to CRLF#1030

Open
rliuamzn wants to merge 2 commits intoaws:mainfrom
rliuamzn:main
Open

Add jupyter_server_documents to fix window OS file corruption due to CRLF#1030
rliuamzn wants to merge 2 commits intoaws:mainfrom
rliuamzn:main

Conversation

@rliuamzn
Copy link

Description

Bug being fixed: Updates are broken on files using CRLF line terminators

Add jupyter_server_documents (JSD) and upgrade jupyter-collaboration to fix above bug in collaboration experience where files generated on windows OS will be broken upon edit inside JupyterLab. This issue has been currently fixed in JSD, PR177, but to incorporate that fix in SMD, we need to incorporate JSD into SMD.

JSD is the long-term collaboration library, which is based on juptyer-collaboration and disables a few conflicting extensions, such as jupyter-docprovider.

Package updates

+conda-forge::jupyter_server_documents[version='>=0.1.0,<0.2.0'] -> new package
+conda-forge::jupyter-collaboration[version='>=4.1.2,<4.2.0'] -> upgrade existing package

Additional change:

In SMD 3 template, we need to remove all code that enables/disables jupyter-docprovider, which will break JSD functionality.

We don't need to do this in SMD2 template as there's no mentioning of jupyter-docprovider.

Type of Change

  • Image update - Bug fix
  • Image update - New feature
  • Image update - Breaking change
  • SMD image build tool update
  • Documentation update

Release Information

Does this change need to be included in patch version releases? By default, any pull requests will only be added to the next SMD image minor version release once they are merged in template folder. Only critical bug fix or security update should be applied to new patch versions of existed image minor versions.

  • Yes (Critical bug fix or security update)
  • No (New feature or non-critical change)
  • N/A (Not an image update)

If yes, please explain why:
[Explain the criticality of this change and why it should be included in patch releases]

SMD customers that use windows OS to import files will experience broken experience.

How Has This Been Tested?

I have built 2 test images (SMD2 and SMD3) with the change and used these images in SM Space in my SMUS project. I uploaded test_num.py, a python file from window OS, and verified it will not be corrupted after edit.

SMD2 test recording:

smd_2_jsd.mov

SMD3 test recording:

smd_3_jsd.mov

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Test Screenshots (if applicable):

Custom built images for SMD2 and 3 has been tested with JSD-0.1.0a9 previously.

Related Issues

[Link any related issues here]
jupyter-ai-contrib/jupyter-server-documents#176

Additional Notes

[Any additional information that might be helpful for reviewers]

@rliuamzn rliuamzn requested a review from a team as a code owner January 16, 2026 18:50
# Start Jupyter server in rtc mode for shared spaces
if [ -n "$SAGEMAKER_APP_TYPE_LOWERCASE" ] && [ "$SAGEMAKER_SPACE_TYPE_LOWERCASE" == "shared" ]; then
jupyter labextension enable @jupyter/collaboration-extension
jupyter labextension enable @jupyter/docprovider-extension
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also test in SageMaker AI Studio since these changes would impact that environment too?

Choose a reason for hiding this comment

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

Hey @rliuamzn , I was looking into integrating JSD on SMAI side. I am happy to assist you with any testing needed. Can we sync on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updates are broken on files using CRLF line terminators

3 participants