From 1d40114453b5de2aa9aae121171177d2791e82f0 Mon Sep 17 00:00:00 2001 From: SiddharthBITS Date: Tue, 21 Jan 2025 12:11:30 +0000 Subject: [PATCH] Differnet way of passing engineVersion --- .../minor-version-upgrade-util/action.yml | 8 ++++---- .github/composite-actions/run-jdbc-tests/action.yml | 2 +- .github/composite-actions/run-verify-tests/action.yml | 10 +++++----- .../composite-actions/setup-base-version/action.yml | 8 ++++---- .github/workflows/jdbc-tests-db-collation.yml | 2 +- .github/workflows/jdbc-tests-pgaudit-enable.yml | 2 +- .../src/test/java/com/sqlsamples/TestQueryFile.java | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/composite-actions/minor-version-upgrade-util/action.yml b/.github/composite-actions/minor-version-upgrade-util/action.yml index 74a2125e47..8aea16b2f1 100644 --- a/.github/composite-actions/minor-version-upgrade-util/action.yml +++ b/.github/composite-actions/minor-version-upgrade-util/action.yml @@ -97,16 +97,16 @@ runs: if [[ "$tar_dir" == *"latest"* ]]; then tar_dir="latest" fi - export engineVersion=$tar_dir - echo "ENGINE_VERSION=$tar_dir" >> $GITHUB_ENV + export engineVersion=${{ matrix.upgrade-path.last_version }} + echo "ENGINE_VERSION=${{ matrix.upgrade-path.last_version }}" >> $GITHUB_ENV export inputFilesPath=upgrade/$tar_dir/verification_cleanup/$base_dir mvn -B -ntp test export inputFilesPath=input for filename in $(grep -v "^ignore.*\|^#.*\|^cmd.*\|^all.*\|^$" upgrade/$base_dir/schedule); do sed -i "s/\b$filename[ ]*\b$/$filename-vu-verify\\n$filename-vu-cleanup/g" upgrade/$base_dir/schedule done - export engineVersion=$base_dir - echo "ENGINE_VERSION=$base_dir" >> $GITHUB_ENV + export engineVersion=${{ matrix.upgrade-path.path[0] }} + echo "ENGINE_VERSION=$${{ matrix.upgrade-path.path[0] }}" >> $GITHUB_ENV export scheduleFile=upgrade/$base_dir/schedule mvn -B -ntp test shell: bash diff --git a/.github/composite-actions/run-jdbc-tests/action.yml b/.github/composite-actions/run-jdbc-tests/action.yml index 276b34ff53..25420dd2f0 100644 --- a/.github/composite-actions/run-jdbc-tests/action.yml +++ b/.github/composite-actions/run-jdbc-tests/action.yml @@ -19,7 +19,7 @@ runs: export PATH=~/${{env.INSTALL_DIR}}/bin:$PATH export PG_SRC=~/work/babelfish_extensions/postgresql_modified_for_babelfish export inputFilesPath=${{inputs.input_dir}} - export engineVersion="justTest" + export engineVersion=justTest cd test/JDBC/ if [[ '${{ inputs.migration_mode }}' == 'single-db' ]];then export isSingleDbMode=true diff --git a/.github/composite-actions/run-verify-tests/action.yml b/.github/composite-actions/run-verify-tests/action.yml index 4ccab45fb1..435f525293 100644 --- a/.github/composite-actions/run-verify-tests/action.yml +++ b/.github/composite-actions/run-verify-tests/action.yml @@ -55,12 +55,12 @@ runs: if [[ "$tar_dir" == *"latest"* || ${{ inputs.dump_restore }} == 'true' ]]; then tar_dir="latest" fi - export engineVersion=$tar_dir - echo "ENGINE_VERSION=$tar_dir" >> $GITHUB_ENV + export engineVersion=${{ matrix.upgrade-path.last_version }} + echo "ENGINE_VERSION=${{ matrix.upgrade-path.last_version }}" >> $GITHUB_ENV export inputFilesPath=upgrade/$tar_dir/verification_cleanup/$base_dir else base_dir="singledb" - export engineVersion="singledb" + export engineVersion=singledb echo "ENGINE_VERSION=singledb" >> $GITHUB_ENV export inputFilesPath=upgrade/singledb/verification_cleanup fi @@ -77,8 +77,8 @@ runs: for filename in $(grep -v "^ignore.*\|^#.*\|^cmd.*\|^all.*\|^$" upgrade/$base_dir/schedule); do sed -i "s/\b$filename[ ]*\b$/$filename-vu-verify\\n$filename-vu-cleanup/g" upgrade/$base_dir/schedule done - export engineVersion=$base_dir - echo "ENGINE_VERSION=$base_dir" >> $GITHUB_ENV + export engineVersion=${{ matrix.upgrade-path.path[0] }} + echo "ENGINE_VERSION=$${{ matrix.upgrade-path.path[0] }}" >> $GITHUB_ENV export scheduleFile=upgrade/$base_dir/schedule mvn -B -ntp test shell: bash diff --git a/.github/composite-actions/setup-base-version/action.yml b/.github/composite-actions/setup-base-version/action.yml index b47af5361d..0cfe1ce57f 100644 --- a/.github/composite-actions/setup-base-version/action.yml +++ b/.github/composite-actions/setup-base-version/action.yml @@ -195,8 +195,8 @@ runs: base_dir="singledb" fi - export engineVersion=$base_dir - echo "ENGINE_VERSION=$base_dir" >> $GITHUB_ENV + export engineVersion=${{ matrix.upgrade-path.path[0] }} + echo "ENGINE_VERSION=$${{ matrix.upgrade-path.path[0] }}" >> $GITHUB_ENV export inputFilesPath=upgrade/$base_dir/preparation mvn -B -ntp test @@ -217,8 +217,8 @@ runs: for filename in $(grep -v "^ignore.*\|^#.*\|^cmd.*\|^all.*\|^$" upgrade/$base_dir/schedule); do sed -i "s/\b$filename[ ]*\b$/$filename-vu-prepare/g" upgrade/$base_dir/schedule done - export engineVersion=$base_dir - echo "ENGINE_VERSION=$base_dir" >> $GITHUB_ENV + export engineVersion=${{ matrix.upgrade-path.path[0] }} + echo "ENGINE_VERSION=$${{ matrix.upgrade-path.path[0] }}" >> $GITHUB_ENV export scheduleFile=upgrade/$base_dir/schedule mvn -B -ntp test shell: bash diff --git a/.github/workflows/jdbc-tests-db-collation.yml b/.github/workflows/jdbc-tests-db-collation.yml index 614bc98cc0..3b624cc066 100644 --- a/.github/workflows/jdbc-tests-db-collation.yml +++ b/.github/workflows/jdbc-tests-db-collation.yml @@ -97,7 +97,7 @@ jobs: export isdbCollationMode=true export inputFilesPath=replication echo "ENGINE_VERSION=replication" >> $GITHUB_ENV - export engineVersion="replication" + export engineVersion=replication mvn -B -ntp test unset isdbCollationMode diff --git a/.github/workflows/jdbc-tests-pgaudit-enable.yml b/.github/workflows/jdbc-tests-pgaudit-enable.yml index ee6e10bc26..cf3600b2bd 100644 --- a/.github/workflows/jdbc-tests-pgaudit-enable.yml +++ b/.github/workflows/jdbc-tests-pgaudit-enable.yml @@ -114,7 +114,7 @@ jobs: export PATH=~/${{env.INSTALL_DIR}}/bin:$PATH export PG_SRC=~/work/babelfish_extensions/postgresql_modified_for_babelfish echo "ENGINE_VERSION=latest" >> $GITHUB_ENV - export engineVersion="latest" + export engineVersion=latest export inputFilesPath=${{inputs.input_dir}} cd test # ignoring BABEL-2843 test file BABEL-2843,as in this file we are enabling the babelfish_statistics profile On for DDL, which is not giving any error but just adding the query under Query Text which is being passed from pg_audit and hence getting a diff file diff --git a/test/JDBC/src/test/java/com/sqlsamples/TestQueryFile.java b/test/JDBC/src/test/java/com/sqlsamples/TestQueryFile.java index 4716553f88..d03540cc01 100644 --- a/test/JDBC/src/test/java/com/sqlsamples/TestQueryFile.java +++ b/test/JDBC/src/test/java/com/sqlsamples/TestQueryFile.java @@ -170,7 +170,7 @@ static Stream inputFileNames() { File dbCollationIgnoreFile = new File(dbCollationIgnoreFileName); File singleDBIgnoreFile = new File(singleDBIgnoreFileName); - System.out.println("VersionCheck : Version : " + engineVersion); + System.out.println("VersionCheck-1 : Version : " + engineVersion); if(engineVersion == "singledb" || engineVersion == "replication" || engineVersion == "latest" || engineVersion == null) { majorVersion = 0;