From ea58427835012e5a89f5c159bce7f5ae83d97dd5 Mon Sep 17 00:00:00 2001 From: kklein Date: Mon, 23 Dec 2024 12:05:23 +0100 Subject: [PATCH 1/5] Attempt to work with image's driver. --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 32f852d..30c361f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -92,10 +92,10 @@ jobs: with: environments: ${{ matrix.env }} # TODO: Consider removing this manual installation since the docker image already comes with a msodbc driver. - - name: Install msodbcsql17 driver - run: | - wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.9.1.1-1_amd64.deb - ACCEPT_EULA=Y sudo apt install ./msodbcsql17_17.9.1.1-1_amd64.deb --allow-downgrades + #- name: Install msodbcsql17 driver + # run: | + # wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.9.1.1-1_amd64.deb + # ACCEPT_EULA=Y sudo apt install ./msodbcsql17_17.9.1.1-1_amd64.deb --allow-downgrades - name: Wait for SQL Server timeout-minutes: 1 run: until docker logs "${{ job.services.db.id }}" 2>&1 | grep -q "SQL Server is now ready"; do sleep 10; done From 4c50fa98f58bb0d927ffbacb766e89d494a14301 Mon Sep 17 00:00:00 2001 From: kklein Date: Mon, 23 Dec 2024 12:15:09 +0100 Subject: [PATCH 2/5] Change name of driver. --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 4065a3a..3e3833d 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -41,7 +41,7 @@ def conn_creator(): connection_string += "?driver=libtdsodbc.so&tds_version=7.4" else: msodbc_driver_name = urllib.parse.quote_plus( - "ODBC Driver 17 for SQL Server" + "ODBC Driver 18 for SQL Server" ) connection_string += f"?driver={msodbc_driver_name}" elif "snowflake" in backend: From b7ea9ada1ca4c0e3497a79306b27c90c0aaf1afa Mon Sep 17 00:00:00 2001 From: kklein Date: Mon, 23 Dec 2024 21:45:26 +0100 Subject: [PATCH 3/5] Test freetds driver. --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index b5a95aa..f1f4207 100644 --- a/pixi.toml +++ b/pixi.toml @@ -45,7 +45,7 @@ freetds = "*" [feature.mssql.tasks] test = "pytest tests/integration --backend=mssql" test_freetds = "pytest tests/integration --backend=mssql-freetds" -coverage = "pytest tests/integration --cov=datajudge --cov-report=xml --cov-append --backend=mssql" +coverage = "pytest tests/integration --cov=datajudge --cov-report=xml --cov-append --backend=mssql-freetds" [feature.postgres.dependencies] psycopg2 = "*" From a3bd889b2b681279ce6048a4941660799bf60e37 Mon Sep 17 00:00:00 2001 From: kklein Date: Mon, 23 Dec 2024 21:49:40 +0100 Subject: [PATCH 4/5] Remove manual installation of driver. --- .github/workflows/ci.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 30c361f..f361886 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -91,11 +91,6 @@ jobs: uses: prefix-dev/setup-pixi@v0.8.1 with: environments: ${{ matrix.env }} - # TODO: Consider removing this manual installation since the docker image already comes with a msodbc driver. - #- name: Install msodbcsql17 driver - # run: | - # wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.9.1.1-1_amd64.deb - # ACCEPT_EULA=Y sudo apt install ./msodbcsql17_17.9.1.1-1_amd64.deb --allow-downgrades - name: Wait for SQL Server timeout-minutes: 1 run: until docker logs "${{ job.services.db.id }}" 2>&1 | grep -q "SQL Server is now ready"; do sleep 10; done From db627d9293fa621580fd3f48f312b3525379b16c Mon Sep 17 00:00:00 2001 From: kklein Date: Mon, 23 Dec 2024 21:50:11 +0100 Subject: [PATCH 5/5] Undo change. --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 3e3833d..4065a3a 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -41,7 +41,7 @@ def conn_creator(): connection_string += "?driver=libtdsodbc.so&tds_version=7.4" else: msodbc_driver_name = urllib.parse.quote_plus( - "ODBC Driver 18 for SQL Server" + "ODBC Driver 17 for SQL Server" ) connection_string += f"?driver={msodbc_driver_name}" elif "snowflake" in backend: