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

Saving then re-opening .dib file merged separate cells and broke notebook #3728

Open
3 of 17 tasks
pshelton-skype opened this issue Oct 27, 2024 · 3 comments
Open
3 of 17 tasks

Comments

@pshelton-skype
Copy link

Describe the bug

I created an DotNet Interactive notebook that included separate cells running different Kusto queries within the same kernel. After saving and re-opening the notebook, five different cells (including one CSharp and four Kusto cells) running different queries were merged into one large CSharp cell with repetitive #!kql-KustoKernel magic declarations interspersed between the query logic.

Several other Kusto cells at the end after some Markdown content are all formatted as Markdown and not a Markdown cell followed by Kusto cells.

This obviously completed destroys the behavior of the notebook and is equivalent to data loss as I have to go re-format most of the cell content in the notebook.

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

.NET Interactive
© 2020 Microsoft Corporation
Version: 1.0.522904+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074
Library version: 1.0.0-beta.24229.4+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074
Build date: 2024-10-27T19:31:09.0232372Z

  • OS
    • Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Firefox
    • Safari
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)

Screenshots

Image
Image

@jonsequitur
Copy link
Contributor

Did the combined cell not work correctly? The .dib format is a plain text format and the #!kql-KustoKernel magic commands are in effect "cell" separators. They should run, although there's no way to run them individually without splitting them back out into separate cells.

Here's an example:

Image

@pshelton-skype
Copy link
Author

One of the merged cells that only contained KQL did work, but the second screenshot shows that it merged one Markdown and several KQL cells and thus the KQL cells aren't executable, they're just display content. That was the most remarkable bug.

@jonsequitur
Copy link
Contributor

Thanks. I didn't really understand what was going on in that screenshot.

I think what's going on here is that everything is treated as Markdown after we see a #!markdown magic command, and even if the #!markdown magic command comes after other code, it emits the whole cell as Markdown. That is definitely a bug but it's unrelated to the file format.

Image

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

No branches or pull requests

2 participants