From 01a2dfb1da7ac912f6e69f24ea6879a7d387a96c Mon Sep 17 00:00:00 2001 From: Cedric Date: Wed, 18 Oct 2023 13:06:25 +0100 Subject: [PATCH] Lock log waits in postgres and dump logs (#10992) --- .github/actions/setup-postgres/.env | 2 +- .github/workflows/ci-core.yml | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-postgres/.env b/.github/actions/setup-postgres/.env index 8954e9d2f3b..47ed8d9bcd5 100644 --- a/.github/actions/setup-postgres/.env +++ b/.github/actions/setup-postgres/.env @@ -1,5 +1,5 @@ POSTGRES_USER=postgres -POSTGRES_OPTIONS="-c max_connections=1000 -c shared_buffers=2GB" +POSTGRES_OPTIONS="-c max_connections=1000 -c shared_buffers=2GB -c log_lock_waits=true" POSTGRES_PASSWORD=postgres POSTGRES_DB=chainlink_test POSTGRES_HOST_AUTH_METHOD=trust diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 9c1322d2e8b..5e19721b82d 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -83,6 +83,10 @@ jobs: - name: Print Races if: ${{ failure() && matrix.cmd == 'go_core_race_tests' }} run: find race.* | xargs cat + - name: Print postgres logs + if: always() + run: docker compose logs postgres | tee ../../../postgres_logs.txt + working-directory: ./.github/actions/setup-postgres - name: Store logs artifacts if: always() uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 @@ -93,10 +97,7 @@ jobs: ./output-short.txt ./race.* ./coverage.txt - - name: Print postgres logs - if: always() - run: docker compose logs postgres - working-directory: ./.github/actions/setup-postgres + ./postgres_logs.txt - name: Notify Slack if: ${{ failure() && matrix.cmd == 'go_core_race_tests' && github.event.schedule != '' }} uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0