-
Notifications
You must be signed in to change notification settings - Fork 11
feat: Add support for postgresql 18 #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds PostgreSQL 18 support to the Ansible role by updating supported version lists, OS-specific version matrices, and user-facing documentation/messages for RHEL 9 and 10. Flow diagram for PostgreSQL version validation with added 18 supportflowchart TD
A[User sets variable postgresql_version] --> B[Gather ansible_facts]
B --> C{distribution_major_version}
C --> D[RHEL8]
C --> E[RHEL9]
C --> F[RHEL10]
D --> G{postgresql_version in __postgresql_versions_el8 10,12,13,15,16}
G -->|yes| H[Proceed with role execution]
G -->|no| I[Fail: unsupported PostgreSQL version for RHEL8]
E --> J{postgresql_version in __postgresql_versions_el9 13,15,16,18}
J -->|yes| H
J -->|no| K[Fail: RHEL 9 supports only Postgresql 13,15,16,18]
F --> L{postgresql_version in __postgresql_versions_el10 16,18}
L -->|yes| H
L -->|no| M[Fail: unsupported PostgreSQL version for RHEL10]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- The README now claims the role supports PostgreSQL 18 generally, but
__postgresql_versions_el8does not include "18", so either add 18 to the EL8 versions or clarify in the README that 18 support is limited to specific RHEL versions. - The hard-coded error message for RHEL 9 supported versions in
tasks/main.ymlshould ideally be derived from the__postgresql_versions_el9variable or otherwise kept in one place to avoid future drift when supported versions change.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The README now claims the role supports PostgreSQL 18 generally, but `__postgresql_versions_el8` does not include "18", so either add 18 to the EL8 versions or clarify in the README that 18 support is limited to specific RHEL versions.
- The hard-coded error message for RHEL 9 supported versions in `tasks/main.yml` should ideally be derived from the `__postgresql_versions_el9` variable or otherwise kept in one place to avoid future drift when supported versions change.
## Individual Comments
### Comment 1
<location> `tasks/main.yml:21` </location>
<code_context>
- name: Check if requested version is supported in system (RHEL9)
fail:
- msg: RHEL 9 supports only Postgresql 13, 15 and 16
+ msg: RHEL 9 supports only Postgresql 13, 15, 16 and 18
when:
- ansible_facts["os_family"] == "RedHat"
</code_context>
<issue_to_address>
**suggestion:** Avoid hardcoding version list in the error message; derive it from the RHEL9 versions variable to keep them in sync.
Because `__postgresql_versions_el9` already defines the supported versions (13, 15, 16, 18), this message now duplicates that list. To avoid future drift, generate the message dynamically from `__postgresql_versions_el9` (e.g., via `join`/`map`) so it always reflects the configured supported versions.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - name: Check if requested version is supported in system (RHEL9) | ||
| fail: | ||
| msg: RHEL 9 supports only Postgresql 13, 15 and 16 | ||
| msg: RHEL 9 supports only Postgresql 13, 15, 16 and 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Avoid hardcoding version list in the error message; derive it from the RHEL9 versions variable to keep them in sync.
Because __postgresql_versions_el9 already defines the supported versions (13, 15, 16, 18), this message now duplicates that list. To avoid future drift, generate the message dynamically from __postgresql_versions_el9 (e.g., via join/map) so it always reflects the configured supported versions.
|
@fila43 package or module name changed? |
We realized there was an issue, and the component is missing from the c9s compose. We are working on it |
|
@richm now it should be fixed |
|
[citest] |
Are we still waiting for a fix for CentOS 10? |
| {{ ['@postgresql:' + postgresql_version + | ||
| '/server'] if postgresql_version != '16' else | ||
| ['postgresql-server'] }} | ||
| {{ ['@postgresql' + postgresql_version + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fila43
Now failing because @postgresql16-server is not found - do we need to have logic that uses @postgresql:N/server for N < 18, and @postgresqlN-server for N >= 18?
| {{ ['@postgresql:' + postgresql_version + | ||
| '/server'] if postgresql_version != '16' else | ||
| ['postgresql-server'] }} | ||
| {{ ['@postgresql' + postgresql_version + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {{ ['@postgresql' + postgresql_version + | |
| {{ ['postgresql' + postgresql_version + |
looks like it isn't a group/module anymore, it's just a regular package?
Enhancement: Add support for postgresql 18
Issue Tracker Tickets (Jira or BZ if any): RHEL-136892
Summary by Sourcery
Add PostgreSQL 18 as a supported version in the role and related messaging.
Enhancements:
Documentation: