Skip to content

Deprecate postgres-13 job: removal scheduled for next release#2778

Open
ZPascal wants to merge 2 commits into
cloudfoundry:mainfrom
ZPascal:deprecate-postgres-13-job
Open

Deprecate postgres-13 job: removal scheduled for next release#2778
ZPascal wants to merge 2 commits into
cloudfoundry:mainfrom
ZPascal:deprecate-postgres-13-job

Conversation

@ZPascal

@ZPascal ZPascal commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Marks the `postgres-13` job as deprecated ahead of its removal in the next bosh release.

  • `jobs/postgres-13/spec` — adds deprecation notice to the job description
  • `jobs/postgres-13/templates/pre-start.erb` — emits a `WARNING` log line during `bosh deploy` so operators see it
  • `docs/postgres-migration.md` — migration guide for upgrading from `postgres-13` to the `postgres` job (PostgreSQL 15), including automatic `pg_upgrade` on first deploy

Operators should switch to the `postgres` job. See `docs/postgres-migration.md` for the migration guide.

Related PRs

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

Test plan

  • `bosh deploy` with `postgres-13` job produces the deprecation WARNING in logs
  • `docs/postgres-migration.md` is accessible

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The postgres-13 job metadata and startup script now identify the job as deprecated and direct operators to cloudfoundry/postgres-release. A new migration guide documents manifest changes, automatic PostgreSQL 15 upgrades, and unchanged property namespaces.

Suggested reviewers: selzoc, benjaminguttmann-avtq

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title accurately summarizes the main change: deprecating postgres-13 and scheduling its removal in the next release.
Description check ✅ Passed The description covers the change summary, related PRs, and test plan, but omits the release notes, breaking-change, tagging, and AI feedback sections.
✨ 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[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR deprecates the postgres-13 BOSH job ahead of its scheduled removal, by surfacing the deprecation both in the job metadata and during deployment/startup so operators see a clear migration signal.

Changes:

  • Adds a deprecation warning message to the postgres-13 job pre-start script output.
  • Adds a description field to jobs/postgres-13/spec marking the job as deprecated and directing operators to migrate.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
jobs/postgres-13/templates/pre-start.erb Emits deprecation warning lines when the job runs its pre-start hook.
jobs/postgres-13/spec Marks the job as deprecated via the job spec description string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread jobs/postgres-13/templates/pre-start.erb
Comment thread jobs/postgres-13/spec
@aramprice aramprice moved this from Pending Merge | Prioritized to Pending Review | Discussion in Foundational Infrastructure Working Group Jul 16, 2026
@ZPascal
ZPascal force-pushed the deprecate-postgres-13-job branch from 7fb8a6c to 7755c30 Compare July 16, 2026 19:34
@ZPascal

ZPascal commented Jul 16, 2026

Copy link
Copy Markdown
Author

Code review

Found 1 issue:

  1. The "Switching from jobs/postgres-13" section tells operators to set `databases.version: 13`, but the guide itself states that postgres-release ships versions 15, 16, 17, and 18 — version 13 is not available. Any operator following this instruction will get a deployment failure. For a postgres-13 user, the migration requires a major-version upgrade (dump/restore or `pg_upgrade`), not a drop-in data directory swap.

## Switching from jobs/postgres-13
Same as above, but set `databases.version: 13`.
## In-place cutover procedure

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

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

🤖 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 `@docs/postgres-migration.md`:
- Around line 68-73: The migration procedure must explicitly handle legacy
postgres jobs: identify the existing PostgreSQL major version (typically 10 or
11), rename or migrate `/var/vcap/store/postgres` to the versioned directory
expected by postgres-release, and configure the matching source version so
`pg_upgrade` runs before selecting a newer target version. Update the steps
around `databases.version` and the deployment instructions to prevent fresh
initialization and preserve existing data.
- Around line 9-10: Update the supported-version statement in the PostgreSQL
migration documentation to accurately include PostgreSQL 13 if postgres-release
still ships it for pg_upgrade or in-place cutovers. Otherwise, remove or revise
the migration instructions that depend on version 13 so the documented supported
versions and procedures remain consistent.
- Around line 62-65: Update the “Switching from jobs/postgres-13” section to
avoid setting databases.version: 13 with cloudfoundry/postgres-release; document
a compatible release containing PostgreSQL 13 binaries, or replace the
pg_upgrade procedure with a pg_dump/pg_restore migration flow.
🪄 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: d4960981-0b0f-4d4f-8f7b-dd45b21685d1

📥 Commits

Reviewing files that changed from the base of the PR and between 537c42e and 7755c30.

📒 Files selected for processing (3)
  • docs/postgres-migration.md
  • jobs/postgres-13/spec
  • jobs/postgres-13/templates/pre-start.erb

Comment thread docs/postgres-migration.md Outdated
Comment thread docs/postgres-migration.md Outdated
Comment thread docs/postgres-migration.md Outdated
@github-project-automation github-project-automation Bot moved this from Pending Review | Discussion to Waiting for Changes | Open for Contribution in Foundational Infrastructure Working Group Jul 16, 2026
The postgres-13 job will be removed in the next bosh release.

Signed-off-by: Pascal Zimmermann <pascal.zimmermann01@sap.com>
@ZPascal
ZPascal force-pushed the deprecate-postgres-13-job branch from 7755c30 to 4da127b Compare July 16, 2026 20:00

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

🤖 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 `@docs/postgres-migration.md`:
- Line 27: Update docs/postgres-migration.md so the file ends with exactly one
trailing newline, resolving the markdownlint MD047 violation without changing
its content.
🪄 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: d4edf64a-144b-4a52-aca5-a19a52ca07e4

📥 Commits

Reviewing files that changed from the base of the PR and between 7755c30 and 4da127b.

📒 Files selected for processing (3)
  • docs/postgres-migration.md
  • jobs/postgres-13/spec
  • jobs/postgres-13/templates/pre-start.erb

Comment thread docs/postgres-migration.md Outdated
@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 16, 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.

3 participants