From fb35931ea4f76f6859d094564abd1be04a719181 Mon Sep 17 00:00:00 2001 From: Rishabh Tanwar Date: Tue, 4 Mar 2025 12:24:40 +0000 Subject: [PATCH] [OSS-ONLY] Updated the ubuntu version to ubuntu-latest and updated the repo config Signed-off-by: Rishabh Tanwar --- .github/composite-actions/build-extensions/action.yml | 10 ++++++++++ .github/composite-actions/dump-restore-util/action.yml | 5 +++++ .../install-and-run-dotnet/action.yml | 8 ++++---- .../install-and-run-python/action.yml | 4 ++-- .../composite-actions/install-dependencies/action.yml | 3 +-- .../major-version-upgrade-util/action.yml | 5 +++++ .../minor-version-upgrade-util/action.yml | 5 +++++ .../composite-actions/setup-base-version/action.yml | 7 ++++++- .../composite-actions/setup-dump-restore-ca/action.yml | 2 +- .github/composite-actions/setup-new-version/action.yml | 5 +++++ .../setup-upgrade-version-ca/action.yml | 4 ++-- .github/workflows/code-coverage.yml | 2 +- .github/workflows/dotnet-tests.yml | 2 +- .github/workflows/isolation-tests.yml | 6 +++--- .github/workflows/jdbc-tests-pgaudit-enable.yml | 2 +- .github/workflows/jdbc-tests-single-db-mode.yml | 2 +- .../jdbc-tests-with-non-default-server-collation.yml | 2 +- .github/workflows/jdbc-tests-with-parallel-query.yml | 2 +- .github/workflows/jdbc-tests.yml | 2 +- .github/workflows/major-version-upgrade.yml | 2 +- .github/workflows/manual_tags.yml | 2 +- .github/workflows/minor-version-upgrade.yml | 4 +++- .github/workflows/odbc-tests.yml | 2 +- .github/workflows/pg_dump-restore-test.yml | 5 +++-- .github/workflows/pr-code-coverage.yml | 2 +- .github/workflows/python-tests.yml | 2 +- .github/workflows/singledb-version-upgrade.yml | 2 +- .github/workflows/sql-validation-tests.yml | 4 ++-- .github/workflows/tap-tests.yml | 3 ++- .github/workflows/unit-tests.yml | 2 +- .github/workflows/upgrade-test.yml | 5 +++-- INSTALLING.md.tmpl | 2 +- contrib/README.md | 6 +++--- contrib/babelfishpg_tsql/runtime/functions.c | 6 +++--- contrib/babelfishpg_tsql/src/backend_parser/parser.c | 2 -- contrib/babelfishpg_tsql/src/pl_comp.c | 3 --- 36 files changed, 83 insertions(+), 49 deletions(-) diff --git a/.github/composite-actions/build-extensions/action.yml b/.github/composite-actions/build-extensions/action.yml index 88202732cf0..9351e0a94e5 100644 --- a/.github/composite-actions/build-extensions/action.yml +++ b/.github/composite-actions/build-extensions/action.yml @@ -8,6 +8,10 @@ inputs: description: 'Extension Branch name which needs to checkout first' required: no default: 'not_specified' + engine_version: + description: 'Engine version' + required: no + default: 'target.latest' runs: using: "composite" @@ -37,6 +41,12 @@ runs: cd ../babelfishpg_tds make -j 4 && make install cd ../babelfishpg_tsql + + if [[ "$engine_version" != 'source.latest' && "$engine_version" != 'target.latest' && "$engine_version" -lt 15.13 ]] + then + export PG_CFLAGS='-fcommon -Wno-misleading-indentation' + fi + PG_CPPFLAGS='-I/usr/include -DENABLE_TDS_LIB -DENABLE_SPATIAL_TYPES' SHLIB_LINK='-lsybdb -L/usr/lib64' make PG_CPPFLAGS='-I/usr/include -DENABLE_TDS_LIB -DENABLE_SPATIAL_TYPES' SHLIB_LINK='-lsybdb -L/usr/lib64' make install shell: bash diff --git a/.github/composite-actions/dump-restore-util/action.yml b/.github/composite-actions/dump-restore-util/action.yml index f34e5c4fd85..8b044528e7e 100644 --- a/.github/composite-actions/dump-restore-util/action.yml +++ b/.github/composite-actions/dump-restore-util/action.yml @@ -33,6 +33,10 @@ inputs: description: "Dump type full or combination of schema-only and data-only" required: false default: 'full' + engine_version: + description: 'Engine version' + required: no + default: 'target.latest' runs: using: "composite" @@ -45,6 +49,7 @@ runs: engine_branch: ${{ inputs.engine_branch }} extension_branch: ${{ inputs.extension_branch }} pg_new_dir: ${{ inputs.pg_new_dir }} + engine_version: ${{ inputs.engine_version }} - name: Build latest dump/restore utilities id: build-dump-utils diff --git a/.github/composite-actions/install-and-run-dotnet/action.yml b/.github/composite-actions/install-and-run-dotnet/action.yml index 4ed18eb1b7f..a8fccd9af3a 100644 --- a/.github/composite-actions/install-and-run-dotnet/action.yml +++ b/.github/composite-actions/install-and-run-dotnet/action.yml @@ -7,10 +7,10 @@ runs: - name: Install MSSQL Tools id: install-mssql-tools run: | - curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - - curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list + curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc + curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list sudo apt-get update - sudo apt-get install mssql-tools unixodbc-dev + sudo apt-get install mssql-tools18 unixodbc-dev echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc source ~/.bashrc shell: bash @@ -20,7 +20,7 @@ runs: if: always() && steps.install-mssql-tools.outcome == 'success' run: | cd ~ - wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb sudo apt-get install -y apt-transport-https diff --git a/.github/composite-actions/install-and-run-python/action.yml b/.github/composite-actions/install-and-run-python/action.yml index 5f87c3ebe38..76c9222dff2 100644 --- a/.github/composite-actions/install-and-run-python/action.yml +++ b/.github/composite-actions/install-and-run-python/action.yml @@ -8,14 +8,14 @@ runs: id: install-python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 'v3.10' - name: Configure Python Environment id: configure-python-environment if: always() && steps.install-python.outcome == 'success' run: | cd ~ - curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list + curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list cd ~/work/babelfish_extensions/babelfish_extensions/test/python mkdir sqltoolsservice cd sqltoolsservice diff --git a/.github/composite-actions/install-dependencies/action.yml b/.github/composite-actions/install-dependencies/action.yml index e531d9f8db9..d18aed917a8 100644 --- a/.github/composite-actions/install-dependencies/action.yml +++ b/.github/composite-actions/install-dependencies/action.yml @@ -4,10 +4,9 @@ runs: steps: - name: Install Dependencies run: | - $GITHUB_WORKSPACE/.github/scripts/choose_install_mirror sudo apt clean && sudo apt-get update --fix-missing -y curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - - curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list + curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list sudo apt-get update --fix-missing -y sudo apt-get install uuid-dev openjdk-8-jre libicu-dev libxml2-dev openssl libssl-dev python3-dev libossp-uuid-dev libpq-dev cmake pkg-config g++ build-essential bison mssql-tools unixodbc-dev libsybdb5 freetds-dev freetds-common gdal-bin libgdal-dev libgeos-dev gdb libkrb5-dev sudo apt install -y ccache diff --git a/.github/composite-actions/major-version-upgrade-util/action.yml b/.github/composite-actions/major-version-upgrade-util/action.yml index cfe59dda672..142c1ea8eb0 100644 --- a/.github/composite-actions/major-version-upgrade-util/action.yml +++ b/.github/composite-actions/major-version-upgrade-util/action.yml @@ -22,6 +22,10 @@ inputs: description: "Server collation name" required: false default: "default" + engine_version: + description: 'Engine version' + required: no + default: 'target.latest' runs: using: "composite" @@ -34,6 +38,7 @@ runs: engine_branch: ${{ inputs.engine_branch }} extension_branch: ${{ inputs.extension_branch }} pg_new_dir: ${{ inputs.pg_new_dir }} + engine_version: ${{ inputs.engine_version }} - name: Run pg_upgrade id: run-pg_upgrade diff --git a/.github/composite-actions/minor-version-upgrade-util/action.yml b/.github/composite-actions/minor-version-upgrade-util/action.yml index 321ea5d8be6..89fd72dcdbb 100644 --- a/.github/composite-actions/minor-version-upgrade-util/action.yml +++ b/.github/composite-actions/minor-version-upgrade-util/action.yml @@ -16,6 +16,10 @@ inputs: description: "Server collation name" required: false default: "default" + engine_version: + description: 'Engine version' + required: no + default: 'target.latest' runs: using: "composite" @@ -32,6 +36,7 @@ runs: with: install_dir: ${{ inputs.install_dir }} extension_branch: ${{ inputs.extension_branch }} + engine_version: ${{ inputs.engine_version }} # Not created and used composite action update-extensions here since, in the previous step it has # checked out a branch/tag which may not have the updated update-extension composite action diff --git a/.github/composite-actions/setup-base-version/action.yml b/.github/composite-actions/setup-base-version/action.yml index c242989132a..f0218dfeb12 100644 --- a/.github/composite-actions/setup-base-version/action.yml +++ b/.github/composite-actions/setup-base-version/action.yml @@ -20,6 +20,10 @@ inputs: description: "Whether it is version upgrade or dump/restore" required: false default: 'false' + engine_version: + description: 'Engine version' + required: no + default: 'target.latest' runs: using: "composite" @@ -50,6 +54,7 @@ runs: with: install_dir: ${{ inputs.install_dir }} extension_branch: ${{ inputs.extension_branch }} + engine_version: ${{ inputs.engine_version }} - name: Build tds_fdw Extension run: | @@ -221,7 +226,7 @@ runs: if: ${{ matrix.upgrade-path.path[0] == 'source_latest' && steps.jdbc-upgrade-tests.outcome == 'success' }} uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 'v3.10' - name: Configure Python Environment id: configure-python-environment diff --git a/.github/composite-actions/setup-dump-restore-ca/action.yml b/.github/composite-actions/setup-dump-restore-ca/action.yml index 1ed3e2dc88c..935de68e32b 100644 --- a/.github/composite-actions/setup-dump-restore-ca/action.yml +++ b/.github/composite-actions/setup-dump-restore-ca/action.yml @@ -56,7 +56,7 @@ runs: type_var=".\"dump-restore-version\"[${{ matrix.upgrade-path.id }}][$i].\"type\"" type=$(yq $type_var ${{ github.workspace }}/.github/configuration/dump-restore-test-configuration.yml) - printf " - name: Dump and Restore to version $dump_restore_version\n id: dump-restore-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n database_level: ${database_level}\n dump_data_as: ${dump_data_as}\n dump_format: ${dump_format}\n type: ${type}\n\n" >> $dump_restore_version_dir_path/action.yml + printf " - name: Dump and Restore to version $dump_restore_version\n id: dump-restore-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n database_level: ${database_level}\n dump_data_as: ${dump_data_as}\n dump_format: ${dump_format}\n type: ${type}\n engine_version: ${dump_restore_version}\n\n" >> $dump_restore_version_dir_path/action.yml previous_installed_version=$dump_restore_version done diff --git a/.github/composite-actions/setup-new-version/action.yml b/.github/composite-actions/setup-new-version/action.yml index 2b1378f4cc8..ea837047790 100644 --- a/.github/composite-actions/setup-new-version/action.yml +++ b/.github/composite-actions/setup-new-version/action.yml @@ -9,6 +9,10 @@ inputs: pg_new_dir: description: "Install new version in this directory" required: true + engine_version: + description: 'Engine version' + required: no + default: 'target.latest' runs: using: "composite" @@ -34,6 +38,7 @@ runs: with: install_dir: ${{ inputs.pg_new_dir }} extension_branch: ${{ inputs.extension_branch }} + engine_version: ${{ inputs.engine_version }} - uses: actions/checkout@v2 diff --git a/.github/composite-actions/setup-upgrade-version-ca/action.yml b/.github/composite-actions/setup-upgrade-version-ca/action.yml index 9ebd3b7ba09..94539738929 100644 --- a/.github/composite-actions/setup-upgrade-version-ca/action.yml +++ b/.github/composite-actions/setup-upgrade-version-ca/action.yml @@ -60,9 +60,9 @@ runs: # Appending upgrade step in upgrade-version composite action based on upgrade type if [[ $upgrade_type == 'major' ]] then - printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n server_collation_name: ${{ inputs.server_collation_name }}\n\n" >> $upgrade_version_dir_path/action.yml + printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n pg_old_dir: ${pg_old_dir}\n pg_new_dir: ${pg_new_dir}\n migration_mode: 'multi-db'\n server_collation_name: ${{ inputs.server_collation_name }}\n engine_version: ${upgrade_version}\n\n" >> $upgrade_version_dir_path/action.yml else - printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n install_dir: ${pg_new_dir}\n server_collation_name: ${{ inputs.server_collation_name }}\n\n" >> $upgrade_version_dir_path/action.yml + printf " - name: Upgrade Version to $upgrade_version\n id: upgrade-version-$i\n if: always() $temp\n uses: ${uses_file}\n with: \n engine_branch: ${engine_branch}\n extension_branch: ${extension_branch}\n is_final_ver: ${is_final_ver}\n install_dir: ${pg_new_dir}\n server_collation_name: ${{ inputs.server_collation_name }}\n engine_version: ${upgrade_version}\n\n" >> $upgrade_version_dir_path/action.yml fi previous_installed_version=$upgrade_version diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index b74b49c8e9d..a39ec6c93b0 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -5,7 +5,7 @@ on: jobs: run-code-coverage-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: INSTALL_DIR: psql steps: diff --git a/.github/workflows/dotnet-tests.yml b/.github/workflows/dotnet-tests.yml index 85fa9500f34..4a8f460bf84 100644 --- a/.github/workflows/dotnet-tests.yml +++ b/.github/workflows/dotnet-tests.yml @@ -3,7 +3,7 @@ on: [workflow_call] jobs: run-babelfish-dotnet-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/isolation-tests.yml b/.github/workflows/isolation-tests.yml index 2377ac479ed..81e3e44a451 100644 --- a/.github/workflows/isolation-tests.yml +++ b/.github/workflows/isolation-tests.yml @@ -4,7 +4,7 @@ on: [workflow_call] jobs: isolation-tests: name: Isolation-Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout @@ -45,12 +45,12 @@ jobs: - name: Install Python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 'v3.10' - name: Configure Python environment run: | cd ~ - curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list + curl https://packages.microsoft.com/config/ubuntu/22.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 antlr4-python3-runtime==4.9.3 diff --git a/.github/workflows/jdbc-tests-pgaudit-enable.yml b/.github/workflows/jdbc-tests-pgaudit-enable.yml index 00e3ff544ad..8a48d2184ff 100644 --- a/.github/workflows/jdbc-tests-pgaudit-enable.yml +++ b/.github/workflows/jdbc-tests-pgaudit-enable.yml @@ -7,7 +7,7 @@ jobs: run-babelfish-jdbc-tests-with-pg-audit: env: INSTALL_DIR: psql - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/jdbc-tests-single-db-mode.yml b/.github/workflows/jdbc-tests-single-db-mode.yml index fdc2dc127a2..169697c9bbe 100644 --- a/.github/workflows/jdbc-tests-single-db-mode.yml +++ b/.github/workflows/jdbc-tests-single-db-mode.yml @@ -5,7 +5,7 @@ jobs: run-babelfish-jdbc-tests: env: INSTALL_DIR: psql - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/jdbc-tests-with-non-default-server-collation.yml b/.github/workflows/jdbc-tests-with-non-default-server-collation.yml index fe163b47359..831327d45be 100644 --- a/.github/workflows/jdbc-tests-with-non-default-server-collation.yml +++ b/.github/workflows/jdbc-tests-with-non-default-server-collation.yml @@ -7,7 +7,7 @@ jobs: INSTALL_DIR: psql SERVER_COLLATION_NAME: chinese_prc_ci_as - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/jdbc-tests-with-parallel-query.yml b/.github/workflows/jdbc-tests-with-parallel-query.yml index 390f2f0246a..dbc6a4ecfc6 100644 --- a/.github/workflows/jdbc-tests-with-parallel-query.yml +++ b/.github/workflows/jdbc-tests-with-parallel-query.yml @@ -5,7 +5,7 @@ jobs: run-babelfish-jdbc-tests-with-parallel-query-mode: env: INSTALL_DIR: psql - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/jdbc-tests.yml b/.github/workflows/jdbc-tests.yml index 598272aa0ee..3086080c110 100644 --- a/.github/workflows/jdbc-tests.yml +++ b/.github/workflows/jdbc-tests.yml @@ -5,7 +5,7 @@ jobs: run-babelfish-jdbc-tests: env: INSTALL_DIR: psql - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/major-version-upgrade.yml b/.github/workflows/major-version-upgrade.yml index 98aa5f27f84..01ba7850edc 100644 --- a/.github/workflows/major-version-upgrade.yml +++ b/.github/workflows/major-version-upgrade.yml @@ -9,7 +9,7 @@ jobs: ENGINE_BRANCH_FROM: BABEL_2_X_DEV__PG_14_X EXTENSION_BRANCH_FROM: BABEL_2_X_DEV - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/manual_tags.yml b/.github/workflows/manual_tags.yml index c8cf377b975..741a3ec8844 100644 --- a/.github/workflows/manual_tags.yml +++ b/.github/workflows/manual_tags.yml @@ -18,7 +18,7 @@ on: jobs: create_tag: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/minor-version-upgrade.yml b/.github/workflows/minor-version-upgrade.yml index f6a7cf6b41b..a5e30eff084 100644 --- a/.github/workflows/minor-version-upgrade.yml +++ b/.github/workflows/minor-version-upgrade.yml @@ -9,7 +9,7 @@ jobs: INSTALL_DIR: psql name: Build and test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -77,6 +77,8 @@ jobs: id: build-extensions-older if: always() && steps.build-postgis-extension-old.outcome == 'success' uses: ./.github/composite-actions/build-extensions + with: + engine_version: 17.4 - name: Build tds_fdw Extension id: build-tds_fdw-extension diff --git a/.github/workflows/odbc-tests.yml b/.github/workflows/odbc-tests.yml index 89996b6f2b2..46ac5fde6dd 100644 --- a/.github/workflows/odbc-tests.yml +++ b/.github/workflows/odbc-tests.yml @@ -3,7 +3,7 @@ on: [workflow_call] jobs: run-babelfish-odbc-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/pg_dump-restore-test.yml b/.github/workflows/pg_dump-restore-test.yml index 2f7131ee1a5..bd7ee9b1450 100644 --- a/.github/workflows/pg_dump-restore-test.yml +++ b/.github/workflows/pg_dump-restore-test.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: generate-dump-restore-tests: name: Generate Dump/Restore Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: dump-restore-path-list: ${{ steps.generate-dump-restore-path.outputs.dump-restore-path-list }} steps: @@ -32,7 +32,7 @@ jobs: matrix: upgrade-path: ${{ fromJson(needs.generate-dump-restore-tests.outputs.dump-restore-path-list) }} name: Dump Restore Test using ${{ matrix.upgrade-path.dump_method }} for ${{ matrix.upgrade-path.title }} - format=${{ matrix.upgrade-path.dump_format }} - type=${{ matrix.upgrade-path.type }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -74,6 +74,7 @@ jobs: install_dir: ${{ steps.find-branch.outputs.base-dir }} migration_mode: 'multi-db' dump_restore: 'true' + engine_version: ${{ steps.read-base-and-final-version.outputs.base-version }} - name: Setup Dump Restore Composite Action id: setup-dump-restore-ca diff --git a/.github/workflows/pr-code-coverage.yml b/.github/workflows/pr-code-coverage.yml index 886e29c3a18..96f108f78bb 100644 --- a/.github/workflows/pr-code-coverage.yml +++ b/.github/workflows/pr-code-coverage.yml @@ -25,7 +25,7 @@ jobs: run-babelfish-code-coverage-for-pull_request: needs: [run-jdbc-tests, run-odbc-tests, run-dotnet-tests, run-python-tests, run-isolation-tests] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 63f8efa8095..dc6ff6eb235 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -3,7 +3,7 @@ on: [workflow_call] jobs: run-babelfish-python-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/singledb-version-upgrade.yml b/.github/workflows/singledb-version-upgrade.yml index a35d90dc180..b456ea9efe2 100644 --- a/.github/workflows/singledb-version-upgrade.yml +++ b/.github/workflows/singledb-version-upgrade.yml @@ -10,7 +10,7 @@ jobs: ENGINE_BRANCH_FROM: BABEL_2_X_DEV__PG_14_X EXTENSION_BRANCH_FROM: BABEL_2_X_DEV - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/sql-validation-tests.yml b/.github/workflows/sql-validation-tests.yml index 5fedaa0a581..8a0ac1966a0 100644 --- a/.github/workflows/sql-validation-tests.yml +++ b/.github/workflows/sql-validation-tests.yml @@ -3,7 +3,7 @@ on: [push, pull_request] jobs: run-sql-validation-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout @@ -11,7 +11,7 @@ jobs: id: install-python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 'v3.10' - name: Run tests id: run-test if: always() && steps.install-python.outcome == 'success' diff --git a/.github/workflows/tap-tests.yml b/.github/workflows/tap-tests.yml index e92db92dfa6..686a407dd96 100644 --- a/.github/workflows/tap-tests.yml +++ b/.github/workflows/tap-tests.yml @@ -9,7 +9,7 @@ jobs: ENGINE_BRANCH_OLD: BABEL_2_6_STABLE__PG_14_9 EXTENSION_BRANCH_OLD: BABEL_2_6_STABLE - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout @@ -96,6 +96,7 @@ jobs: with: install_dir: ${{env.OLD_INSTALL_DIR}} extension_branch: ${{env.EXTENSION_BRANCH_OLD}} + engine_version: 14.9 - uses: actions/checkout@v2 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index cc9f9930ac4..0979cf0b8e2 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -5,7 +5,7 @@ jobs: run-babelfish-unit-tests: env: INSTALL_DIR: psql - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 id: checkout diff --git a/.github/workflows/upgrade-test.yml b/.github/workflows/upgrade-test.yml index 693fe37a0f2..d214c0bfaa9 100644 --- a/.github/workflows/upgrade-test.yml +++ b/.github/workflows/upgrade-test.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: generate-version-upgrade-tests: name: Generate Version Upgrade Tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: upgrade-path-list: ${{ steps.generate-upgrade-path.outputs.upgrade-path-list }} steps: @@ -25,7 +25,7 @@ jobs: matrix: upgrade-path: ${{ fromJson(needs.generate-version-upgrade-tests.outputs.upgrade-path-list) }} name: Run Version Upgrade Test for ${{ matrix.upgrade-path.title }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -67,6 +67,7 @@ jobs: install_dir: ${{ steps.find-branch.outputs.base-dir }} migration_mode: 'multi-db' server_collation_name: ${{ matrix.upgrade-path.server_collation_name }} + engine_version: ${{ steps.read-base-and-final-version.outputs.base-version }} - name: Setup Upgrade Version Composite Action id: setup-upgrade-ver-ca diff --git a/INSTALLING.md.tmpl b/INSTALLING.md.tmpl index 9a984f959c5..bdb334a1a0c 100644 --- a/INSTALLING.md.tmpl +++ b/INSTALLING.md.tmpl @@ -1,6 +1,6 @@ # Compiling Babelfish from distribution tarballs -This document will walk you through the steps required to create a working Babelfish installation on an Ubuntu 20.04 Linux host. Please note that the steps may vary on other operating systems, but the overall process is roughly the same. +This document will walk you through the steps required to create a working Babelfish installation on an Ubuntu Linux host. Please note that the steps may vary on other operating systems, but the overall process is roughly the same. The installation steps that follow are for the release tar or zip file, which uses content from the following repositories: diff --git a/contrib/README.md b/contrib/README.md index 784cb3319d4..a4f56359c72 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -16,7 +16,7 @@ This package includes 5 extensions: # How do I build the extensions? -The following build instructions comply with Ubuntu 20.04 and Amazon Linux 2 environment. +The following build instructions comply with Ubuntu 22.04 and Amazon Linux 2 environment. ## Build the Postgres engine @@ -27,8 +27,8 @@ The following build instructions comply with Ubuntu 20.04 and Amazon Linux 2 env You'll also need to install `gcc`, `gcc-c++`, `java` and `bison`. ``` - sudo apt-get install uuid-dev openjdk-8-jre \ - libicu-dev libxml2-dev openssl libssl-dev python-dev \ + sudo apt-get install uuid-dev flex openjdk-8-jre \ + libicu-dev libxml2-dev openssl libssl-dev python3-dev \ libossp-uuid-dev libpq-dev pkg-config g++ build-essential bison ``` diff --git a/contrib/babelfishpg_tsql/runtime/functions.c b/contrib/babelfishpg_tsql/runtime/functions.c index b95d77e6fbd..0461e46b26d 100644 --- a/contrib/babelfishpg_tsql/runtime/functions.c +++ b/contrib/babelfishpg_tsql/runtime/functions.c @@ -2420,13 +2420,13 @@ type_id(PG_FUNCTION_ARGS) if (i > SYSVARCHAR_MAX_LENGTH) ereport(ERROR, (errcode(ERRCODE_STRING_DATA_LENGTH_MISMATCH), - errmsg("input value is too long for object name"))); + errmsg("input value is too long for object name"))); - /* + /* * Split the input string, downcase and truncate if needed * and return the db_name, schema_name and object_name. */ - downcase_truncate_split_object_name(input, NULL, &db_name, &schema_name, &object_name); + downcase_truncate_split_object_name(input, NULL, &db_name, &schema_name, &object_name); pfree(input); diff --git a/contrib/babelfishpg_tsql/src/backend_parser/parser.c b/contrib/babelfishpg_tsql/src/backend_parser/parser.c index cfd6a158412..fb5419189b7 100644 --- a/contrib/babelfishpg_tsql/src/backend_parser/parser.c +++ b/contrib/babelfishpg_tsql/src/backend_parser/parser.c @@ -29,8 +29,6 @@ #include "src/pltsql.h" #include "tcop/tcopprot.h" -int pgtsql_base_yydebug; - List *babelfishpg_tsql_raw_parser(const char *str, RawParseMode mode); /* diff --git a/contrib/babelfishpg_tsql/src/pl_comp.c b/contrib/babelfishpg_tsql/src/pl_comp.c index af89f2f5a14..fa1c416a604 100644 --- a/contrib/babelfishpg_tsql/src/pl_comp.c +++ b/contrib/babelfishpg_tsql/src/pl_comp.c @@ -61,9 +61,6 @@ bool pltsql_DumpExecTree = false; bool pltsql_check_syntax = false; PLtsql_function *pltsql_curr_compile; -int pltsql_curr_compile_body_lineno; /* lineno of - * function/procedure body in - * CREATE */ /* A context appropriate for short-term allocs during compilation */ MemoryContext pltsql_compile_tmp_cxt;