Make NEWID() and NEWSEQUENTIALID() functions VOLATILE #13249
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Major Version Upgrade Tests for empty database | |
on: [push, pull_request] | |
jobs: | |
run-babelfish-mvu-tests: | |
env: | |
OLD_INSTALL_DIR: postgres13 | |
NEW_INSTALL_DIR: postgres14 | |
ENGINE_BRANCH_FROM: BABEL_1_X_DEV__PG_13_X | |
EXTENSION_BRANCH_FROM: BABEL_1_X_DEV | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
id: install-dependencies | |
if: always() | |
uses: ./.github/composite-actions/install-dependencies | |
- name: Build Modified Postgres using ${{env.ENGINE_BRANCH_FROM}} | |
id: build-modified-postgres-old | |
if: always() && steps.install-dependencies.outcome == 'success' | |
run: | | |
cd .. | |
git clone --branch ${{env.ENGINE_BRANCH_FROM}} https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish.git | |
cd postgresql_modified_for_babelfish | |
./configure --prefix=$HOME/${{env.OLD_INSTALL_DIR}} --with-python PYTHON=/usr/bin/python2.7 --enable-debug --enable-cassert CFLAGS="-ggdb" --with-libxml --with-uuid=ossp --with-icu | |
make clean | |
make -j 4 2>error.txt | |
make install | |
make check | |
cd contrib && make && sudo make install | |
shell: bash | |
- name: Compile ANTLR | |
id: compile-antlr | |
if: always() && steps.build-modified-postgres-old.outcome == 'success' | |
uses: ./.github/composite-actions/compile-antlr | |
with: | |
install_dir: ${{env.OLD_INSTALL_DIR}} | |
- uses: actions/checkout@v2 | |
with: | |
repository: babelfish-for-postgresql/babelfish_extensions | |
ref: ${{env.EXTENSION_BRANCH_FROM}} | |
- name: Build Extensions using ${{env.EXTENSION_BRANCH_FROM}} | |
id: build-extensions-old | |
if: always() && steps.compile-antlr.outcome == 'success' | |
run: | | |
export PG_CONFIG=~/${{env.OLD_INSTALL_DIR}}/bin/pg_config | |
export PG_SRC=~/work/babelfish_extensions/postgresql_modified_for_babelfish | |
export cmake=$(which cmake) | |
cd contrib/babelfishpg_money | |
make && make install | |
cd ../babelfishpg_common | |
make && make install | |
cd ../babelfishpg_tds | |
make && make install | |
cd ../babelfishpg_tsql | |
make && make install | |
- name: Install Extensions using ${{env.EXTENSION_BRANCH_FROM}} | |
id: install-extensions-old | |
if: always() && steps.build-extensions-old.outcome == 'success' | |
run: | | |
cd ~ | |
export PATH=/opt/mssql-tools/bin:$PATH | |
~/${{env.OLD_INSTALL_DIR}}/bin/initdb -D ~/${{env.OLD_INSTALL_DIR}}/data | |
~/${{env.OLD_INSTALL_DIR}}/bin/pg_ctl -D ~/${{env.OLD_INSTALL_DIR}}/data -l ~/${{env.OLD_INSTALL_DIR}}/data/logfile start | |
cd ${{env.OLD_INSTALL_DIR}}/data | |
sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" postgresql.conf | |
sudo sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'babelfishpg_tds'/g" postgresql.conf | |
ipaddress=$(ifconfig eth0 | grep 'inet ' | cut -d: -f2 | awk '{ print $2}') | |
sudo echo "host all all $ipaddress/32 trust" >> pg_hba.conf | |
~/${{env.OLD_INSTALL_DIR}}/bin/pg_ctl -D ~/${{env.OLD_INSTALL_DIR}}/data -l ~/${{env.OLD_INSTALL_DIR}}/data/logfile restart | |
cd ~/work/babelfish_extensions/babelfish_extensions/ | |
sudo ~/${{env.OLD_INSTALL_DIR}}/bin/psql -v ON_ERROR_STOP=1 -d postgres -U runner -v user="jdbc_user" -v db="jdbc_testdb" -f .github/scripts/create_extension.sql | |
sqlcmd -S localhost -U jdbc_user -P 12345678 -Q "SELECT @@version GO" | |
shell: bash | |
- uses: actions/checkout@v2 | |
- name: Build Modified Postgres using latest version | |
id: build-modified-postgres-new | |
if: always() && steps.install-extensions-old.outcome == 'success' | |
uses: ./.github/composite-actions/build-modified-postgres | |
with: | |
install_dir: ${{env.NEW_INSTALL_DIR}} | |
- name: Copy ANTLR | |
run: cp "/usr/local/lib/libantlr4-runtime.so.4.9.3" ~/${{env.NEW_INSTALL_DIR}}/lib/ | |
- name: Build Extensions using latest version | |
id: build-extensions-new | |
if: always() && steps.build-modified-postgres-new.outcome == 'success' | |
uses: ./.github/composite-actions/build-extensions | |
with: | |
install_dir: ${{env.NEW_INSTALL_DIR}} | |
- name: Setup new data directory | |
id: setup-new-datadir | |
if: always() && steps.build-extensions-new.outcome == 'success' | |
run: | | |
cd ~ | |
~/${{env.NEW_INSTALL_DIR}}/bin/initdb -D ~/${{env.NEW_INSTALL_DIR}}/data | |
cd ~/${{env.NEW_INSTALL_DIR}}/data | |
sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" postgresql.conf | |
sudo sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'babelfishpg_tds'/g" postgresql.conf | |
ipaddress=$(ifconfig eth0 | grep 'inet ' | cut -d: -f2 | awk '{ print $2}') | |
sudo echo "host all all $ipaddress/32 trust" >> pg_hba.conf | |
shell: bash | |
- name: Run pg_upgrade | |
id: run-pg_upgrade | |
if: always() && steps.setup-new-datadir.outcome == 'success' | |
uses: ./.github/composite-actions/run-pg-upgrade | |
- name: Run JDBC Tests | |
id: jdbc | |
timeout-minutes: 60 | |
if: always() && steps.run-pg_upgrade.outcome == 'success' | |
run: | | |
cd test/JDBC/ | |
# temporarily ignore test BABEL-2086 | |
echo 'ignore#!#BABEL-2086' >> jdbc_schedule | |
mvn test | |
- name: Upload Postgres log | |
if: always() && steps.jdbc.outcome == 'failure' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: postgres-log | |
path: ~/${{env.NEW_INSTALL_DIR}}/data/logfile | |
- name: Upload upgrade Log | |
if: always() && steps.run-pg_upgrade.outcome == 'failure' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: upgrade-logs | |
path: ~/upgrade/*.log | |
# The test summary files contain paths with ':' characters, which is not allowed with the upload-artifact actions | |
- name: Rename Test Summary Files | |
id: test-file-rename | |
if: always() && steps.jdbc.outcome == 'failure' | |
run: | | |
cd test/JDBC/Info | |
timestamp=`ls -Art | tail -n 1` | |
cd $timestamp | |
mv $timestamp.diff ../output-diff.diff | |
mv "$timestamp"_runSummary.log ../run-summary.log | |
- name: Upload Run Summary | |
if: always() && steps.test-file-rename.outcome == 'success' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: run-summary.log | |
path: test/JDBC/Info/run-summary.log | |
- name: Upload Output Diff | |
if: always() && steps.test-file-rename.outcome == 'success' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: output-diff.diff | |
path: test/JDBC/Info/output-diff.diff |