Skip to content

Commit 3e26d8f

Browse files
committed
CI: Add PG version comparison to binary swap check
The binary swap workflow previously only reported catalog version information when comparing baseline and current builds. This made it difficult to see at a glance which PostgreSQL kernel minor version each build was based on. Extract the underlying PostgreSQL kernel version from both baseline and current installs via `pg_config --version`. Display the comparison in the terminal log alongside the existing catalog version check, and include it in the GitHub Step Summary report for better visibility during PG minor version upgrades (e.g. 14.4 to 14.5).
1 parent c1014a3 commit 3e26d8f

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/binary-swap-check.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,11 @@ jobs:
565565
echo "$CATALOG_VERSION"
566566
echo "BASELINE_CATALOG_VERSION=$CATALOG_VERSION" >> "$GITHUB_ENV"
567567
568+
echo "Baseline PostgreSQL Kernel Version:"
569+
PG_VERSION=$("${BASELINE_INSTALL_DIR}/bin/pg_config" --version 2>/dev/null || echo "N/A")
570+
echo "$PG_VERSION"
571+
echo "BASELINE_PG_VERSION=$PG_VERSION" >> "$GITHUB_ENV"
572+
568573
ls -la "${BASELINE_INSTALL_DIR}"
569574
570575
- name: Install Current RPM
@@ -611,6 +616,11 @@ jobs:
611616
echo "$CATALOG_VERSION"
612617
echo "CURRENT_CATALOG_VERSION=$CATALOG_VERSION" >> "$GITHUB_ENV"
613618
619+
echo "Current PostgreSQL Kernel Version:"
620+
PG_VERSION=$("${CURRENT_INSTALL_DIR}/bin/pg_config" --version 2>/dev/null || echo "N/A")
621+
echo "$PG_VERSION"
622+
echo "CURRENT_PG_VERSION=$PG_VERSION" >> "$GITHUB_ENV"
623+
614624
ls -la "${CURRENT_INSTALL_DIR}"
615625
616626
- name: Setup pg_regress
@@ -712,15 +722,18 @@ jobs:
712722
echo "No regression diffs found - test passed"
713723
fi
714724
715-
- name: Final Catalog Version Summary
725+
- name: Final Version Summary
716726
if: always()
717727
run: |
718728
echo "=== Catalog Version Comparison ==="
719729
echo "Baseline Catalog Version: ${BASELINE_CATALOG_VERSION:-N/A}"
720730
echo "Current Catalog Version: ${CURRENT_CATALOG_VERSION:-N/A}"
721-
echo ""
722731
echo "Catalog Status: $([[ "$BASELINE_CATALOG_VERSION" == "$CURRENT_CATALOG_VERSION" ]] && echo "✅ IDENTICAL" || echo "🔍 DIFFERENT")"
723-
echo "=== Comparison completed ==="
732+
echo ""
733+
echo "=== PostgreSQL Kernel Version Comparison ==="
734+
echo "Baseline PG Version: ${BASELINE_PG_VERSION:-N/A}"
735+
echo "Current PG Version: ${CURRENT_PG_VERSION:-N/A}"
736+
echo "PG Kernel Status: $([[ "$BASELINE_PG_VERSION" == "$CURRENT_PG_VERSION" ]] && echo "✅ IDENTICAL" || echo "🔍 DIFFERENT")"
724737
725738
- name: Generate Report
726739
if: always()
@@ -749,6 +762,10 @@ jobs:
749762
**Baseline Catalog Version**: ${BASELINE_CATALOG_VERSION}
750763
**Current Catalog Version**: ${CURRENT_CATALOG_VERSION}
751764
765+
## PostgreSQL Kernel Version
766+
**Baseline PG Version**: ${BASELINE_PG_VERSION}
767+
**Current PG Version**: ${CURRENT_PG_VERSION}
768+
752769
${MESSAGE}
753770
754771
EOF

0 commit comments

Comments
 (0)