Skip to content

Add CI workflow for tip-of-stable PostgreSQL testing - #456

Merged
mason-sharp merged 1 commit into
mainfrom
spoc-535
May 6, 2026
Merged

mason-sharp merged 1 commit into
mainfrom
spoc-535

Conversation

@danolivo

@danolivo danolivo commented May 6, 2026

Copy link
Copy Markdown
Contributor

Existing CI (spockbench.yml, installcheck.yml, etc.) builds PostgreSQL from the latest released tag of each major version. That misses regressions that have already landed on the REL_*_STABLE branches but are not yet in a public minor release -- typically a 1-3 month window during which a real upgrade-to-stable user could hit a problem the spock test matrix never exercised.

@danolivo
danolivo requested a review from mason-sharp May 6, 2026 08:57
@danolivo danolivo self-assigned this May 6, 2026
@danolivo danolivo added the enhancement New feature or request label May 6, 2026
@coderabbitai

coderabbitai Bot commented May 6, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow that builds PostgreSQL from stable-branch tips (15–18), applies Spock patches if present, builds PostgreSQL with TAP enabled, builds/installs Spock, runs regression and TAP suites, and uploads failure artifacts.

Changes

PostgreSQL Regression & TAP Test Automation

Layer / File(s) Summary
Workflow Metadata & Triggers
.github/workflows/pg-stable-test.yml (lines 1–19)
Introduces workflow name/run-name, descriptive header, workflow_dispatch trigger, read permission for contents, and concurrency configuration.
Job Configuration
.github/workflows/pg-stable-test.yml (lines 20–33)
Adds build-and-test job with matrix.pgver [15,16,17,18], ubuntu-latest runner, 60-minute job timeout, and env vars PG_PREFIX and PG_SRCDIR.
Environment Setup
.github/workflows/pg-stable-test.yml (lines 34–54)
Checks out spock to path spock, installs build dependencies via apt, and clones REL_${{ matrix.pgver }}_STABLE of PostgreSQL into PG_SRCDIR.
Build Phase
.github/workflows/pg-stable-test.yml (lines 55–91)
Conditionally applies patches from spock/patches/${{ matrix.pgver }} if present; configures PostgreSQL with --enable-tap-tests, runs make/make install; builds and installs Spock with updated PATH.
Testing & Artifacts
.github/workflows/pg-stable-test.yml (lines 92–126)
Runs regression suite and TAP suite; on failure uploads regression/TAP artifacts and logs with retention, and handles missing files gracefully.

Poem

🐰 I hopped through branches, stable and wide,
Patched a patch, then built Postgre's pride.
I ran regressions, TAPs in a roam,
Collected the logs to carry them home.
A tiny rabbit CI dance—tests all in stride.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately and concisely describes the main change: adding a CI workflow for testing PostgreSQL tip-of-stable versions.
Description check ✅ Passed The pull request description is directly related to the changeset, explaining the rationale for adding the tip-of-stable testing workflow and addressing the gap in the existing CI approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch spoc-535

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codacy-production

codacy-production Bot commented May 6, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/pg-stable-test.yml (1)

9-10: ⚡ Quick win

Add a schedule trigger to fulfill the workflow's stated purpose.

The workflow's rationale is catching regressions that land on stable branches between public releases (~1–3 month window). With only workflow_dispatch, it must be manually triggered each time, requiring operational discipline rather than automation. A weekly schedule would close that gap automatically.

⚙️ Suggested addition
 on:
   workflow_dispatch:
+  schedule:
+    - cron: '0 3 * * 1'   # Every Monday at 03:00 UTC
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pg-stable-test.yml around lines 9 - 10, The workflow
currently only uses the workflow_dispatch trigger so it must be manually
started; add a schedule trigger alongside workflow_dispatch to run automatically
(e.g., a weekly cron) so the intended periodic regression checks occur; update
the triggers block to include both workflow_dispatch and a schedule entry (using
the schedule key and a cron string) so the workflow runs on the desired cadence.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pg-stable-test.yml:
- Around line 57-68: The patch loop currently iterates all entries in PATCH_DIR
using for p in "$PATCH_DIR"/* which can pass non-patch files to patch -p1;
change the loop to only iterate files matching the patch extension (e.g.,
*.patch) and skip non-regular files, so in the block that references PATCH_DIR
and the for p ...; do loop and the patch -p1 invocation you should update the
glob to restrict to "$PATCH_DIR"/*.patch and ensure you test that the matched
file is a regular file before calling patch -p1.
- Around line 107-112: The "Run TAP suite" step currently runs only on success
and is skipped if prior regression fails; update the step named "Run TAP suite"
to include an explicit if: always() condition so it executes regardless of
previous step outcomes, ensuring the TAP suite runs independently and the
subsequent "Upload TAP artifacts on failure" step can collect artifacts
reliably.

---

Nitpick comments:
In @.github/workflows/pg-stable-test.yml:
- Around line 9-10: The workflow currently only uses the workflow_dispatch
trigger so it must be manually started; add a schedule trigger alongside
workflow_dispatch to run automatically (e.g., a weekly cron) so the intended
periodic regression checks occur; update the triggers block to include both
workflow_dispatch and a schedule entry (using the schedule key and a cron
string) so the workflow runs on the desired cadence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d9e7d104-89a0-4817-abc5-dbaed6453c60

📥 Commits

Reviewing files that changed from the base of the PR and between b7fc702 and 4a8d8ff.

📒 Files selected for processing (1)
  • .github/workflows/pg-stable-test.yml

Comment thread .github/workflows/pg-stable-test.yml
Existing CI (spockbench.yml, installcheck.yml, etc.) builds PostgreSQL
from the latest released tag of each major version.  That misses
regressions that have already landed on the REL_*_STABLE branches but
are not yet in a public minor release -- typically a 1-3 month window
during which a real upgrade-to-stable user could hit a problem the
spock test matrix never exercised.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pg-stable-test.yml:
- Line 115: Change the workflow step that currently runs "./run_tests.sh" to
invoke the script with the shell explicitly (e.g., "bash run_tests.sh") so it
will run even if the executable bit is not set; update the command in the job
that references "./run_tests.sh" to call "bash run_tests.sh" (or "sh
run_tests.sh") instead.
- Around line 9-10: Replace the current sole manual trigger under on (which only
contains workflow_dispatch) with a combined trigger that retains
workflow_dispatch and adds a schedule entry so the job runs automatically (e.g.,
a monthly or weekly cron). Update the workflow's top-level on to include both
workflow_dispatch and a schedule: - cron: "..." entry so the stable-branch tests
run on a periodic cadence in addition to manual dispatch; keep the existing
workflow_dispatch to preserve manual runs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d4d82df5-4398-498c-abef-88b06bbe4899

📥 Commits

Reviewing files that changed from the base of the PR and between 4a8d8ff and 583432b.

📒 Files selected for processing (1)
  • .github/workflows/pg-stable-test.yml

Comment thread .github/workflows/pg-stable-test.yml
Comment thread .github/workflows/pg-stable-test.yml
@mason-sharp
mason-sharp merged commit f294f83 into main May 6, 2026
6 checks passed
@mason-sharp
mason-sharp deleted the spoc-535 branch May 6, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants