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

test: modernize our mssql/server Docker image usage #4150

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .ci/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ services:
retries: 30

mssql:
# Cumulative update 14 (CU14), released 2024-07-23, breaks the healthcheck.
# See https://github.com/elastic/apm-agent-nodejs/issues/4147
image: mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04
# Tags listed at https://hub.docker.com/r/microsoft/mssql-server
# Docs: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker
image: mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
platform: linux/amd64
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Very(!)Secure
- MSSQL_SA_PASSWORD=Very(!)Secure
- MSSQL_PID=Developer
ports:
- "1433:1433"
volumes:
- nodemssqldata:/var/opt/mssql
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "mssql", "-U", "sa", "-P", "Very(!)Secure", "-Q", "select 1"]
interval: 30s
test: ["CMD", "/opt/mssql-tools18/bin/sqlcmd", "-C", "-S", "mssql", "-U", "sa", "-P", "Very(!)Secure", "-Q", "select 1"]
interval: 10s
timeout: 10s
retries: 5

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
image: mcr.microsoft.com/mssql/server
env:
ACCEPT_EULA: 'Y'
SA_PASSWORD: 'Very(!)Secure'
MSSQL_SA_PASSWORD: 'Very(!)Secure'
MSSQL_PID: 'Developer'
ports:
- 1433:1433
Expand Down
2 changes: 1 addition & 1 deletion examples/trace-tedious.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const apm = require('../').start({
const tedious = require('tedious');

const host = process.env.MSSQL_HOST || 'localhost';
const passwd = process.env.SA_PASSWORD || 'Very(!)Secure';
const passwd = process.env.MSSQL_SA_PASSWORD || 'Very(!)Secure';
const connOpts = {
server: host,
authentication: {
Expand Down
12 changes: 6 additions & 6 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ services:
retries: 30

mssql:
# Cumulative update 14 (CU14), released 2024-07-23, breaks the healthcheck.
# See https://github.com/elastic/apm-agent-nodejs/issues/4147
image: mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04
# Tags listed at https://hub.docker.com/r/microsoft/mssql-server
# Docs: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker
image: mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
platform: linux/amd64
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Very(!)Secure
- MSSQL_SA_PASSWORD=Very(!)Secure
- MSSQL_PID=Developer
ports:
- "1433:1433"
volumes:
- nodemssqldata:/var/opt/mssql
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "mssql", "-U", "sa", "-P", "Very(!)Secure", "-Q", "select 1"]
interval: 30s
test: ["CMD", "/opt/mssql-tools18/bin/sqlcmd", "-C", "-S", "mssql", "-U", "sa", "-P", "Very(!)Secure", "-Q", "select 1"]
interval: 10s
timeout: 10s
retries: 5

Expand Down
4 changes: 2 additions & 2 deletions test/instrumentation/modules/tedious.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (semver.gte(version, '4.0.0')) {
type: 'default',
options: {
userName: 'SA',
password: process.env.SA_PASSWORD || 'Very(!)Secure',
password: process.env.MSSQL_SA_PASSWORD || 'Very(!)Secure',
},
},
options: {
Expand All @@ -65,7 +65,7 @@ if (semver.gte(version, '4.0.0')) {
connOpts = {
server: hostname,
userName: 'SA',
password: process.env.SA_PASSWORD || 'Very(!)Secure',
password: process.env.MSSQL_SA_PASSWORD || 'Very(!)Secure',
};
}

Expand Down