kuskus icon indicating copy to clipboard operation
kuskus copied to clipboard

Make extensions and package available for Azure Data Studio

Open SvenAelterman opened this issue 4 years ago • 3 comments

Azure Data Studio supports connecting to Data Explorer and Log Analytics Workspaces (but VS Code doesn't, AFAICT). It would be useful to have these extensions in Azure Data Studio too.

SvenAelterman avatar Dec 17 '21 15:12 SvenAelterman

Sure! Do you know what's involved in publishing an extension to Azure Data Studio? Is it the same format? Contributions are welcome on this.

rosshamish avatar Dec 17 '21 16:12 rosshamish

I don't know anything about extension publishing, but Azure Data Studio is based on VS Code. Hopefully it's quite consistent for extension development.

SvenAelterman avatar Dec 17 '21 16:12 SvenAelterman

Looks like Data Studio uses a different publishing mechanism than VS Code. But, the packaging works the same (uses vsce to create a .vsix file).

Instead of publishing to the marketplace with vsce publish, it requires a PR to the data studio repo's "extensions gallery" config. https://docs.microsoft.com/en-us/sql/azure-data-studio/extensions/extension-authoring?view=sql-server-ver15#publish-an-extension

To publish your new extension to Azure Data Studio:

  1. Add your extension to the extensions gallery.
  2. We currently don't have support to host third-party extensions. Instead of downloading the extension, Azure Data Studio has the option to browse to a download page. To set a download page for your extension, set the value of the asset Microsoft.AzureDataStudio.DownloadPage.
  3. Create a PR against release/extensions branch.
  4. Send a review request to the team.

Your extension will be reviewed and added to the extensions gallery.

I found this example commit that publishes a new extension: https://github.com/microsoft/azuredatastudio/commit/78a25b5218837adea17c2a28c74198786885a469

Updating the extension works the same way. Here's an example commit that updates an extension: https://github.com/microsoft/azuredatastudio/commit/0a80051a202383ffd4a82d2fb2692227c878fe1c#diff-997b9baee31ff8ec334ef0a7a47820ce7b5224177aa78804ab92cf91409e6bef

So in theory, it's just as easy as opening a PR against that repo, adding an item to the extensions gallery JSON with the right files and so on. It'll definitely need a download URL for the vsix. I grabbed this download URL for this kuskus extension pack from its page on the VS Code extension marketplace, https://marketplace.visualstudio.com/_apis/public/gallery/publishers/rosshamish/vsextensions/kuskus-extensions-pack/1.0.10/vspackage, and I think that would work. I do see one other extension in the Data Studio gallery that uses a URL of this form.

If you want to take a stab at this, feel free. I'll be busy for a while and don't expect to be able to look into this.

Steps would be:

  1. Publish all 4 extensions one time
  2. Add logic to each of the *-publish.yml pipelines (e.g. https://github.com/rosshamish/kuskus/blob/master/.github/workflows/kusto-extensions-pack-publish.yml) to open an "update" PR automatically

rosshamish avatar Dec 17 '21 18:12 rosshamish