Skip to content

Commit

Permalink
Fix os and pyodbc versions for github action (#950)
Browse files Browse the repository at this point in the history
The Github Actions for Python Framework and Upgrade Validation
framework started Failing Due to new release of Pyodbc. There is
a diff in expected output file due to this version Change More
details about the issue can be found here - mkleehammer/pyodbc#1082

We're running the github actions on ubuntu-latest. Previously, it
was ubuntu-20.04, but in any recently created fork, it's pointing
to ubuntu-22.04. This is causing dependency/build failure in the
github actions running in the fork. So, let's fix the os version.

Task: BABEL-OSS
Authored-by: Kuntal Ghosh <kuntalgh@amazon.com>
  • Loading branch information
kuntalghosh committed Dec 21, 2022
1 parent 7962a07 commit ab97eb8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
extension-tests:
name: Build and test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Clone, build, and run tests for Postgres engine
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
dotnet:
name: Dotnet
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Clone, build, and run tests for Postgres engine
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/isolation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
isolation-tests:
name: Isolation-Tests
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Clone, build, and run tests for Postgres engine
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/odbc-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
odbc:
name: ODBC
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Clone, build, and run tests for Postgres engine
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/python-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
python:
name: Python
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Clone, build, and run tests for Postgres engine
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
cd ~/work/babelfish_extensions/babelfish_extensions/test/python
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 python3-dev
pip3 install pyodbc pymssql pytest pytest-xdist
pip3 install pyodbc==4.0.35 pymssql pytest pytest-xdist
- name: Run Python tests
run: |
cd test/python
Expand All @@ -93,4 +93,5 @@ jobs:
fileGenerator_databaseName=master \
fileGenerator_user=python_user \
fileGenerator_password=12345678 \
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/odbc/ \
pytest -s --tb=long -q .
12 changes: 6 additions & 6 deletions test/python/expected/pyodbc/TestAuth.out
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#database name, username and password should not exceed 128 characters
py_auth#!#database|-|11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
~~ERROR (Code: 3701)~~
~~ERROR (Message: [42S02] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server][SQL Server]database "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" does not exist (3701) (SQLDriverConnect))~~
~~ERROR (Message: [42S02] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]database "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" does not exist (3701) (SQLDriverConnect))~~

py_auth#!#database|-|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112
~~ERROR (Code: 0)~~
~~ERROR (Message: [08001] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'DATABASE' (0) (SQLDriverConnect))~~
~~ERROR (Message: [08001] [Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'DATABASE' (0) (SQLDriverConnect))~~

py_auth#!#user|-|11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
~~ERROR (Code: 33557097)~~
~~ERROR (Message: [42000] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server][SQL Server]role "111111111111111111111111111111111111111111111111111111111111111" does not exist (33557097) (SQLDriverConnect))~~
~~ERROR (Message: [42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]role "111111111111111111111111111111111111111111111111111111111111111" does not exist (33557097) (SQLDriverConnect))~~

py_auth#!#user|-|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112
~~ERROR (Code: 0)~~
~~ERROR (Message: [08001] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'UID' (0) (SQLDriverConnect))~~
~~ERROR (Message: [08001] [Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'UID' (0) (SQLDriverConnect))~~

#not sure why any password is accepted during authentication through cloud desktop
#This test should throw error but from cloud desktop a connection is successfully established
#py_auth#!#password|-|11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
py_auth#!#password|-|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112
~~ERROR (Code: 0)~~
~~ERROR (Message: [08001] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'PWD' (0) (SQLDriverConnect))~~
~~ERROR (Message: [08001] [Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'PWD' (0) (SQLDriverConnect))~~

py_auth#!#others|-|packetSize=0
~~SUCCESS~~
Expand All @@ -30,5 +30,5 @@ py_auth#!#others|-|packetSize=4096
~~SUCCESS~~
py_auth#!#database|-|test1 SELECT 1
~~ERROR (Code: 3701)~~
~~ERROR (Message: [42S02] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server][SQL Server]database "test1 select 1" does not exist (3701) (SQLDriverConnect))~~
~~ERROR (Message: [42S02] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]database "test1 select 1" does not exist (3701) (SQLDriverConnect))~~

0 comments on commit ab97eb8

Please sign in to comment.