microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.51k stars 883 forks source link

Changes (after git sync/pull) should take effect immediately from git to Notebook and Jupyter Book viewlet #9249

Open MsSQLGirl opened 4 years ago

MsSQLGirl commented 4 years ago

Steps to Reproduce:

  1. In Azure Data Studio, do a git pull from recently changed Jupyter book, to refresh your local copy with the master / remote branch.
  2. Go to Jupyter Book viewlet.

Issues: a. Jupyter Book viewlet is not updated immediately b. Jupyter Book doesn't show which files have been touched / new. (OneNote can show files that are touched / updated nicely).

adsbot[bot] commented 4 years ago

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

MsSQLGirl commented 4 years ago

Note that Jupyter Book viewlet is also not updated when toc.yml is updated as reported here: #8910. This means that if the git pull resulted in toc.yml updates, Jupyter Book viewlet is also stale.

MsSQLGirl commented 4 years ago

This is also related to #8522

MsSQLGirl commented 4 years ago

Clarifying the issues: Currently there is no way for users to know if any ipynb files or Jupyter book definition is updated. My workaround is to blindly reload ADS every once in a while (i..e Ctrl + Shift + P, and choose Developer: Reload Window). However, I will not know which are the new / updated files in Jupyter Book after reloading ADS. If I don't regularly reload, I may inadvertently overwrite on top of existing updates.

Proposing the expected behaviors Event (When this happens ...) The expected behaviors
ipynb files have been updated (by someone / something else, e.g. as a result of git pull / sync) while I have the files opened in ADS 1. When I activate the opened (and updated) file ADS will prompt me that there is a new version. Here's an example from Notepad++ image 2. Jupyter Book will mark the updated files so I know that there are updated files to pay attention to
ipynb files (of a Jupyter book) have been updated (by someone / something else, e.g. as a result of git pull / sync) while I have the Jupyter Book opened but I don't have the files opened in ADS When I navigate and open an updated ipynb file from Jupyter book viewlet / Explorer viewlet, ADS should show the latest version of the ipynb opened file
Jupyter Book definition (toc.yml) gets updated with either new, deleted or updated files in toc.yml while I have the Jupyter Book opened in ADS ADS should update the tree / hierarchy and mark which files are new / updated
chlafreniere commented 4 years ago

We still don't have a good solution for this, so moving out.

chlafreniere commented 3 years ago

Hey @barbaravaldez we talked about this at scrum. Makes more sense to be assigned to you 😄

barbaravaldez commented 3 years ago

The PR: Fix debounce issue when book toc is updated #14392 handles the case where the toc file is changed outside of ADS. We refresh the Book View to reflect those changes.

I'll keep this issue open because we still need to implement the desired scenario when a notebook or markdown file is updated and ADS needs to prompt the user if they want to reload it.

barbaravaldez commented 3 years ago

Third scenario was fixed and it's in main now. Moving this to backlog, since we are not addressing the first and second scenario for March release.

barbaravaldez commented 3 years ago

@MsSQLGirl , I tried to repro the first two scenarios by modifying notebooks outside ADS and it seems that once I save the file, ADS automatically shows the changes. I think this was fixed by https://github.com/microsoft/azuredatastudio/pull/12309

And if there's a conflict then an error message appears: editingConflict