From 5507c36c318e9cdd658fab6f3b9e89a51979909b Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Mon, 23 Sep 2024 19:35:06 +0200 Subject: [PATCH] ci: update mssql server image to 2022-latest and update healthcheck to work (#2446) Co-authored-by: Trent Mick --- .github/workflows/test-all-versions.yml | 4 ++-- .github/workflows/unit-test.yml | 4 ++-- packages/opentelemetry-test-utils/src/test-utils.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index 3010d00341..86e8bf4dc2 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -26,14 +26,14 @@ jobs: ports: - 27017:27017 mssql: - image: mcr.microsoft.com/mssql/server:2017-latest + image: mcr.microsoft.com/mssql/server:2022-latest env: SA_PASSWORD: mssql_passw0rd ACCEPT_EULA: Y ports: - 1433:1433 options: >- - --health-cmd "/opt/mssql-tools/bin/sqlcmd -U sa -P $SA_PASSWORD -Q 'select 1' -b -o /dev/null" + --health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -C -Q 'select 1' -b -o /dev/null" --health-interval 1s --health-timeout 30s --health-start-period 10s diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 49c3711c5c..2bfb469764 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -24,14 +24,14 @@ jobs: ports: - 27017:27017 mssql: - image: mcr.microsoft.com/mssql/server:2017-latest + image: mcr.microsoft.com/mssql/server:2022-latest env: SA_PASSWORD: mssql_passw0rd ACCEPT_EULA: Y ports: - 1433:1433 options: >- - --health-cmd "/opt/mssql-tools/bin/sqlcmd -U sa -P $SA_PASSWORD -Q 'select 1' -b -o /dev/null" + --health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -C -Q 'select 1' -b -o /dev/null" --health-interval 1s --health-timeout 30s --health-start-period 10s diff --git a/packages/opentelemetry-test-utils/src/test-utils.ts b/packages/opentelemetry-test-utils/src/test-utils.ts index b6b6845677..2ecace8c35 100644 --- a/packages/opentelemetry-test-utils/src/test-utils.ts +++ b/packages/opentelemetry-test-utils/src/test-utils.ts @@ -39,7 +39,7 @@ const dockerRunCmds = { memcached: 'docker run --rm -d --name otel-memcached -p 11211:11211 memcached:1.6.9-alpine', mssql: - 'docker run --rm -d --name otel-mssql -p 1433:1433 -e SA_PASSWORD=mssql_passw0rd -e ACCEPT_EULA=Y mcr.microsoft.com/mssql/server:2017-latest', + 'docker run --rm -d --name otel-mssql -p 1433:1433 -e SA_PASSWORD=mssql_passw0rd -e ACCEPT_EULA=Y mcr.microsoft.com/mssql/server:2022-latest', mysql: 'docker run --rm -d --name otel-mysql -p 33306:3306 -e MYSQL_ROOT_PASSWORD=rootpw -e MYSQL_DATABASE=test_db -e MYSQL_USER=otel -e MYSQL_PASSWORD=secret mysql:5.7 --log_output=TABLE --general_log=ON', postgres: