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

PostgreSQL v0.3.1 breaks Linux support #392

Closed
karabaja4 opened this issue May 30, 2023 · 10 comments
Closed

PostgreSQL v0.3.1 breaks Linux support #392

karabaja4 opened this issue May 30, 2023 · 10 comments
Labels
M2 Issues to be handled June 2023 Release-v0.4 Bug fix to be included in Release-v0.4 of PgSql extension

Comments

@karabaja4
Copy link

karabaja4 commented May 30, 2023

Hello,

seems that an upgrade of PostgreSQL to v0.3.1 does not include Linux support:

2023-05-30_22-12

Upon further investigation seems config.json does not include pgtoolsservice Linux download definition at all, which is why service-downloader fails to download it.

Also pgtoolsservice v1.7.1 releases page doesn't seem to include a Linux precompiled version which would be where the extension would look for it.

I successfully managed to compile my own pgtoolsservice for Linux and run it with the extension, but it's been a hassle.

Is this extension not packaged for Linux anymore?

@patrykwegrzyn
Copy link

im having the same issue

@alllballls
Copy link

same.

@GaryHopeMS GaryHopeMS added the M2 Issues to be handled June 2023 label Jun 2, 2023
@GaryHopeMS
Copy link
Collaborator

GaryHopeMS commented Jun 2, 2023

The lack inclusion of Linux binaries as part of the v0.3.1 build was a miss, it will be addressed as part of the next release (M2).
See #397
In the interim please download and install the v0.2.7 release from https://github.com/microsoft/azuredatastudio-postgresql/releases/tag/v0.2.7 using the instructions to install extension from VSX here https://learn.microsoft.com/en-us/sql/azure-data-studio/extensions/add-extensions?view=sql-server-ver16#install-from-a-vsix

@jasonweaver
Copy link

jasonweaver commented Jun 5, 2023

In the interim please download and install the v0.2.7 release from https://github.com/microsoft/azuredatastudio-postgresql/releases/tag/v0.2.7 using the instructions to install extension from VSX here https://learn.microsoft.com/en-us/sql/azure-data-studio/extensions/add-extensions?view=sql-server-ver16#install-from-a-vsix

In addition to manually installing the extension I had to also chmod ossdbtoolsservice_main per this.

@nasc17
Copy link
Collaborator

nasc17 commented Jun 22, 2023

Issue has been addressed in our unstable release of PostgreSQL extension v0.4.0-insiders. We would appreciate your verification that it has been handled appropriately.

@nasc17 nasc17 added the Release-v0.4 Bug fix to be included in Release-v0.4 of PgSql extension label Jun 22, 2023
@karabaja4
Copy link
Author

karabaja4 commented Jun 22, 2023

@nasc17

Download still fails because service-downloader downloadFileNames object has "Linux_64" field and platform parameter (on Arch Linux) for me is "Ubuntu_16", which also seems to be default in getRuntimeIdLinux (I assume Arch is using Ubuntu prebuilt).

However, if I cheat and modify serviceDownloadProvider.js this way:

L85    //const fileName = this.getDownloadFileName(platform);
L86    const installDirectory = this.getInstallDirectory(platform);
L87    const urlString = 'https://github.com/microsoft/pgtoolsservice/releases/download/1.8.0-insiders/pgsqltoolsservice-linux-x64-insiders.tar.gz';

The pgsqltoolsservice is downloaded but fails to start when the download is finished:
image

However after a restart Postgres extension seems to work:
image
image

@nasc17
Copy link
Collaborator

nasc17 commented Jun 22, 2023

@nasc17

Download still fails because service-downloader downloadFileNames object has "Linux_64" field and platform parameter (on Arch Linux) for me is "Ubuntu_16", which also seems to be default in getRuntimeIdLinux (I assume Arch is using an Ubuntu prebuilt).

However, if I cheat and modify serviceDownloadProvider.js this way:

L85    //const fileName = this.getDownloadFileName(platform);
L86    const installDirectory = this.getInstallDirectory(platform);
L87    const urlString = 'https://github.com/microsoft/pgtoolsservice/releases/download/1.8.0-insiders/pgsqltoolsservice-linux-x64-insiders.tar.gz';

The pgsqltoolsservice is downloaded but fails to start when the download is finished: image

However after a restart Postgres extension seems to work: image image

Thank you so much for quick feedback. We will keep you posted on updates. Stable version of extension will be released soon.

@karabaja4
Copy link
Author

karabaja4 commented Jul 4, 2023

Hi @nasc17

Trying to install v0.4.1 from the Extensions screen still fails with Failed to start PGSQL tools service, because this._config.downloadFileNames in node_modules/service-downloader/out/serviceDownloadProvider.js still does not include Ubuntu_16:

JSON.stringify(this._config)

{
    "executableFiles": [
        "pgsqltoolsservice/ossdbtoolsservice_main",
        "pgsqltoolsservice/ossdbtoolsservice_main.exe"
    ],
    "installDirectory": "/home/igor/.azuredatastudio/extensions/microsoft.azuredatastudio-postgresql-0.4.1/out/ossdbtoolsservice/{#platform#}/{#version#}",
    "downloadFileNames": {
        "OSX_ARM64": "osx-arm64.tar.gz",
        "Windows_86": "win-x86.zip",
        "Windows_64": "win-x64.zip",
        "OSX": "osx.tar.gz",
        "Linux_64": "linux-x64.tar.gz"
    },
    "version": "v1.8.0",
    "downloadUrl": "https://github.com/Microsoft/pgtoolsservice/releases/download/{#version#}/pgsqltoolsservice-{#fileName#}",
    "proxy": "",
    "strictSSL": true
}

P.S. Why is there a switch case for every distribution name/version, for example node_modules/service-downloader/out/platform.js in getRuntimeIdLinux(), if they all use the same binary (tarball) linux-x64.tar.gz? Couldn't all distributions just use the same runtime ID?

@nasc17
Copy link
Collaborator

nasc17 commented Jul 7, 2023

Hi @karabaja4 The config file has been updated in version 0.4.2 of the extension. We would appreciate if you could help to verify this has resolved your issue. Thank you.

@karabaja4
Copy link
Author

Hi @nasc17 , yes it works now. Thanks for resolving this issue, I will close it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M2 Issues to be handled June 2023 Release-v0.4 Bug fix to be included in Release-v0.4 of PgSql extension
Projects
None yet
Development

No branches or pull requests

6 participants