Skip to content

Chunk_create must add existing table or fail #16928

Chunk_create must add existing table or fail

Chunk_create must add existing table or fail #16928

Workflow file for this run

name: Test Update and Downgrade
"on":
push:
branches:
- main
- prerelease_test
pull_request:
jobs:
config:
runs-on: ubuntu-latest
outputs:
pg_latest: ${{ steps.setter.outputs.PG_LATEST }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Read configuration
id: setter
run: python .github/gh_config_reader.py
update_test:
name: Update test PG${{ matrix.pg }}
runs-on: 'ubuntu-latest'
needs: config
strategy:
matrix:
pg: ${{ fromJson(needs.config.outputs.pg_latest) }}
fail-fast: false
env:
PG_VERSION: ${{ matrix.pg }}
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- name: Checkout TimescaleDB
uses: actions/checkout@v3
- name: Update tests ${{ matrix.pg }}
run: |
PG_MAJOR=$(echo "${{ matrix.pg }}" | sed -e 's![.].*!!')
./scripts/test_updates_pg${PG_MAJOR}.sh
- name: Update diff
if: failure()
run: |
find . -name "update_test.*.diff.*" -maxdepth 1 | xargs -IFILE sh -c "echo '\nFILE\n';cat FILE"
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: Extension update diff ${{ matrix.pg }}
path: update_test.*.diff.*
downgrade_test:
name: Downgrade test PG${{ matrix.pg }}
runs-on: 'ubuntu-latest'
needs: config
strategy:
matrix:
pg: ${{ fromJson(needs.config.outputs.pg_latest) }}
fail-fast: false
env:
PG_VERSION: ${{ matrix.pg }}
POSTGRES_HOST_AUTH_METHOD: trust
GENERATE_DOWNGRADE_SCRIPT: ON
steps:
- name: Checkout TimescaleDB
uses: actions/checkout@v3
# We need the tags to be able to build a downgrade script.
- name: Fetch all tags
run: git fetch --tags && git tag
- name: Downgrade tests ${{ matrix.pg }}
env:
TEST_VERSION: v7
run: |
DOWNGRADE_TO=$(grep '^downgrade_to_version = ' version.config | sed -e 's!^[^=]\+ = !!')
PG_MAJOR=$(echo "${{ matrix.pg }}" | sed -e 's![.].*!!')
UPDATE_FROM_TAG=${DOWNGRADE_TO}-pg${PG_MAJOR}
export UPDATE_FROM_TAG
# We need to use same libssl version used in the latest official TimescaleDB container images.
# So we will use the fixed alpine version, this will guarantee that libssl version wont change.
PG_IMAGE_TAG="${PG_VERSION}-alpine3.17" scripts/test_downgrade_from_tag.sh
- name: Downgrade diff
if: failure()
run: |
find . -name "downgrade_test.*.diff.*" -maxdepth 1 | xargs -IFILE sh -c "echo '\nFILE\n';cat FILE"
- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: Extension downgrade diff ${{ matrix.pg }}
path: downgrade_test.*.diff.*