Skip to content

Add BRATS matrix tests for postgres-release versions 15/16/17/18#2779

Draft
ZPascal wants to merge 2 commits into
cloudfoundry:mainfrom
ZPascal:brats-postgres-release-tests
Draft

Add BRATS matrix tests for postgres-release versions 15/16/17/18#2779
ZPascal wants to merge 2 commits into
cloudfoundry:mainfrom
ZPascal:brats-postgres-release-tests

Conversation

@ZPascal

@ZPascal ZPascal commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Wires up CI to test the bosh director against `cloudfoundry/postgres-release` versions 15, 16, 17, and 18.

  • Added `src/brats/acceptance/postgres_release_test.go` — `DescribeTable` matrix covering fresh deploy and version upgrade (N-1 → N) for each PG version
  • Added `src/brats/assets/postgres-release-manifest.yml` — parameterized BRATS manifest using `((pg-version))`
  • Updated `src/brats/assets/postgres-manifest.yml` and `postgres-13-manifest.yml` — use `databases.*` property namespace
  • Updated `src/spec/integration_support/postgres_version_helper.rb` — reads `PG_VERSION` from env instead of parsing bosh job spec
  • Updated `ci/pipeline.yml`:
    • Replace `unit-director-postgres-13` with `unit-director-postgres-17`; add `PG_VERSION` param to both postgres unit jobs
    • Add `brats-postgres-{15,16,17,18}` Concourse jobs
    • Replace `build-main-postgres-13` with `build-main-postgres-17`
    • Replace `integration-postgres-13-image` resource with `integration-postgres-17-image`
    • Propagate `PARALLEL_TEST_MULTIPLY_PROCESSES: "0.6"` to hotswap and mysql integration jobs
  • Updated `ci/dockerfiles/main-postgres/Dockerfile` — adds `postgresql-${DB_VERSION}` server package

Related PRs

This is one of three independent PRs split from the original postgres-release migration:

Test plan

  • CI passes: `unit-director-postgres-15`, `unit-director-postgres-17`, `integration-postgres`, `integration-postgres-hotswap`
  • BRATS acceptance jobs pass: `brats-postgres-15`, `brats-postgres-16`, `brats-postgres-17`, `brats-postgres-18`

- Add brats-postgres-{15,16,17,18} Concourse jobs
- Replace unit-director-postgres-13 with unit-director-postgres-17
- Replace build-main-postgres-13 with build-main-postgres-17
- Add integration-postgres-17-image resource
- Expose PG_VERSION env var to unit/integration tasks
- Add postgres_release_test.go matrix BRATS test file
- Add postgres-release-manifest.yml BRATS asset
- Update BRATS manifests to use databases.* properties
- Read PG_VERSION from env in postgres_version_helper.rb
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 49a6e861-304f-473d-b635-1c7b368470ef

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Updates PostgreSQL deployment manifests and adds a parameterized release manifest with BRATS coverage for deployment and upgrades across versions 15–18. PostgreSQL version validation now uses PG_VERSION. CI switches unit and image jobs from PostgreSQL 13 to 17, adds explicit version parameters and BRATS jobs, centralizes test parallelism, and wires the PostgreSQL 17 image resource. The Docker build command now tolerates missing PostgreSQL configuration targets.

Suggested reviewers: alphasite, aramprice, ragaskar

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main change: adding BRATS matrix tests for postgres-release versions 15 through 18.
Description check ✅ Passed The description covers the summary, related context, and test plan, but it omits release notes, breaking-change, tagging, and AI review feedback sections.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@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: 5

🤖 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 `@ci/dockerfiles/main-postgres/Dockerfile`:
- Line 21: Update the PostgreSQL configuration edit in the Dockerfile to first
verify that the versioned postgresql.conf file exists, while allowing the build
to skip the edit when it is absent. Remove the unconditional “|| true” so sed
failures such as permission or filesystem errors terminate the image build.

In `@ci/pipeline.yml`:
- Line 212: Update the affected flow-sequence values in the pipeline
configuration, including serial_groups entries, to remove spaces immediately
inside the brackets; preserve the existing sequence contents and formatting
elsewhere.
- Around line 28-31: Update the delivery job’s bosh input passed list to include
brats-postgres-15, brats-postgres-16, brats-postgres-17, and brats-postgres-18
alongside brats-acceptance, ensuring delivery waits for all PostgreSQL matrix
jobs to pass.

In `@src/brats/acceptance/postgres_release_test.go`:
- Around line 24-63: Update the PostgreSQL acceptance test’s DescribeTable
entries in src/brats/acceptance/postgres_release_test.go (lines 24-63) so
PG_VERSION selects only its corresponding version, or make each entry
independently focusable. Align the four CI jobs in ci/pipeline.yml (lines
685-816) with that selection so each job runs its intended PostgreSQL version;
otherwise consolidate them into one job that runs the complete table.

In `@src/spec/integration_support/postgres_version_helper.rb`:
- Around line 26-29: Update configured_version in
src/spec/integration_support/postgres_version_helper.rb to preserve a reliable
fallback or otherwise ensure callers provide PG_VERSION; add PG_VERSION: "15" to
the integration-postgres environment in ci/pipeline.yml at line 321 and to
integration-postgres-hotswap at line 351.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: f1ffedd3-5c89-4c1c-aae9-e9f1e11241c4

📥 Commits

Reviewing files that changed from the base of the PR and between c7e7e2b and 91c0b2c.

📒 Files selected for processing (7)
  • ci/dockerfiles/main-postgres/Dockerfile
  • ci/pipeline.yml
  • src/brats/acceptance/postgres_release_test.go
  • src/brats/assets/postgres-13-manifest.yml
  • src/brats/assets/postgres-manifest.yml
  • src/brats/assets/postgres-release-manifest.yml
  • src/spec/integration_support/postgres_version_helper.rb

Comment thread ci/dockerfiles/main-postgres/Dockerfile Outdated
Comment thread ci/pipeline.yml
Comment thread ci/pipeline.yml
Comment thread src/brats/acceptance/postgres_release_test.go
Comment thread src/spec/integration_support/postgres_version_helper.rb
- Dockerfile: replace '|| true' with explicit file-existence check
- pipeline.yml: add brats-postgres-{15,16,17,18} to delivery job passed list
- pipeline.yml: add PG_VERSION to integration-postgres and integration-postgres-hotswap
- postgres_release_test.go: filter DescribeTable entries by PG_VERSION env var

Skipped: YAML bracket spacing — existing codebase uses '[ name ]' style
throughout; changing only new entries would be inconsistent.
@github-project-automation github-project-automation Bot moved this from Waiting for Changes | Open for Contribution to Pending Merge | Prioritized in Foundational Infrastructure Working Group Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Merge | Prioritized

Development

Successfully merging this pull request may close these issues.

1 participant