Skip to content

chore: switch to PostgreSQL 18 in dev env - #2447

Open
jdobes wants to merge 1 commit into
RedHatInsights:masterfrom
jdobes:pg18_devenv
Open

chore: switch to PostgreSQL 18 in dev env#2447
jdobes wants to merge 1 commit into
RedHatInsights:masterfrom
jdobes:pg18_devenv

Conversation

@jdobes

@jdobes jdobes commented Aug 7, 2026

Copy link
Copy Markdown
Member

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

Summary by Sourcery

Switch development, test, and CI/container environments to PostgreSQL 18 and refresh associated RHEL9 kernel and module metadata RPM locks.

Enhancements:

  • Update docker-compose, test compose, application Dockerfiles, and platform mock images to use PostgreSQL 18 base images and COPR repositories instead of PostgreSQL 16.
  • Adjust RPM module enablement and lock files to target the PostgreSQL 18 module stream and corresponding source and binary packages.
  • Refresh locked kernel header and source RPM references and appstream module metadata to match the updated RHEL 9.8 content set.

CI:

  • Update container build and security scan GitHub workflows to pass ALT_REPO URLs for the PostgreSQL 18 COPR repository.

@sourcery-ai

sourcery-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates development and CI environments to use PostgreSQL 18 instead of 16, including Docker images, RPM module configuration, alternate COPR repositories, and associated kernel and module metadata in lockfiles.

File-Level Changes

Change Details Files
Switch development, test, and platform-mock containers to PostgreSQL 18 images and repositories.
  • Update docker-compose database service to use postgres:18 image and adjust data volume mount path for PostgreSQL 18 layout.
  • Change ALT_REPO arguments in docker-compose, test compose, GitHub workflows, and platform_mock Dockerfile to point to the PostgreSQL 18 COPR repo for RHEL 9.
  • Ensure platform_mock and test images install PostgreSQL 18-compatible packages via the new repository.
docker-compose.yml
.github/workflows/container-publish.yaml
.github/workflows/platsec-security-scan.yml
docker-compose.test.yml
platform_mock/Dockerfile
Update application Dockerfiles to enable and install PostgreSQL 18 instead of 16.
  • Change dnf and microdnf module enable commands from postgresql:16 to postgresql:18 in the main Dockerfile.
  • Change microdnf module enable from postgresql:16 to postgresql:18 in the runtime section of the Dockerfile.
  • Align test Dockerfile (placeholder in diff) to use the same PostgreSQL 18 setup (implicit from added file reference).
Dockerfile
Dockerfile.test
Update RPM module configuration and lockfile metadata to PostgreSQL 18 and newer kernel headers.
  • Change moduleEnable configuration from postgresql:16 to postgresql:18 in rpms.in.yaml.
  • Update rpms.lock.yaml entries for postgresql runtime, devel, private libs, static libraries, and source RPMs from 16.14 to 18.4 with new URLs, sizes, checksums, and EVR values.
  • Update kernel-headers and kernel source RPM entries in rpms.lock.yaml to newer 5.14.0-687.36.1.el9_8 builds, including URLs, sizes, and checksums.
  • Refresh module_metadata entry in rpms.lock.yaml to the new appstream modules.yaml.gz URL, size, and checksum.
rpms.in.yaml
rpms.lock.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've left some high level feedback:

  • The docker-compose volume mount for the Postgres container changed from /var/lib/postgresql/data to /var/lib/postgresql; consider either keeping it aligned with the image’s default PGDATA path or explicitly setting PGDATA so the data directory is unambiguous and consistent across versions.
  • The ALT_REPO URL for the PostgreSQL 18 COPR repo is now hardcoded in multiple places (Dockerfile, docker-compose, workflows, platform_mock); consider centralizing this value (e.g., via a shared env var or build arg) to reduce the risk of drift on future updates.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The docker-compose volume mount for the Postgres container changed from `/var/lib/postgresql/data` to `/var/lib/postgresql`; consider either keeping it aligned with the image’s default PGDATA path or explicitly setting `PGDATA` so the data directory is unambiguous and consistent across versions.
- The ALT_REPO URL for the PostgreSQL 18 COPR repo is now hardcoded in multiple places (Dockerfile, docker-compose, workflows, platform_mock); consider centralizing this value (e.g., via a shared env var or build arg) to reduce the risk of drift on future updates.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant