From c94dac48bc11c2a3a3bd55bc1a0e77ab862b70a6 Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Thu, 28 Mar 2024 19:05:41 +0200 Subject: [PATCH] Debug --- .github/workflows/postgresql-11-build.yml | 218 +++++++-------- .../workflows/postgresql-11-pgdg-package.yml | 112 ++++---- .github/workflows/postgresql-11-pmm.yaml | 68 ++--- .../workflows/postgresql-11-ppg-package.yml | 128 ++++----- .github/workflows/postgresql-12-build.yml | 256 ++++++++--------- .../workflows/postgresql-12-pgdg-package.yml | 158 +++++------ .github/workflows/postgresql-12-pmm.yaml | 68 ++--- .../workflows/postgresql-12-ppg-package.yml | 174 ++++++------ .github/workflows/postgresql-13-build.yml | 256 ++++++++--------- .../workflows/postgresql-13-pgdg-package.yml | 158 +++++------ .github/workflows/postgresql-13-pmm.yaml | 68 ++--- .../workflows/postgresql-13-ppg-package.yml | 168 +++++------ .github/workflows/postgresql-14-build.yml | 264 +++++++++--------- .../workflows/postgresql-14-pgdg-package.yml | 156 +++++------ .github/workflows/postgresql-14-pmm.yaml | 68 ++--- .../workflows/postgresql-14-ppg-package.yml | 168 +++++------ .github/workflows/postgresql-15-build.yml | 264 +++++++++--------- .../workflows/postgresql-15-pgdg-package.yml | 158 +++++------ .github/workflows/postgresql-15-pmm.yaml | 68 ++--- .../workflows/postgresql-15-ppg-package.yml | 170 +++++------ .github/workflows/postgresql-16-build.yml | 5 + .../workflows/postgresql-16-pgdg-package.yml | 158 +++++------ .../workflows/postgresql-16-ppg-package.yml | 170 +++++------ 23 files changed, 1743 insertions(+), 1738 deletions(-) diff --git a/.github/workflows/postgresql-11-build.yml b/.github/workflows/postgresql-11-build.yml index ef4aa910..53eff6e7 100644 --- a/.github/workflows/postgresql-11-build.yml +++ b/.github/workflows/postgresql-11-build.yml @@ -1,121 +1,121 @@ -name: postgresql-11-build -on: [push] +# name: postgresql-11-build +# on: [push] -jobs: - build: - name: pg-11-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v2 - with: - repository: 'postgres/postgres' - ref: 'REL_11_STABLE' +# jobs: +# build: +# name: pg-11-build-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone postgres repository +# uses: actions/checkout@v2 +# with: +# repository: 'postgres/postgres' +# ref: 'REL_11_STABLE' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex \ +# libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ +# libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ +# libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ +# llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config - - name: Create pgsql dir - run: mkdir -p /opt/pgsql +# - name: Create pgsql dir +# run: mkdir -p /opt/pgsql - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=/usr/include' '--mandir=/usr/share/man' \ - '--infodir=/usr/share/info' '--sysconfdir=/etc' '--enable-nls' \ - '--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ - 'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ - '--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ - '--with-libxslt' 'PYTHON=/usr/bin/python3' 'MKDIR_P=/bin/mkdir -p' \ - '--mandir=/usr/share/postgresql/11/man' '--enable-dtrace' \ - '--docdir=/usr/share/doc/postgresql-doc-11' '--enable-debug' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/11' '--enable-thread-safety' \ - '--bindir=/usr/lib/postgresql/11/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ - '--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ - '--includedir=/usr/include/postgresql' '--with-gnu-ld' \ - '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ - '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ - 'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' '--with-gssapi' '--with-ldap' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ - '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ - 'build_alias=x86_64-linux-gnu' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world +# - name: Build postgres +# run: | +# export PATH="/opt/pgsql/bin:$PATH" +# ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ +# '--includedir=/usr/include' '--mandir=/usr/share/man' \ +# '--infodir=/usr/share/info' '--sysconfdir=/etc' '--enable-nls' \ +# '--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ +# 'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ +# '--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ +# '--with-libxslt' 'PYTHON=/usr/bin/python3' 'MKDIR_P=/bin/mkdir -p' \ +# '--mandir=/usr/share/postgresql/11/man' '--enable-dtrace' \ +# '--docdir=/usr/share/doc/postgresql-doc-11' '--enable-debug' \ +# '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ +# '--datadir=/usr/share/postgresql/11' '--enable-thread-safety' \ +# '--bindir=/usr/lib/postgresql/11/bin' '--enable-tap-tests' \ +# '--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ +# '--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ +# '--includedir=/usr/include/postgresql' '--with-gnu-ld' \ +# '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ +# '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ +# 'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ +# 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' '--with-gssapi' '--with-ldap' \ +# 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ +# '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ +# '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ +# 'build_alias=x86_64-linux-gnu' \ +# 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ +# 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ +# 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' +# make world +# sudo make install-world - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/11/bin:$PATH" - sudo cp /usr/lib/postgresql/11/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start +# - name: Start postgresql cluster +# run: | +# export PATH="/usr/lib/postgresql/11/bin:$PATH" +# sudo cp /usr/lib/postgresql/11/bin/pg_config /usr/bin +# initdb -D /opt/pgsql/data +# pg_ctl -D /opt/pgsql/data -l logfile start - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor/ +# - name: Build pg_stat_monitor +# run: | +# make USE_PGXS=1 +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor/ - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/11/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor +# - name: Load pg_stat_monitor library and Restart Server +# run: | +# export PATH="/usr/lib/postgresql/11/bin:$PATH" +# pg_ctl -D /opt/pgsql/data -l logfile stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ +# /opt/pgsql/data/postgresql.conf +# pg_ctl -D /opt/pgsql/data -l logfile start +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# make installcheck +# working-directory: src/pg_stat_monitor - - name: Report on pg_stat_monitor test fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/logfile - retention-days: 1 +# - name: Report on pg_stat_monitor test fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/logfile +# retention-days: 1 - - name: Start Server installcheck-world tests - run: | - make installcheck-world +# - name: Start Server installcheck-world tests +# run: | +# make installcheck-world - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 +# - name: Report on installcheck-world test suites fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions output files of failed testsuite, and pg log +# path: | +# **/regression.diffs +# **/regression.out +# src/pg_stat_monitor/logfile +# retention-days: 3 diff --git a/.github/workflows/postgresql-11-pgdg-package.yml b/.github/workflows/postgresql-11-pgdg-package.yml index c5964252..1493f601 100644 --- a/.github/workflows/postgresql-11-pgdg-package.yml +++ b/.github/workflows/postgresql-11-pgdg-package.yml @@ -1,63 +1,63 @@ -name: postgresql-11-pgdg-package -on: [pull_request] +# name: postgresql-11-pgdg-package +# on: [pull_request] -jobs: - build: - name: pg-11-pgdg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-11-pgdg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config - - name: Install PG Distribution Postgresql 11 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo wget --quiet -O - \ - https://www.postgresql.org/media/keys/ACCC4CF8.asc | - sudo apt-key add - - sudo apt-get -y update - sudo apt-get -y install postgresql-11 postgresql-server-dev-11 +# - name: Install PG Distribution Postgresql 11 +# run: | +# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ +# $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +# sudo wget --quiet -O - \ +# https://www.postgresql.org/media/keys/ACCC4CF8.asc | +# sudo apt-key add - +# sudo apt-get -y update +# sudo apt-get -y install postgresql-11 postgresql-server-dev-11 - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/11/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=/home/postgres - sudo -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/11/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=/home/postgres +# sudo -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Report on test fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/logfile - retention-days: 3 +# - name: Report on test fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/logfile +# retention-days: 3 diff --git a/.github/workflows/postgresql-11-pmm.yaml b/.github/workflows/postgresql-11-pmm.yaml index 95013ae2..adba19ea 100644 --- a/.github/workflows/postgresql-11-pmm.yaml +++ b/.github/workflows/postgresql-11-pmm.yaml @@ -1,41 +1,41 @@ -name: postgresql-11-pmm-integration -on: [push] +# name: postgresql-11-pmm-integration +# on: [push] -jobs: - build: - name: pg-11-pgsm-pmm-integration-test - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Clone QA Integration repository - uses: actions/checkout@v3 - with: - repository: 'Percona-Lab/qa-integration' - ref: 'main' +# jobs: +# build: +# name: pg-11-pgsm-pmm-integration-test +# runs-on: ubuntu-latest +# timeout-minutes: 30 +# steps: +# - name: Clone QA Integration repository +# uses: actions/checkout@v3 +# with: +# repository: 'Percona-Lab/qa-integration' +# ref: 'main' - # print branch and Repo name - - name: Get branch and Repo Name - run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor +# # print branch and Repo name +# - name: Get branch and Repo Name +# run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor - - name: "Set TARGET_BRANCH variable for a PR run" - if: github.event_name == 'pull_request' - run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PR run" +# if: github.event_name == 'pull_request' +# run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - - name: "Set TARGET_BRANCH variable for a PUSH run" - if: github.event_name == 'push' - run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PUSH run" +# if: github.event_name == 'push' +# run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Run PMM & PGSM Setup, E2E Tests - run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=11 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} +# - name: Run PMM & PGSM Setup, E2E Tests +# run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=11 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} - - name: Get PMM-Agent Logs from the Container - if: success() || failure() # run this step even if previous step failed - run: docker exec pgsql_pgsm_11 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log +# - name: Get PMM-Agent Logs from the Container +# if: success() || failure() # run this step even if previous step failed +# run: docker exec pgsql_pgsm_11 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log - - name: Upload Tests Artifacts - uses: actions/upload-artifact@v3 - if: success() || failure() # run this step even if previous step failed - with: - name: tests-artifact - path: ./pmm-ui-tests/tests/output/ - if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` +# - name: Upload Tests Artifacts +# uses: actions/upload-artifact@v3 +# if: success() || failure() # run this step even if previous step failed +# with: +# name: tests-artifact +# path: ./pmm-ui-tests/tests/output/ +# if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/postgresql-11-ppg-package.yml b/.github/workflows/postgresql-11-ppg-package.yml index 141aa234..ab12c193 100644 --- a/.github/workflows/postgresql-11-ppg-package.yml +++ b/.github/workflows/postgresql-11-ppg-package.yml @@ -1,72 +1,72 @@ -name: postgresql-11-ppg-package -on: [push] +# name: postgresql-11-ppg-package +# on: [push] -jobs: - build: - name: pg-11-ppg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-11-ppg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb +# - name: Install percona-release script +# run: | +# sudo apt-get -y update +# sudo apt-get -y upgrade +# sudo apt-get install -y wget gnupg2 curl lsb-release +# sudo wget \ +# https://repo.percona.com/apt/percona-release_latest.generic_all.deb +# sudo dpkg -i percona-release_latest.generic_all.deb - - name: Install Percona Distribution Postgresql 11 - run: | - sudo percona-release setup ppg-11 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-11 \ - percona-postgresql-contrib percona-postgresql-server-dev-all +# - name: Install Percona Distribution Postgresql 11 +# run: | +# sudo percona-release setup ppg-11 +# sudo apt-get update -y +# sudo apt-get install -y percona-postgresql-11 \ +# percona-postgresql-contrib percona-postgresql-server-dev-all - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/11/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=/home/postgres - sudo -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/11/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=/home/postgres +# sudo -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Report on test fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/logfile - retention-days: 3 +# - name: Report on test fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/logfile +# retention-days: 3 diff --git a/.github/workflows/postgresql-12-build.yml b/.github/workflows/postgresql-12-build.yml index 93199847..152b869f 100644 --- a/.github/workflows/postgresql-12-build.yml +++ b/.github/workflows/postgresql-12-build.yml @@ -1,141 +1,141 @@ -name: postgresql-12-build -on: [push] +# name: postgresql-12-build +# on: [push] -jobs: - build: - name: pg-12-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v2 - with: - repository: 'postgres/postgres' - ref: 'REL_12_STABLE' +# jobs: +# build: +# name: pg-12-build-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone postgres repository +# uses: actions/checkout@v2 +# with: +# repository: 'postgres/postgres' +# ref: 'REL_12_STABLE' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex \ +# libipc-run-perl docbook-xsl docbook-xsl libxml2 libxml2-utils \ +# libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ +# libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ +# llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Create pgsql dir - run: mkdir -p /opt/pgsql +# - name: Create pgsql dir +# run: mkdir -p /opt/pgsql - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=/usr/include' '--mandir=/usr/share/man' \ - '--infodir=/usr/share/info' '--sysconfdir=/etc' '--with-gnu-ld' \ - '--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ - 'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ - '--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ - '--with-libxslt' 'PYTHON=/usr/bin/python3' '--enable-tap-tests' \ - '--mandir=/usr/share/postgresql/12/man' '--enable-thread-safety' \ - '--docdir=/usr/share/doc/postgresql-doc-12' '--enable-debug' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/12' '--enable-dtrace' \ - '--bindir=/usr/lib/postgresql/12/bin' '--disable-rpath' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--with-pgport=5432' \ - '--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ - '--includedir=/usr/include/postgresql' 'TAR=/bin/tar' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' '--with-gssapi' '--with-ldap' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ - '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ - 'build_alias=x86_64-linux-gnu' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' '--enable-nls' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world +# - name: Build postgres +# run: | +# export PATH="/opt/pgsql/bin:$PATH" +# ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ +# '--includedir=/usr/include' '--mandir=/usr/share/man' \ +# '--infodir=/usr/share/info' '--sysconfdir=/etc' '--with-gnu-ld' \ +# '--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ +# 'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ +# '--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ +# '--with-libxslt' 'PYTHON=/usr/bin/python3' '--enable-tap-tests' \ +# '--mandir=/usr/share/postgresql/12/man' '--enable-thread-safety' \ +# '--docdir=/usr/share/doc/postgresql-doc-12' '--enable-debug' \ +# '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ +# '--datadir=/usr/share/postgresql/12' '--enable-dtrace' \ +# '--bindir=/usr/lib/postgresql/12/bin' '--disable-rpath' \ +# '--libdir=/usr/lib/x86_64-linux-gnu' '--with-pgport=5432' \ +# '--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ +# '--includedir=/usr/include/postgresql' 'TAR=/bin/tar' \ +# '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ +# 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ +# '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ +# 'PROVE=/usr/bin/prove' '--with-gssapi' '--with-ldap' \ +# 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ +# '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ +# '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ +# 'build_alias=x86_64-linux-gnu' \ +# 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' '--enable-nls' \ +# 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ +# 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' +# make world +# sudo make install-world - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/12/bin:$PATH" - sudo cp /usr/lib/postgresql/12/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start +# - name: Start postgresql cluster +# run: | +# export PATH="/usr/lib/postgresql/12/bin:$PATH" +# sudo cp /usr/lib/postgresql/12/bin/pg_config /usr/bin +# initdb -D /opt/pgsql/data +# pg_ctl -D /opt/pgsql/data -l logfile start - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# make USE_PGXS=1 +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/12/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor +# - name: Load pg_stat_monitor library and Restart Server +# run: | +# export PATH="/usr/lib/postgresql/12/bin:$PATH" +# pg_ctl -D /opt/pgsql/data -l logfile stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ +# /opt/pgsql/data/postgresql.conf +# pg_ctl -D /opt/pgsql/data -l logfile start +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# make installcheck +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 - - name: Start Server installcheck-world tests - run: | - make installcheck-world +# - name: Start Server installcheck-world tests +# run: | +# make installcheck-world - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 +# - name: Report on installcheck-world test suites fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions output files of failed testsuite, and pg log +# path: | +# **/regression.diffs +# **/regression.out +# src/pg_stat_monitor/logfile +# retention-days: 3 diff --git a/.github/workflows/postgresql-12-pgdg-package.yml b/.github/workflows/postgresql-12-pgdg-package.yml index 2bd74428..50b317ec 100644 --- a/.github/workflows/postgresql-12-pgdg-package.yml +++ b/.github/workflows/postgresql-12-pgdg-package.yml @@ -1,87 +1,87 @@ -name: postgresql-12-pgdg-package -on: [pull_request] +# name: postgresql-12-pgdg-package +# on: [pull_request] -jobs: - build: - name: pg-12-pgdg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-12-pgdg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget -y - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget -y +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install PG Distribution Postgresql 12 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo wget --quiet -O - \ - https://www.postgresql.org/media/keys/ACCC4CF8.asc | - sudo apt-key add - - sudo apt-get -y update - sudo apt-get -y install postgresql-12 postgresql-server-dev-12 +# - name: Install PG Distribution Postgresql 12 +# run: | +# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ +# $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +# sudo wget --quiet -O - \ +# https://www.postgresql.org/media/keys/ACCC4CF8.asc | +# sudo apt-key add - +# sudo apt-get -y update +# sudo apt-get -y install postgresql-12 postgresql-server-dev-12 - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/12/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/12/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-12-pmm.yaml b/.github/workflows/postgresql-12-pmm.yaml index e5b88d6e..df710c29 100644 --- a/.github/workflows/postgresql-12-pmm.yaml +++ b/.github/workflows/postgresql-12-pmm.yaml @@ -1,41 +1,41 @@ -name: postgresql-12-pmm-integration -on: [push] +# name: postgresql-12-pmm-integration +# on: [push] -jobs: - build: - name: pg-12-pgsm-pmm-integration-test - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Clone QA Integration repository - uses: actions/checkout@v3 - with: - repository: 'Percona-Lab/qa-integration' - ref: 'main' +# jobs: +# build: +# name: pg-12-pgsm-pmm-integration-test +# runs-on: ubuntu-latest +# timeout-minutes: 30 +# steps: +# - name: Clone QA Integration repository +# uses: actions/checkout@v3 +# with: +# repository: 'Percona-Lab/qa-integration' +# ref: 'main' - # print branch and Repo name - - name: Get branch and Repo Name - run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor +# # print branch and Repo name +# - name: Get branch and Repo Name +# run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor - - name: "Set TARGET_BRANCH variable for a PR run" - if: github.event_name == 'pull_request' - run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PR run" +# if: github.event_name == 'pull_request' +# run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - - name: "Set TARGET_BRANCH variable for a PUSH run" - if: github.event_name == 'push' - run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PUSH run" +# if: github.event_name == 'push' +# run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Run PMM & PGSM Setup, E2E Tests - run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=12 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} +# - name: Run PMM & PGSM Setup, E2E Tests +# run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=12 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} - - name: Get PMM-Agent Logs from the Container - if: success() || failure() # run this step even if previous step failed - run: docker exec pgsql_pgsm_12 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log +# - name: Get PMM-Agent Logs from the Container +# if: success() || failure() # run this step even if previous step failed +# run: docker exec pgsql_pgsm_12 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log - - name: Upload Tests Artifacts - uses: actions/upload-artifact@v3 - if: success() || failure() # run this step even if previous step failed - with: - name: tests-artifact - path: ./pmm-ui-tests/tests/output/ - if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` +# - name: Upload Tests Artifacts +# uses: actions/upload-artifact@v3 +# if: success() || failure() # run this step even if previous step failed +# with: +# name: tests-artifact +# path: ./pmm-ui-tests/tests/output/ +# if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/postgresql-12-ppg-package.yml b/.github/workflows/postgresql-12-ppg-package.yml index 04257fe9..940687de 100644 --- a/.github/workflows/postgresql-12-ppg-package.yml +++ b/.github/workflows/postgresql-12-ppg-package.yml @@ -1,96 +1,96 @@ -name: postgresql-12-ppg-package -on: [push] +# name: postgresql-12-ppg-package +# on: [push] -jobs: - build: - name: pg-12-ppg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-12-ppg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb +# - name: Install percona-release script +# run: | +# sudo apt-get -y update +# sudo apt-get -y upgrade +# sudo apt-get install -y wget gnupg2 curl lsb-release +# sudo wget \ +# https://repo.percona.com/apt/percona-release_latest.generic_all.deb +# sudo dpkg -i percona-release_latest.generic_all.deb - - name: Install Percona Distribution Postgresql 12 - run: | - sudo percona-release setup ppg-12 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-12 \ - percona-postgresql-contrib percona-postgresql-server-dev-all +# - name: Install Percona Distribution Postgresql 12 +# run: | +# sudo percona-release setup ppg-12 +# sudo apt-get update -y +# sudo apt-get install -y percona-postgresql-12 \ +# percona-postgresql-contrib percona-postgresql-server-dev-all - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/12/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/12/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-13-build.yml b/.github/workflows/postgresql-13-build.yml index 16fe0a9c..8cff073a 100644 --- a/.github/workflows/postgresql-13-build.yml +++ b/.github/workflows/postgresql-13-build.yml @@ -1,141 +1,141 @@ -name: postgresql-13-build -on: [push] +# name: postgresql-13-build +# on: [push] -jobs: - build: - name: pg-13-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v2 - with: - repository: 'postgres/postgres' - ref: 'REL_13_STABLE' +# jobs: +# build: +# name: pg-13-build-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone postgres repository +# uses: actions/checkout@v2 +# with: +# repository: 'postgres/postgres' +# ref: 'REL_13_STABLE' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex \ +# libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ +# libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ +# libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ +# llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Create pgsql dir - run: mkdir -p /opt/pgsql +# - name: Create pgsql dir +# run: mkdir -p /opt/pgsql - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' \ - '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' \ - '--sysconfdir=/etc' '--localstatedir=/var' '--with-icu' \ - '--libdir=${prefix}/lib/x86_64-linux-gnu' '--with-perl' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--enable-debug' \ - '--with-tcl' '--with-pam' '--with-python' '--with-openssl' \ - '--with-libxml' '--with-libxslt' '--enable-tap-tests' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/13/man' \ - '--docdir=/usr/share/doc/postgresql-doc-13' 'AWK=mawk' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/13' '--enable-nls' \ - '--bindir=/usr/lib/postgresql/13/bin' '--enable-dtrace' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ - '--libexecdir=/usr/lib/postgresql' '--enable-thread-safety' \ - '--includedir=/usr/include/postgresql' 'TAR=/bin/tar' \ - '--with-uuid=e2fs' '--with-gnu-ld' 'XSLTPROC=xsltproc --nonet' \ - '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ - '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ - 'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ - 'MKDIR_P=/bin/mkdir -p' 'PROVE=/usr/bin/prove' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - '--with-gssapi' '--with-ldap' 'build_alias=x86_64-linux-gnu' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world +# - name: Build postgres +# run: | +# export PATH="/opt/pgsql/bin:$PATH" +# ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ +# '--includedir=${prefix}/include' \ +# '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' \ +# '--sysconfdir=/etc' '--localstatedir=/var' '--with-icu' \ +# '--libdir=${prefix}/lib/x86_64-linux-gnu' '--with-perl' \ +# '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--enable-debug' \ +# '--with-tcl' '--with-pam' '--with-python' '--with-openssl' \ +# '--with-libxml' '--with-libxslt' '--enable-tap-tests' \ +# 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/13/man' \ +# '--docdir=/usr/share/doc/postgresql-doc-13' 'AWK=mawk' \ +# '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ +# '--datadir=/usr/share/postgresql/13' '--enable-nls' \ +# '--bindir=/usr/lib/postgresql/13/bin' '--enable-dtrace' \ +# '--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ +# '--libexecdir=/usr/lib/postgresql' '--enable-thread-safety' \ +# '--includedir=/usr/include/postgresql' 'TAR=/bin/tar' \ +# '--with-uuid=e2fs' '--with-gnu-ld' 'XSLTPROC=xsltproc --nonet' \ +# '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ +# '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ +# 'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ +# 'MKDIR_P=/bin/mkdir -p' 'PROVE=/usr/bin/prove' \ +# 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ +# '--with-gssapi' '--with-ldap' 'build_alias=x86_64-linux-gnu' \ +# 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ +# 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ +# 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' +# make world +# sudo make install-world - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/13/bin:$PATH" - sudo cp /usr/lib/postgresql/13/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start +# - name: Start postgresql cluster +# run: | +# export PATH="/usr/lib/postgresql/13/bin:$PATH" +# sudo cp /usr/lib/postgresql/13/bin/pg_config /usr/bin +# initdb -D /opt/pgsql/data +# pg_ctl -D /opt/pgsql/data -l logfile start - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# make USE_PGXS=1 +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/13/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor +# - name: Load pg_stat_monitor library and Restart Server +# run: | +# export PATH="/usr/lib/postgresql/13/bin:$PATH" +# pg_ctl -D /opt/pgsql/data -l logfile stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ +# /opt/pgsql/data/postgresql.conf +# pg_ctl -D /opt/pgsql/data -l logfile start +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# make installcheck +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 1 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 1 - - name: Start Server installcheck-world tests - run: | - make installcheck-world +# - name: Start Server installcheck-world tests +# run: | +# make installcheck-world - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 +# - name: Report on installcheck-world test suites fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions output files of failed testsuite, and pg log +# path: | +# **/regression.diffs +# **/regression.out +# src/pg_stat_monitor/logfile +# retention-days: 3 diff --git a/.github/workflows/postgresql-13-pgdg-package.yml b/.github/workflows/postgresql-13-pgdg-package.yml index f3eccdd0..724886ba 100644 --- a/.github/workflows/postgresql-13-pgdg-package.yml +++ b/.github/workflows/postgresql-13-pgdg-package.yml @@ -1,87 +1,87 @@ -name: postgresql-13-pgdg-package -on: [pull_request] +# name: postgresql-13-pgdg-package +# on: [pull_request] -jobs: - build: - name: pg-13-pgdg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-13-pgdg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget -y - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget -y +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install PG Distribution Postgresql 13 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo wget --quiet -O - \ - https://www.postgresql.org/media/keys/ACCC4CF8.asc | - sudo apt-key add - - sudo apt update - sudo apt -y install postgresql-13 postgresql-server-dev-13 +# - name: Install PG Distribution Postgresql 13 +# run: | +# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ +# $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +# sudo wget --quiet -O - \ +# https://www.postgresql.org/media/keys/ACCC4CF8.asc | +# sudo apt-key add - +# sudo apt update +# sudo apt -y install postgresql-13 postgresql-server-dev-13 - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/13/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/13/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-13-pmm.yaml b/.github/workflows/postgresql-13-pmm.yaml index 549c5a45..a998fdc9 100644 --- a/.github/workflows/postgresql-13-pmm.yaml +++ b/.github/workflows/postgresql-13-pmm.yaml @@ -1,41 +1,41 @@ -name: postgresql-13-pmm-integration -on: [push] +# name: postgresql-13-pmm-integration +# on: [push] -jobs: - build: - name: pg-13-pgsm-pmm-integration-test - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Clone QA Integration repository - uses: actions/checkout@v3 - with: - repository: 'Percona-Lab/qa-integration' - ref: 'main' +# jobs: +# build: +# name: pg-13-pgsm-pmm-integration-test +# runs-on: ubuntu-latest +# timeout-minutes: 30 +# steps: +# - name: Clone QA Integration repository +# uses: actions/checkout@v3 +# with: +# repository: 'Percona-Lab/qa-integration' +# ref: 'main' - # print branch and Repo name - - name: Get branch and Repo Name - run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor +# # print branch and Repo name +# - name: Get branch and Repo Name +# run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor - - name: "Set TARGET_BRANCH variable for a PR run" - if: github.event_name == 'pull_request' - run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PR run" +# if: github.event_name == 'pull_request' +# run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - - name: "Set TARGET_BRANCH variable for a PUSH run" - if: github.event_name == 'push' - run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PUSH run" +# if: github.event_name == 'push' +# run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Run PMM & PGSM Setup, E2E Tests - run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=13 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} +# - name: Run PMM & PGSM Setup, E2E Tests +# run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=13 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} - - name: Get PMM-Agent Logs from the Container - if: success() || failure() # run this step even if previous step failed - run: docker exec pgsql_pgsm_13 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log +# - name: Get PMM-Agent Logs from the Container +# if: success() || failure() # run this step even if previous step failed +# run: docker exec pgsql_pgsm_13 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log - - name: Upload Tests Artifacts - uses: actions/upload-artifact@v3 - if: success() || failure() # run this step even if previous step failed - with: - name: tests-artifact - path: ./pmm-ui-tests/tests/output/ - if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` +# - name: Upload Tests Artifacts +# uses: actions/upload-artifact@v3 +# if: success() || failure() # run this step even if previous step failed +# with: +# name: tests-artifact +# path: ./pmm-ui-tests/tests/output/ +# if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/postgresql-13-ppg-package.yml b/.github/workflows/postgresql-13-ppg-package.yml index 5bca1ffa..2ccdcc7c 100644 --- a/.github/workflows/postgresql-13-ppg-package.yml +++ b/.github/workflows/postgresql-13-ppg-package.yml @@ -1,93 +1,93 @@ -name: postgresql-13-ppg-package -on: [push] +# name: postgresql-13-ppg-package +# on: [push] -jobs: - build: - name: pg-13-ppg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-13-ppg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb +# - name: Install percona-release script +# run: | +# sudo apt-get -y update +# sudo apt-get -y upgrade +# sudo apt-get install -y wget gnupg2 curl lsb-release +# sudo wget \ +# https://repo.percona.com/apt/percona-release_latest.generic_all.deb +# sudo dpkg -i percona-release_latest.generic_all.deb - - name: Install Percona Distribution Postgresql 13 - run: | - sudo percona-release setup ppg-13 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-13 \ - percona-postgresql-contrib percona-postgresql-server-dev-all +# - name: Install Percona Distribution Postgresql 13 +# run: | +# sudo percona-release setup ppg-13 +# sudo apt-get update -y +# sudo apt-get install -y percona-postgresql-13 \ +# percona-postgresql-contrib percona-postgresql-server-dev-all - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/13/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/13/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-14-build.yml b/.github/workflows/postgresql-14-build.yml index 30fea46c..418d8a57 100644 --- a/.github/workflows/postgresql-14-build.yml +++ b/.github/workflows/postgresql-14-build.yml @@ -1,145 +1,145 @@ -name: postgresql-14-build -on: [push] +# name: postgresql-14-build +# on: [push] -jobs: - build: - name: pg-14-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v2 - with: - repository: 'postgres/postgres' - ref: 'REL_14_STABLE' +# jobs: +# build: +# name: pg-14-build-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone postgres repository +# uses: actions/checkout@v2 +# with: +# repository: 'postgres/postgres' +# ref: 'REL_14_STABLE' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev \ - uuid-dev liblz4-dev - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex \ +# libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ +# libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ +# libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ +# llvm-11 llvm-11-dev libselinux1-dev python3-dev \ +# uuid-dev liblz4-dev +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Create pgsql dir - run: mkdir -p /opt/pgsql +# - name: Create pgsql dir +# run: mkdir -p /opt/pgsql - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ - '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ - '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ - '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ - '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/14/man' \ - '--docdir=/usr/share/doc/postgresql-doc-14' '--with-pgport=5432' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/14' '--with-uuid=e2fs' \ - '--bindir=/usr/lib/postgresql/14/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ - '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ - '--includedir=/usr/include/postgresql' '--enable-dtrace' \ - '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world +# - name: Build postgres +# run: | +# export PATH="/opt/pgsql/bin:$PATH" +# ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ +# '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ +# '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ +# '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ +# '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ +# '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ +# '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ +# 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/14/man' \ +# '--docdir=/usr/share/doc/postgresql-doc-14' '--with-pgport=5432' \ +# '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ +# '--datadir=/usr/share/postgresql/14' '--with-uuid=e2fs' \ +# '--bindir=/usr/lib/postgresql/14/bin' '--enable-tap-tests' \ +# '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ +# '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ +# '--includedir=/usr/include/postgresql' '--enable-dtrace' \ +# '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ +# '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ +# 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ +# '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ +# 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ +# 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ +# 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ +# 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ +# 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ +# 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' +# make world +# sudo make install-world - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/14/bin:$PATH" - sudo cp /usr/lib/postgresql/14/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start +# - name: Start postgresql cluster +# run: | +# export PATH="/usr/lib/postgresql/14/bin:$PATH" +# sudo cp /usr/lib/postgresql/14/bin/pg_config /usr/bin +# initdb -D /opt/pgsql/data +# pg_ctl -D /opt/pgsql/data -l logfile start - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# make USE_PGXS=1 +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/14/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor +# - name: Load pg_stat_monitor library and Restart Server +# run: | +# export PATH="/usr/lib/postgresql/14/bin:$PATH" +# pg_ctl -D /opt/pgsql/data -l logfile stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ +# /opt/pgsql/data/postgresql.conf +# pg_ctl -D /opt/pgsql/data -l logfile start +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor/ +# - name: Start pg_stat_monitor_tests +# run: | +# make installcheck +# working-directory: src/pg_stat_monitor/ - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 - - name: Start Server installcheck-world tests - run: | - export PATH="/usr/lib/postgresql/14/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "compute_query_id = off" >> /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - make installcheck-world +# - name: Start Server installcheck-world tests +# run: | +# export PATH="/usr/lib/postgresql/14/bin:$PATH" +# pg_ctl -D /opt/pgsql/data -l logfile stop +# echo "compute_query_id = off" >> /opt/pgsql/data/postgresql.conf +# pg_ctl -D /opt/pgsql/data -l logfile start +# make installcheck-world - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 +# - name: Report on installcheck-world test suites fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions output files of failed testsuite, and pg log +# path: | +# **/regression.diffs +# **/regression.out +# src/pg_stat_monitor/logfile +# retention-days: 3 diff --git a/.github/workflows/postgresql-14-pgdg-package.yml b/.github/workflows/postgresql-14-pgdg-package.yml index a33eb80e..965ef645 100644 --- a/.github/workflows/postgresql-14-pgdg-package.yml +++ b/.github/workflows/postgresql-14-pgdg-package.yml @@ -1,86 +1,86 @@ -name: postgresql-14-pgdg-package -on: [pull_request] +# name: postgresql-14-pgdg-package +# on: [pull_request] -jobs: - build: - name: pg-14-pgdg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-14-pgdg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ - zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install PG Distribution Postgresql 14 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo wget --quiet -O - \ - https://www.postgresql.org/media/keys/ACCC4CF8.asc | - sudo apt-key add - - sudo apt update - sudo apt -y install postgresql-14 postgresql-server-dev-14 +# - name: Install PG Distribution Postgresql 14 +# run: | +# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ +# $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +# sudo wget --quiet -O - \ +# https://www.postgresql.org/media/keys/ACCC4CF8.asc | +# sudo apt-key add - +# sudo apt update +# sudo apt -y install postgresql-14 postgresql-server-dev-14 - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/14/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/14/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-14-pmm.yaml b/.github/workflows/postgresql-14-pmm.yaml index 3c34e63c..ee5ec8a7 100644 --- a/.github/workflows/postgresql-14-pmm.yaml +++ b/.github/workflows/postgresql-14-pmm.yaml @@ -1,41 +1,41 @@ -name: postgresql-14-pmm-integration -on: [push] +# name: postgresql-14-pmm-integration +# on: [push] -jobs: - build: - name: pg-14-pgsm-pmm-integration-test - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Clone QA Integration repository - uses: actions/checkout@v3 - with: - repository: 'Percona-Lab/qa-integration' - ref: 'main' +# jobs: +# build: +# name: pg-14-pgsm-pmm-integration-test +# runs-on: ubuntu-latest +# timeout-minutes: 30 +# steps: +# - name: Clone QA Integration repository +# uses: actions/checkout@v3 +# with: +# repository: 'Percona-Lab/qa-integration' +# ref: 'main' - # print branch and Repo name - - name: Get branch and Repo Name - run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor +# # print branch and Repo name +# - name: Get branch and Repo Name +# run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor - - name: "Set TARGET_BRANCH variable for a PR run" - if: github.event_name == 'pull_request' - run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PR run" +# if: github.event_name == 'pull_request' +# run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - - name: "Set TARGET_BRANCH variable for a PUSH run" - if: github.event_name == 'push' - run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PUSH run" +# if: github.event_name == 'push' +# run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Run PMM & PGSM Setup, E2E Tests - run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=14 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} +# - name: Run PMM & PGSM Setup, E2E Tests +# run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=14 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} - - name: Get PMM-Agent Logs from the Container - if: success() || failure() # run this step even if previous step failed - run: docker exec pgsql_pgsm_14 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log +# - name: Get PMM-Agent Logs from the Container +# if: success() || failure() # run this step even if previous step failed +# run: docker exec pgsql_pgsm_14 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log - - name: Upload Tests Artifacts - uses: actions/upload-artifact@v3 - if: success() || failure() # run this step even if previous step failed - with: - name: tests-artifact - path: ./pmm-ui-tests/tests/output/ - if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` +# - name: Upload Tests Artifacts +# uses: actions/upload-artifact@v3 +# if: success() || failure() # run this step even if previous step failed +# with: +# name: tests-artifact +# path: ./pmm-ui-tests/tests/output/ +# if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/postgresql-14-ppg-package.yml b/.github/workflows/postgresql-14-ppg-package.yml index ec0a7e4c..02a1180e 100644 --- a/.github/workflows/postgresql-14-ppg-package.yml +++ b/.github/workflows/postgresql-14-ppg-package.yml @@ -1,93 +1,93 @@ -name: postgresql-14-ppg-package -on: [push] +# name: postgresql-14-ppg-package +# on: [push] -jobs: - build: - name: pg-14-ppg-package-test - runs-on: ubuntu-20.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-14-ppg-package-test +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb +# - name: Install percona-release script +# run: | +# sudo apt-get -y update +# sudo apt-get -y upgrade +# sudo apt-get install -y wget gnupg2 curl lsb-release +# sudo wget \ +# https://repo.percona.com/apt/percona-release_latest.generic_all.deb +# sudo dpkg -i percona-release_latest.generic_all.deb - - name: Install Percona Distribution Postgresql 14 - run: | - sudo percona-release setup ppg-14 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-14 \ - percona-postgresql-contrib percona-postgresql-server-dev-all +# - name: Install Percona Distribution Postgresql 14 +# run: | +# sudo percona-release setup ppg-14 +# sudo apt-get update -y +# sudo apt-get install -y percona-postgresql-14 \ +# percona-postgresql-contrib percona-postgresql-server-dev-all - - name: Change src owner to postgres - run: | - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/14/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/14/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-15-build.yml b/.github/workflows/postgresql-15-build.yml index cf357041..cdeacc6c 100644 --- a/.github/workflows/postgresql-15-build.yml +++ b/.github/workflows/postgresql-15-build.yml @@ -1,145 +1,145 @@ -name: postgresql-15-build -on: [push] +# name: postgresql-15-build +# on: [push] -jobs: - build: - name: pg-15-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v2 - with: - repository: 'postgres/postgres' - ref: 'REL_15_STABLE' +# jobs: +# build: +# name: pg-15-build-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone postgres repository +# uses: actions/checkout@v2 +# with: +# repository: 'postgres/postgres' +# ref: 'REL_15_STABLE' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev \ - uuid-dev liblz4-dev - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex \ +# libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ +# libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ +# libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ +# llvm-11 llvm-11-dev libselinux1-dev python3-dev \ +# uuid-dev liblz4-dev +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Create pgsql dir - run: mkdir -p /opt/pgsql +# - name: Create pgsql dir +# run: mkdir -p /opt/pgsql - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ - '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ - '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ - '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ - '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/15/man' \ - '--docdir=/usr/share/doc/postgresql-doc-15' '--with-pgport=5432' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/15' '--with-uuid=e2fs' \ - '--bindir=/usr/lib/postgresql/15/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ - '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ - '--includedir=/usr/include/postgresql' '--enable-dtrace' \ - '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world +# - name: Build postgres +# run: | +# export PATH="/opt/pgsql/bin:$PATH" +# ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ +# '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ +# '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ +# '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ +# '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ +# '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ +# '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ +# 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/15/man' \ +# '--docdir=/usr/share/doc/postgresql-doc-15' '--with-pgport=5432' \ +# '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ +# '--datadir=/usr/share/postgresql/15' '--with-uuid=e2fs' \ +# '--bindir=/usr/lib/postgresql/15/bin' '--enable-tap-tests' \ +# '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ +# '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ +# '--includedir=/usr/include/postgresql' '--enable-dtrace' \ +# '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ +# '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ +# 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ +# '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ +# 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ +# 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ +# 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ +# 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ +# 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ +# 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' +# make world +# sudo make install-world - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/15/bin:$PATH" - sudo cp /usr/lib/postgresql/15/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start +# - name: Start postgresql cluster +# run: | +# export PATH="/usr/lib/postgresql/15/bin:$PATH" +# sudo cp /usr/lib/postgresql/15/bin/pg_config /usr/bin +# initdb -D /opt/pgsql/data +# pg_ctl -D /opt/pgsql/data -l logfile start - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# make USE_PGXS=1 +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/15/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor +# - name: Load pg_stat_monitor library and Restart Server +# run: | +# export PATH="/usr/lib/postgresql/15/bin:$PATH" +# pg_ctl -D /opt/pgsql/data -l logfile stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ +# /opt/pgsql/data/postgresql.conf +# pg_ctl -D /opt/pgsql/data -l logfile start +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor/ +# - name: Start pg_stat_monitor_tests +# run: | +# make installcheck +# working-directory: src/pg_stat_monitor/ - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 - - name: Start Server installcheck-world tests - run: | - export PATH="/usr/lib/postgresql/15/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "compute_query_id = off" >> /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - make installcheck-world +# - name: Start Server installcheck-world tests +# run: | +# export PATH="/usr/lib/postgresql/15/bin:$PATH" +# pg_ctl -D /opt/pgsql/data -l logfile stop +# echo "compute_query_id = off" >> /opt/pgsql/data/postgresql.conf +# pg_ctl -D /opt/pgsql/data -l logfile start +# make installcheck-world - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 +# - name: Report on installcheck-world test suites fail +# uses: actions/upload-artifact@v2 +# if: ${{ failure() }} +# with: +# name: Regressions output files of failed testsuite, and pg log +# path: | +# **/regression.diffs +# **/regression.out +# src/pg_stat_monitor/logfile +# retention-days: 3 diff --git a/.github/workflows/postgresql-15-pgdg-package.yml b/.github/workflows/postgresql-15-pgdg-package.yml index 0ba508f4..3fe7841d 100644 --- a/.github/workflows/postgresql-15-pgdg-package.yml +++ b/.github/workflows/postgresql-15-pgdg-package.yml @@ -1,87 +1,87 @@ -name: postgresql-15-pgdg-package -on: [pull_request] +# name: postgresql-15-pgdg-package +# on: [pull_request] -jobs: - build: - name: pg-15-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-15-pgdg-package-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ - zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install PG Distribution Postgresql 15 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo wget --quiet -O - \ - https://www.postgresql.org/media/keys/ACCC4CF8.asc | - sudo apt-key add - - sudo apt update - sudo apt -y install postgresql-15 postgresql-server-dev-15 +# - name: Install PG Distribution Postgresql 15 +# run: | +# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ +# $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +# sudo wget --quiet -O - \ +# https://www.postgresql.org/media/keys/ACCC4CF8.asc | +# sudo apt-key add - +# sudo apt update +# sudo apt -y install postgresql-15 postgresql-server-dev-15 - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chmod o+rx ~ +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/15/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/15/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-15-pmm.yaml b/.github/workflows/postgresql-15-pmm.yaml index c621aaa7..1127178f 100644 --- a/.github/workflows/postgresql-15-pmm.yaml +++ b/.github/workflows/postgresql-15-pmm.yaml @@ -1,41 +1,41 @@ -name: postgresql-15-pmm-integration -on: [push] +# name: postgresql-15-pmm-integration +# on: [push] -jobs: - build: - name: pg-15-pgsm-pmm-integration-test - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Clone QA Integration repository - uses: actions/checkout@v3 - with: - repository: 'Percona-Lab/qa-integration' - ref: 'main' +# jobs: +# build: +# name: pg-15-pgsm-pmm-integration-test +# runs-on: ubuntu-latest +# timeout-minutes: 30 +# steps: +# - name: Clone QA Integration repository +# uses: actions/checkout@v3 +# with: +# repository: 'Percona-Lab/qa-integration' +# ref: 'main' - # print branch and Repo name - - name: Get branch and Repo Name - run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor +# # print branch and Repo name +# - name: Get branch and Repo Name +# run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor - - name: "Set TARGET_BRANCH variable for a PR run" - if: github.event_name == 'pull_request' - run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PR run" +# if: github.event_name == 'pull_request' +# run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - - name: "Set TARGET_BRANCH variable for a PUSH run" - if: github.event_name == 'push' - run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV +# - name: "Set TARGET_BRANCH variable for a PUSH run" +# if: github.event_name == 'push' +# run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Run PMM & PGSM Setup, E2E Tests - run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=15 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} +# - name: Run PMM & PGSM Setup, E2E Tests +# run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=15 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }} - - name: Get PMM-Agent Logs from the Container - if: success() || failure() # run this step even if previous step failed - run: docker exec pgsql_pgsm_15 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log +# - name: Get PMM-Agent Logs from the Container +# if: success() || failure() # run this step even if previous step failed +# run: docker exec pgsql_pgsm_15 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log - - name: Upload Tests Artifacts - uses: actions/upload-artifact@v3 - if: success() || failure() # run this step even if previous step failed - with: - name: tests-artifact - path: ./pmm-ui-tests/tests/output/ - if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` +# - name: Upload Tests Artifacts +# uses: actions/upload-artifact@v3 +# if: success() || failure() # run this step even if previous step failed +# with: +# name: tests-artifact +# path: ./pmm-ui-tests/tests/output/ +# if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/postgresql-15-ppg-package.yml b/.github/workflows/postgresql-15-ppg-package.yml index f105dbc9..57679b89 100644 --- a/.github/workflows/postgresql-15-ppg-package.yml +++ b/.github/workflows/postgresql-15-ppg-package.yml @@ -1,94 +1,94 @@ -name: postgresql-15-ppg-package -on: [push] +# name: postgresql-15-ppg-package +# on: [push] -jobs: - build: - name: pg-15-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-15-ppg-package-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb +# - name: Install percona-release script +# run: | +# sudo apt-get -y update +# sudo apt-get -y upgrade +# sudo apt-get install -y wget gnupg2 curl lsb-release +# sudo wget \ +# https://repo.percona.com/apt/percona-release_latest.generic_all.deb +# sudo dpkg -i percona-release_latest.generic_all.deb - - name: Install Percona Distribution Postgresql 15 - run: | - sudo percona-release setup ppg-15 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-15 \ - percona-postgresql-contrib percona-postgresql-server-dev-all +# - name: Install Percona Distribution Postgresql 15 +# run: | +# sudo percona-release setup ppg-15 +# sudo apt-get update -y +# sudo apt-get install -y percona-postgresql-15 \ +# percona-postgresql-contrib percona-postgresql-server-dev-all - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chmod o+rx ~ +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/15/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/15/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-16-build.yml b/.github/workflows/postgresql-16-build.yml index b92ae135..78af96f0 100644 --- a/.github/workflows/postgresql-16-build.yml +++ b/.github/workflows/postgresql-16-build.yml @@ -6,6 +6,11 @@ jobs: name: pg-16-build-test runs-on: ubuntu-22.04 steps: + + + - name: DEBUG + run: locale + - name: Clone postgres repository uses: actions/checkout@v2 with: diff --git a/.github/workflows/postgresql-16-pgdg-package.yml b/.github/workflows/postgresql-16-pgdg-package.yml index 85a82c9f..0e15f33a 100644 --- a/.github/workflows/postgresql-16-pgdg-package.yml +++ b/.github/workflows/postgresql-16-pgdg-package.yml @@ -1,87 +1,87 @@ -name: postgresql-16-pgdg-package -on: [pull_request] +# name: postgresql-16-pgdg-package +# on: [pull_request] -jobs: - build: - name: pg-16-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-16-pgdg-package-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ - zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ +# zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install PG Distribution Postgresql 16 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo wget --quiet -O - \ - https://www.postgresql.org/media/keys/ACCC4CF8.asc | - sudo apt-key add - - sudo apt update - sudo apt -y install postgresql-16 postgresql-server-dev-16 +# - name: Install PG Distribution Postgresql 16 +# run: | +# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ +# $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +# sudo wget --quiet -O - \ +# https://www.postgresql.org/media/keys/ACCC4CF8.asc | +# sudo apt-key add - +# sudo apt update +# sudo apt -y install postgresql-16 postgresql-server-dev-16 - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chmod o+rx ~ +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/16/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/16/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3 diff --git a/.github/workflows/postgresql-16-ppg-package.yml b/.github/workflows/postgresql-16-ppg-package.yml index eb4807eb..3e6d079f 100644 --- a/.github/workflows/postgresql-16-ppg-package.yml +++ b/.github/workflows/postgresql-16-ppg-package.yml @@ -1,94 +1,94 @@ -name: postgresql-16-ppg-package -on: [push] +# name: postgresql-16-ppg-package +# on: [push] -jobs: - build: - name: pg-16-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v2 - with: - path: 'src/pg_stat_monitor' +# jobs: +# build: +# name: pg-16-ppg-package-test +# runs-on: ubuntu-22.04 +# steps: +# - name: Clone pg_stat_monitor repository +# uses: actions/checkout@v2 +# with: +# path: 'src/pg_stat_monitor' - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ - /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ - /etc/postgresql - sudo rm -f /usr/bin/pg_config - sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' +# - name: Delete old postgresql files +# run: | +# sudo apt-get update +# sudo apt purge postgresql-client-common postgresql-common \ +# postgresql postgresql* +# sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ +# zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ +# libipc-run-perl wget +# sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ +# /usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ +# /etc/postgresql +# sudo rm -f /usr/bin/pg_config +# sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' +# sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb +# - name: Install percona-release script +# run: | +# sudo apt-get -y update +# sudo apt-get -y upgrade +# sudo apt-get install -y wget gnupg2 curl lsb-release +# sudo wget \ +# https://repo.percona.com/apt/percona-release_latest.generic_all.deb +# sudo dpkg -i percona-release_latest.generic_all.deb - - name: Install Percona Distribution Postgresql 16 - run: | - sudo percona-release setup ppg-16 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-16 \ - percona-postgresql-contrib percona-postgresql-server-dev-all +# - name: Install Percona Distribution Postgresql 16 +# run: | +# sudo percona-release setup ppg-16 +# sudo apt-get update -y +# sudo apt-get install -y percona-postgresql-16 \ +# percona-postgresql-contrib percona-postgresql-server-dev-all - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src +# - name: Change src owner to postgres +# run: | +# sudo chmod o+rx ~ +# sudo chown -R postgres:postgres src - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor +# - name: Build pg_stat_monitor +# run: | +# sudo -u postgres bash -c 'make USE_PGXS=1' +# sudo make USE_PGXS=1 install +# working-directory: src/pg_stat_monitor - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/16/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor +# - name: Start pg_stat_monitor_tests +# run: | +# sudo service postgresql stop +# echo "shared_preload_libraries = 'pg_stat_monitor'" | +# sudo tee -a /etc/postgresql/16/main/postgresql.conf +# sudo service postgresql start +# sudo psql -V +# export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor +# echo $PG_TEST_PORT_DIR +# sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' +# working-directory: src/pg_stat_monitor - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor +# - name: Change dir permissions on fail +# if: ${{ failure() }} +# run: | +# sudo chmod -R ugo+rwx t +# sudo chmod -R ugo+rwx tmp_check +# exit 2 # regenerate error so that we can upload files in next step +# working-directory: src/pg_stat_monitor - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v2 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 +# - name: Upload logs on fail +# if: ${{ failure() }} +# uses: actions/upload-artifact@v2 +# with: +# name: Regressions diff and postgresql log +# path: | +# src/pg_stat_monitor/regression.diffs +# src/pg_stat_monitor/regression.out +# src/pg_stat_monitor/logfile +# src/pg_stat_monitor/t/results/ +# src/pg_stat_monitor/tmp_check/log/ +# !src/pg_stat_monitor/tmp_check/**/archives/* +# !src/pg_stat_monitor/tmp_check/**/backup/* +# !src/pg_stat_monitor/tmp_check/**/pgdata/* +# !src/pg_stat_monitor/tmp_check/**/archives/ +# !src/pg_stat_monitor/tmp_check/**/backup/ +# !src/pg_stat_monitor/tmp_check/**/pgdata/ +# if-no-files-found: warn +# retention-days: 3