Skip to content

Chunk_create must add existing table or fail #12797

Chunk_create must add existing table or fail

Chunk_create must add existing table or fail #12797

name: Regression Linux i386
"on":
push:
branches:
- main
- prerelease_test
paths-ignore:
- '**.md'
- 'LICENSE*'
- NOTICE
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE*'
- NOTICE
jobs:
config:
runs-on: ubuntu-latest
outputs:
pg_latest: ${{ steps.setter.outputs.PG_LATEST }}
pg15_latest: ${{ steps.setter.outputs.PG15_LATEST }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Read configuration
id: setter
run: python .github/gh_config_reader.py
regress_linux_32bit:
name: PG${{ matrix.pg }} ${{ matrix.build_type }} linux-i386
runs-on: ubuntu-latest
needs: config
container:
image: i386/debian:buster-slim
options: --privileged --ulimit core=-1
env:
DEBIAN_FRONTEND: noninteractive
IGNORES: "append-* debug_notice transparent_decompression-*
transparent_decompress_chunk-* plan_skip_scan-12 pg_dump
dist_move_chunk dist_param dist_insert remote_txn telemetry"
SKIPS: chunk_adaptive histogram_test
strategy:
fail-fast: false
matrix:
pg: ${{ fromJson(needs.config.outputs.pg_latest) }}
build_type: [ Debug ]
include:
- pg: ${{ fromJson(needs.config.outputs.pg15_latest) }}
ignores_version: partialize_finalize
steps:
- name: Install build dependencies
run: |
PG_MAJOR=$(echo "${{ matrix.pg }}" | sed -e 's![.].*!!')
echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern
apt-get update
apt-get install -y gnupg postgresql-common
yes | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
apt-get install -y gcc make cmake libssl-dev libkrb5-dev libipc-run-perl \
libtest-most-perl sudo gdb git wget gawk
apt-get install -y postgresql-${PG_MAJOR} postgresql-server-dev-${PG_MAJOR}
- name: Build pg_isolation_regress
run: |
PG_MAJOR=$(echo "${{ matrix.pg }}" | sed -e 's![.].*!!')
wget -q -O postgresql.tar.bz2 \
https://ftp.postgresql.org/pub/source/v${{ matrix.pg }}/postgresql-${{ matrix.pg }}.tar.bz2
mkdir -p ~/postgresql
tar --extract --file postgresql.tar.bz2 --directory ~/postgresql --strip-components 1
cd ~/postgresql
./configure --prefix=/usr/lib/postgresql/${PG_MAJOR} --enable-debug \
--enable-cassert --with-openssl --without-readline --without-zlib
make -C src/test/isolation
chown -R postgres:postgres ~/postgresql
- name: Checkout TimescaleDB
uses: actions/checkout@v3
- name: Build TimescaleDB
run: |
# The owner of the checkout directory and the files do not match. Add the directory to
# Git's "safe.directory" setting. Otherwise git would complain about
# 'detected dubious ownership in repository'
git config --global --add safe.directory $(pwd)
./bootstrap -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" -DPG_SOURCE_DIR=~/postgresql -DREQUIRE_ALL_TESTS=ON
make -C build install
chown -R postgres:postgres .
- name: make installcheck
id: installcheck
shell: bash
run: |
set -o pipefail
export LANG=C.UTF-8
sudo -u postgres make -k -C build installcheck IGNORES="${IGNORES} \
${{ matrix.ignores_version }}" SKIPS="${SKIPS}" | tee installcheck.log
- name: Show regression diffs
if: always()
id: collectlogs
shell: bash
run: |
find . -name regression.diffs -exec cat {} + > regression.log
find . -name postmaster.log -exec cat {} + > postgres.log
if [[ -s regression.log ]]; then echo "regression_diff=true" >>$GITHUB_OUTPUT; fi
grep -e 'FAILED' -e 'failed (ignored)' installcheck.log || true
cat regression.log
- name: Coredumps
if: always()
id: coredumps
shell: bash
run: |
# wait in case there are in-progress coredumps
sleep 10
if compgen -G "/tmp/core*" > /dev/null; then
PG_MAJOR=$(echo "${{ matrix.pg }}" | sed -e 's![.].*!!')
apt-get install postgresql-${PG_MAJOR}-dbgsym >/dev/null
for file in /tmp/core*
do
gdb /usr/lib/postgresql/${PG_MAJOR}/bin/postgres -c $file <<<"
set verbose on
set trace-commands on
show debug-file-directory
printf "'"'"query = '%s'\n\n"'"'", debug_query_string
frame function ExceptionalCondition
printf "'"'"condition = '%s'\n"'"'", conditionName
up 1
l
info args
info locals
bt full
" | tee -a stacktrace.log
done
echo "coredumps=true" >>$GITHUB_OUTPUT
exit 1
fi
- name: Save regression diffs
if: always() && steps.collectlogs.outputs.regression_diff == 'true'
uses: actions/upload-artifact@v3
with:
name: Regression diff linux-i386 PG${{ matrix.pg }}
path: |
regression.log
installcheck.log
- name: Save stacktraces
if: always() && steps.coredumps.outputs.coredumps == 'true'
uses: actions/upload-artifact@v3
with:
name: Stacktraces linux-i386 PG${{ matrix.pg }}
path: stacktrace.log
- name: Save PostgreSQL log
if: always()
uses: actions/upload-artifact@v3
with:
name: PostgreSQL log linux-i386 PG${{ matrix.pg }}
path: postgres.log
- name: Save TAP test logs
if: always()
uses: actions/upload-artifact@v3
with:
name: TAP test logs ${{ matrix.os }} ${{ matrix.name }} ${{ matrix.pg }}
path: |
build/test/tmp_check/log
build/tsl/test/tmp_check/log
- name: Upload test results to the database
if: always()
shell: bash
env:
# GitHub Actions allow you neither to use the env context for the job name,
# nor to access the job name from the step context, so we have to
# duplicate it to work around this nonsense.
JOB_NAME: PG${{ matrix.pg }} ${{ matrix.build_type }} linux-i386
CI_STATS_DB: ${{ secrets.CI_STATS_DB }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF_NAME: ${{ github.ref_name }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }}
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
JOB_STATUS: ${{ job.status }}
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]] ;
then
GITHUB_PR_NUMBER="${{ github.event.number }}"
else
GITHUB_PR_NUMBER=0
fi
export GITHUB_PR_NUMBER
scripts/upload_ci_stats.sh