azuredatastudio: Notebook - Insert Link when linking to parent's parent folder gets inadvertently updated (and not working)

  • Azure Data Studio Version: Version: 1.31.0-insider (user setup) Commit: 5fa53c3519eb0ad6b6b4fd815a2336133cc1fb99 Date: 2021-06-29T05:47:05.813Z VS Code: 1.56.0 Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Windows_NT x64 10.0.19043

Update on 7/2/2021:

Issues described in this bug:

  1. Insert Link GUI does not work as expected as described below.
  2. Creating link to parent’s (grand parent’s) notebooks/files don’t work either. URI doesn’t get parsed properly.

Steps to Reproduce:

  1. Save the SQL 2019 BDC notebook locally.
  2. Create a folder inside diagnose, call it julie. Create a new notebook file inside diagnose/julie.
  3. Create a link to C:\Temp\SQL2019BDC\sqlserver2019\content\troubleshooters\tsg100-troubleshoot-bdc.ipynb using Insert Link in WYSIWYG mode.

Note: this path must be a full path and must be at least two parents above where your current notebook is. The way I did this was via right click > Copy Full Path from the target notebook. See the gif below. My home folder for the SQL 2019 BDC is C:\Temp\SQL2019BDC, so to repro this you need to update C:\Temp\SQL2019BDC to where you store your SQL2019BDC.

  1. Once Insert Link is created it looks proper, i.e. ..\..\troubleshooters\tsg100-troubleshoot-bdc.ipynb.
  2. Create a new link (with the target link to C:\Temp\SQL2019BDC\sqlserver2019\content\troubleshooters\tsg100-troubleshoot-bdc.ipynb) using Insert Link in WYSIWYG mode again. The first link that got created from step 4 will get updated to: .\....\troubleshooters\tsg100-troubleshoot-bdc.ipynb; the second link is still OK, i.e. ..\..\troubleshooters\tsg100-troubleshoot-bdc.ipynb.

Note: this second link’s path must be a full path and must be at least two parents above where your current notebook is, just like the instruction on step 3 above.

InsertLinkParentParentNotebook

Here’s an example of what it looks like after Step 5.

| Updates | Comment | Read | Video |
| --- | --- | --- | --- |
| 1\. TSG101 | more robust | [how to](.\....\troubleshooters\tsg100-troubleshoot-bdc.ipynb)<br> |  |
| 2\. TSG036 | test | [how to](..\log-analyzers\tsg036-get-controller-logs.ipynb#steps)<br> | [test](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/notebooks-guidance?view=sql-server-ver15) |
| 3\. TSG046 | more robust | [how to](..\..\troubleshooters\tsg100-troubleshoot-bdc.ipynb)<br> | [TEST](https://docs.microsoft.com/en-us/sql/azure-data-studio/notebooks/notebooks-guidance?view=sql-server-ver15) |
|  |  |  |  |

Note: to clarify Insert Link in WYSIWYG looks like this: image

I’m currently blocked when creating a link to parent’s parent file, because using Insert Link does not work and causes bad URI format, and creating a relative path also does not work (ADS shows an error) - see below comment.

Does this issue occur when all extensions are disabled?: Yes/No

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@MsSQLGirl @VasuBhog On Windows at least: It turns out if you open markdown for any reason. the link breaks permanently along with saving the file, and closing and reopening ADS or the editor on the file also breaks the link permanently with or without saving. Guess the link is only temporarily valid in the current context when its not saved.

Creating the link manually using markdown doesn’t work at all.

My full path resolves to after all of the above (copying and pasting the file location and opening the cell in markdown mode) with the relative path link of “…\…\troubleshooters\tsg100-troubleshoot-bdc.ipynb” in markdown:

<user_folder>\azuredatastudio.build\builtInExtensions\Microsoft.sqlservernotebook.build\builtInExtensions\Microsoft.sqlservernotebook\books\sqlserver2019\content\diagnose\julie…\troubleshooters\tsg100-troubleshoot-bdc.ipynb

also I noticed with the relative path in github is that the slash between the two dots disappear unless you escape it, which may explain the missing slash in the full path