Skip to content

Fix issue with convert function when converting string to date, datetimeoffset, datetime2, datetime, smalldatetime or time #16364

Fix issue with convert function when converting string to date, datetimeoffset, datetime2, datetime, smalldatetime or time

Fix issue with convert function when converting string to date, datetimeoffset, datetime2, datetime, smalldatetime or time #16364

name: Major Version Upgrade Tests for singledb mode
on: [push, pull_request]
jobs:
run-babelfish-mvu-tests-singledb:
env:
env:
OLD_INSTALL_DIR: psql_source
NEW_INSTALL_DIR: psql_target
ENGINE_BRANCH_FROM: BABEL_2_X_DEV__PG_14_X
EXTENSION_BRANCH_FROM: BABEL_2_X_DEV
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Base version ${{ env.ENGINE_BRANCH_FROM }} and run prepare tests
id: setup-base-version
if: always()
uses: ./.github/composite-actions/setup-base-version
with:
engine_branch: ${{ env.ENGINE_BRANCH_FROM }}
extension_branch: ${{ env.EXTENSION_BRANCH_FROM }}
install_dir: ${{ env.OLD_INSTALL_DIR }}
migration_mode: 'single-db'
antlr_version: 4.9.3
- name: Check Babelfish metadata inconsistency before Major Version Upgrade
id: check-babelfish-inconsistency
if: always() && steps.setup-base-version.outcome == 'success'
uses: ./.github/composite-actions/check-babelfish-inconsistency
- name: Upgrade to latest version and run verify-cleanup tests
id: upgrade-and-verify
if: |
always() && steps.setup-base-version.outcome == 'success'
&& steps.check-babelfish-inconsistency.outcome == 'success'
uses: ./.github/composite-actions/major-version-upgrade-util
with:
engine_branch: latest
extension_branch: latest
is_final_ver: true
pg_old_dir: ${{ env.OLD_INSTALL_DIR }}
pg_new_dir: ${{ env.NEW_INSTALL_DIR }}
migration_mode: "single-db"
- name: Upload New Postgres log
if: always() && steps.upgrade-and-verify.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: postgres-log-new
path: ~/${{env.NEW_INSTALL_DIR}}/data/logfile
- name: Upload upgrade Log
if: always() && steps.upgrade-and-verify.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: upgrade-logs
path: ~/upgrade/*.log
- name: Rename Test Summary Files
id: test-file-rename
if: always() && ( steps.upgrade-and-verify.outcome == 'failure' || steps.setup-base-version.outcome == 'failure' )
run: |
cd test/JDBC/Info
timestamp=`ls -Art | tail -n 1`
cd $timestamp
cp $timestamp.diff ~/upgrade/output-diff.diff
cp "$timestamp"_runSummary.log ~/upgrade/run-summary.log
mkdir -p ~/failed-testscript-outputs
for f in $(grep "[A-Za-z_\-]*:[ ]*Failed" $timestamp"_runSummary.log" | cut -d ":" -f 1);
do
if [[ -f ../../output/$f".out" ]]; then
cp ../../output/$f".out" ~/failed-testscript-outputs/$f".out"
elif [[ -f ../../output/"singledb__preparation__"$f".out" ]]; then
cp ../../output/"singledb__preparation__"$f".out" ~/failed-testscript-outputs/"singledb__preparation__"$f".out"
else
cp ../../output/"singledb__verification_cleanup__"$f".out" ~/failed-testscript-outputs/"singledb__verification_cleanup__"$f".out"
fi
done
- name: Upload Run Summary
if: always() && steps.test-file-rename.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: Test Run Artificats
path: |
~/upgrade/*.log
~/upgrade/*.diff
~/failed-testscript-outputs
~/${{env.NEW_INSTALL_DIR}}/data/pg_upgrade_output.d/*
- name: Check and upload coredumps
if: always() && ( steps.upgrade-and-verify.outcome == 'failure' || steps.setup-base-version.outcome == 'failure' )
uses: ./.github/composite-actions/upload-coredump