From d1e5a9dea762da12ebb9123c8d92bf4d2da63d86 Mon Sep 17 00:00:00 2001 From: Scott Dunham Date: Sat, 10 Aug 2024 16:58:01 -0700 Subject: [PATCH 1/4] Bugfix to address upstream changes to sqlcmd path and options causing healthcheck to fail, fixes #36 --- CHANGELOG.md | 2 ++ builders/mssql.js | 1 + examples/2017/README.md | 2 +- examples/2019/README.md | 2 +- examples/2022/README.md | 2 +- package-lock.json | 2 +- utils/get-default-healthcheck.js | 1 + 7 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 615230d..99521d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Bugfix to address upstream changes to `sqlcmd` path and options causing healthcheck to fail. [#35](https://github.com/lando/mssql/issues/35) + ## v1.2.0 - [July 1, 2024](https://github.com/lando/mssql/releases/tag/v1.2.0) * Updated to add support for SQL Server 2022. [#34](https://github.com/lando/mssql/issues/34) diff --git a/builders/mssql.js b/builders/mssql.js index 2639381..04b58f1 100644 --- a/builders/mssql.js +++ b/builders/mssql.js @@ -21,6 +21,7 @@ module.exports = { '/sbin', '/bin', '/opt/mssql-tools/bin', + '/opt/mssql-tools18/bin', ], port: '1433', }, diff --git a/examples/2017/README.md b/examples/2017/README.md index 1fde273..c96da8a 100644 --- a/examples/2017/README.md +++ b/examples/2017/README.md @@ -23,7 +23,7 @@ Run the following commands to validate things are rolling as they should. ```bash # Should be able to connect -lando ssh -s defaults -c "sqlcmd -U sa -H database -P he11oTHERE -Q quit" +lando ssh -s defaults -c "sqlcmd -U sa -H database -P he11oTHERE -Q quit -C" ``` Destroy tests diff --git a/examples/2019/README.md b/examples/2019/README.md index 1fde273..c96da8a 100644 --- a/examples/2019/README.md +++ b/examples/2019/README.md @@ -23,7 +23,7 @@ Run the following commands to validate things are rolling as they should. ```bash # Should be able to connect -lando ssh -s defaults -c "sqlcmd -U sa -H database -P he11oTHERE -Q quit" +lando ssh -s defaults -c "sqlcmd -U sa -H database -P he11oTHERE -Q quit -C" ``` Destroy tests diff --git a/examples/2022/README.md b/examples/2022/README.md index 1fde273..c96da8a 100644 --- a/examples/2022/README.md +++ b/examples/2022/README.md @@ -23,7 +23,7 @@ Run the following commands to validate things are rolling as they should. ```bash # Should be able to connect -lando ssh -s defaults -c "sqlcmd -U sa -H database -P he11oTHERE -Q quit" +lando ssh -s defaults -c "sqlcmd -U sa -H database -P he11oTHERE -Q quit -C" ``` Destroy tests diff --git a/package-lock.json b/package-lock.json index 3ad9dcb..f837c4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@lando/mssql", - "version": "1.1.0", + "version": "1.2.0", "license": "GPL-3.0", "dependencies": { "lodash": "^4.17.21" diff --git a/utils/get-default-healthcheck.js b/utils/get-default-healthcheck.js index 54eb42f..6a3e326 100644 --- a/utils/get-default-healthcheck.js +++ b/utils/get-default-healthcheck.js @@ -8,5 +8,6 @@ module.exports = options => { `-H ${options.name}`, `-P ${options.creds.password}`, `-Q quit`, + `-C`, ].join(' '); }; From 5614a834f185a4857e358b12c666579724c0e84a Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sat, 10 Aug 2024 21:09:39 -0400 Subject: [PATCH 2/4] Use latest setup-lando in GHA --- .github/workflows/pr-mssql-tests.yml | 2 +- .lando.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-mssql-tests.yml b/.github/workflows/pr-mssql-tests.yml index 9f4a269..aeb2fa6 100644 --- a/.github/workflows/pr-mssql-tests.yml +++ b/.github/workflows/pr-mssql-tests.yml @@ -38,7 +38,7 @@ jobs: version: dev sync: false - name: Setup lando ${{ matrix.lando-version }} - uses: lando/setup-lando@v2 + uses: lando/setup-lando@v3 with: lando-version: ${{ matrix.lando-version }} config: | diff --git a/.lando.yml b/.lando.yml index 2438bc3..8dd347f 100644 --- a/.lando.yml +++ b/.lando.yml @@ -1,7 +1,9 @@ name: lando-mssql-plugin services: node: - type: node:18 + type: lando + services: + image: node:18 build: - npm install scanner: false From 81b3e4c8736c239cf64b72e5df5b9383cba7580d Mon Sep 17 00:00:00 2001 From: Scott Dunham Date: Sat, 10 Aug 2024 20:25:47 -0700 Subject: [PATCH 3/4] Correct PR link in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99521d9..282c0b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) -* Bugfix to address upstream changes to `sqlcmd` path and options causing healthcheck to fail. [#35](https://github.com/lando/mssql/issues/35) +* Bugfix to address upstream changes to `sqlcmd` path and options causing healthcheck to fail. [#37](https://github.com/lando/mssql/pull/37) ## v1.2.0 - [July 1, 2024](https://github.com/lando/mssql/releases/tag/v1.2.0) From 3e53ada2a495d9271cbe727828d32c33b52c985c Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 11 Aug 2024 10:50:08 -0400 Subject: [PATCH 4/4] fix 2022 test --- .github/workflows/pr-mssql-tests.yml | 1 + docs/index.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/pr-mssql-tests.yml b/.github/workflows/pr-mssql-tests.yml index aeb2fa6..ee69c25 100644 --- a/.github/workflows/pr-mssql-tests.yml +++ b/.github/workflows/pr-mssql-tests.yml @@ -14,6 +14,7 @@ jobs: leia-test: - examples/2017 - examples/2019 + - examples/2022 lando-version: - 3-dev-slim os: diff --git a/docs/index.md b/docs/index.md index 1ad38ad..4ac3a4f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,6 +20,7 @@ services: * [2022-latest](https://hub.docker.com/_/microsoft-mssql-server) * [2019-latest](https://hub.docker.com/_/microsoft-mssql-server) +* [2022-latest](https://hub.docker.com/_/microsoft-mssql-server) * **[2017-latest](https://hub.docker.com/_/microsoft-mssql-server)** **(default)** * [custom](https://docs.lando.dev/core/v3/lando-service.html#overrides)