interactive icon indicating copy to clipboard operation
interactive copied to clipboard

Microsoft.DotNet.Interactive.SqlServer/1.0.0-beta.25177.1 is broken for my notebooks, had to roll back. --kernel-name issues.

Open Gryhyphen opened this issue 6 months ago • 10 comments

Describe the bug

Having the same problem as this ticket, which was closed, but had no resolution:

https://github.com/dotnet/interactive/issues/3880

using a cell with

#!connect mssql --kernel-name REDACTED "Persist Security Info=False; User ID=REDACTED; Password=REDACTED; Initial Catalog=REDACTED; Server=REDACTED; TrustServerCertificate=True;"

Get the following error

Image

error DNI103: Unrecognized parameter name '--kernel-name'

Was working previously, like a few months ago, but recently I opened up the notebook from the untouched git repository (fresh pull) to run the query again and all my notebooks are broken due to this bug. Very frustrating. Was last working around September 4th, 2024 11:26 AM, according to my git history. So some change in between then and now broke it.

It's an .ipynb notebook, just using the .NET interactive kernel.

Further information:

Rolling back to this version #r "nuget:Microsoft.DotNet.Interactive.SqlServer,1.0.0-beta.24563.1" seems to allow it to work again.

previously was getting the latest (which is broken) https://www.nuget.org/packages/Microsoft.DotNet.Interactive.SqlServer/1.0.0-beta.25177.1

Image

please advise on the breaking change here, if it will be fixed, or if this is a matter of it being depreciated/not documented what the expected behaviour should be in the latest versions. Would also be nice if the tool itself gave a warning that it was depreciating the --kernal-name param rather then just breaking.

Please complete the following:

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

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

Screenshots

If applicable, please add screenshots of the entire VS Code window.

Gryhyphen avatar May 29 '25 03:05 Gryhyphen

I'm getting the same error: Image

But: Until yesterday, the same version, Microsoft.DotNet.Interactive.SqlServer, 1.0.0-beta.25177.1 - worked fine. This is a notebook I saved a few days ago: Image

The workaround suggested by the OP - downgrading to 1.0.0-beta.24563.1, didn't make any difference. Still the same error

dgoldm avatar Jun 18 '25 06:06 dgoldm

I just noticed that in my VSCode, the Polyglot Notebooks extension was updated just yesterday, to pre-release version 1.0.6313021. I reverted to the release version (1.0.6177010). Now I no longer get the error.

dgoldm avatar Jun 18 '25 10:06 dgoldm

When using *-* as the version, you might get a version of Microsoft.DotNet.Interactive.SqlServer that is incompatible with the version of .NET Interactive you're currently running. This is confusing but until a GA release, it's an occasional hazard.

When in doubt, you can run #!about and check that the version of Microsoft.DotNet.Interactive.SqlServer you load matches the library version (minus the + and everything after it.)

.NET Interactive

© 2020-2025 Microsoft Corporation

Version: 1.0.617701+fb2fd8022ab96c55fbaf34d5e1c8c61cb01690fc

Library version: 1.0.0-beta.25177.1+fb2fd8022ab96c55fbaf34d5e1c8c61cb01690fc
                 ^----------------^

Also note that the versions in the pre-release and stable versions of Polyglot Notebooks will often be different, and the prerelease versions are not available on nuget.org. Those can be loaded from https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json.

jonsequitur avatar Jun 18 '25 16:06 jonsequitur

Thanks @jonsequitur, everything's clear now.

To test your explanation, I switched to the prerelease version here: Image

Then restarted VSCode, checked the !#about: Image

Took the Library version number, and ran this: Image

All is fine!

Although for now I'll probably stick with the release version, where I can probably trust the *-* to work

dgoldm avatar Jun 18 '25 18:06 dgoldm

Seen the same effect, and noticed that it is when trying to do the #r nuget: ... call in the same cell as the #!connect mssql ... call it doesn't work. I.e. this does not work:

Image

but this one does:

Image

It feels like it is trying to verify that the #!connect is syntactically valid before it has loaded the syntax ...

Versions:

Image

festerman avatar Jun 24 '25 11:06 festerman

Seen the same effect, and noticed that it is when trying to do the #r nuget: ... call in the same cell as the #!connect mssql ... call it doesn't work. I.e. this does not work:

This is a known bug and affects all versions. The problem here is that the syntax of the entire cell is validated before the cell is run, but until the package is loaded by #r, the #!connect mssql command is unknown. They have to be run in separate cells just as you've done.

jonsequitur avatar Jun 24 '25 15:06 jonsequitur

Same issue, but why !#about gives me this error???

Image

JeetMajumdar2003 avatar Jun 26 '25 17:06 JeetMajumdar2003

@JeetMajumdar2003 you've reversed the order - the pound sign should come first: #!about

dgoldm avatar Jun 26 '25 18:06 dgoldm

@JeetMajumdar2003 you've reversed the order - the pound sign should come first: #!about

Ohh i see, Thanks @dgoldm <3

JeetMajumdar2003 avatar Jun 26 '25 18:06 JeetMajumdar2003

Took the Library version number, and ran this: Image

Thank you, I'm new to VS so your screenshots made things really easy for me. I tried OP's version number and that didn't fix it, but the version number from your screenshot did, so thank you!

gityourheadout avatar Jun 27 '25 22:06 gityourheadout