Skip to content

Backport to 2.30.x: #10583: Handle NULL checks on single column bloom indexes #29665

Backport to 2.30.x: #10583: Handle NULL checks on single column bloom indexes

Backport to 2.30.x: #10583: Handle NULL checks on single column bloom indexes #29665

Workflow file for this run

# Test our extension sql scripts are following security best practices
name: pgspot
"on":
pull_request:
push:
branches:
- main
- ?.*.x
jobs:
check_paths:
runs-on: ubuntu-latest
outputs:
run_ci: >-
${{ github.event_name == 'push'
|| (steps.filter.outputs.sql == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-ci'))
}}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
id: filter
with:
filters: .github/filters.yaml
pgspot:
needs: check_paths
if: needs.check_paths.outputs.run_ci == 'true'
runs-on: ubuntu-latest
env:
# policy_compression, policy_compression_execute and policy_compaction do not have explicit
# search_path because postgres does not allow it for procedures doing transaction control
PGSPOT_OPTS: --ignore PS002
--proc-without-search-path '_timescaledb_internal.policy_compression(job_id integer,config jsonb)'
--proc-without-search-path '_timescaledb_functions.policy_compression(job_id integer,config jsonb)'
--proc-without-search-path '_timescaledb_functions.policy_compression_execute(job_id integer,htid integer,lag anyelement,maxchunks integer,verbose_log boolean,recompress_enabled boolean,reindex_enabled boolean,use_creation_time boolean)'
--proc-without-search-path
'_timescaledb_functions.policy_compression_execute(job_id integer,htid integer,lag anyelement,maxchunks integer,verbose_log boolean,recompress_enabled boolean,reindex_enabled boolean,use_creation_time boolean,recompress_unordered boolean)'
--proc-without-search-path '_timescaledb_functions.policy_compaction(job_id integer,config jsonb)'
steps:
- name: Setup python 3.13
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.13'
- name: Checkout timescaledb
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pgspot
run: |
python -m pip install pgspot==0.9.2
- name: Build timescaledb sqlfiles
run: |
previous_version=$(grep '^previous_version = ' version.config | sed -e 's!^[^=]\+ = !!')
git fetch --tags
./bootstrap -DGENERATE_DOWNGRADE_SCRIPT=ON
# version.config in 2.27.0 tag is incorrect and will produce wrong sql files
if [ "${previous_version}" == "2.27.0" ]; then
git checkout 2.27.0-p0
else
git checkout ${previous_version}
fi
make -C build sqlfile sqlupdatescripts
git checkout ${GITHUB_SHA}
make -C build sqlfile sqlupdatescripts
ls -la build/sql/timescaledb--*.sql
- name: Run pgspot
run: |
version=$(grep '^version = ' version.config | sed -e 's!^[^=]\+ = !!')
previous_version=$(grep '^previous_version = ' version.config | sed -e 's!^[^=]\+ = !!')
# Show files used
ls -la build/sql/timescaledb--${version}.sql build/sql/timescaledb--${previous_version}--${version}.sql \
build/sql/timescaledb--${version}--${previous_version}.sql
# The next pgspot execution tests the installation script by itself
pgspot ${{ env.PGSPOT_OPTS }} build/sql/timescaledb--${version}.sql
# The next pgspot execution tests the update script to the latest version
# we prepend the installation script here so pgspot can correctly keep track of created objects
pgspot ${{ env.PGSPOT_OPTS }} -a build/sql/timescaledb--${previous_version}.sql \
build/sql/timescaledb--${previous_version}--${version}.sql
# The next pgspot execution tests the downgrade script to the previous version
# we prepend the installation script here so pgspot can correctly keep track of created objects
pgspot ${{ env.PGSPOT_OPTS }} -a build/sql/timescaledb--${version}.sql \
build/sql/timescaledb--${version}--${previous_version}.sql