Skip to content

Conversation

@balinorLiang
Copy link
Collaborator

@balinorLiang balinorLiang commented May 26, 2025

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature
  • Bug fix
  • Documentation
  • Testing enhancement
  • Other

What is the current behavior (link to any open issues here)?

What is the new behavior (if this is a feature change)?

  • Breaking change (fix or feature that would cause existing functionality to change)

Other Information:

Summary by CodeRabbit

  • New Features

    • Expanded support for IvorySQL and PostgreSQL version 17 in cluster and upgrade configurations.
    • Added forced PostgreSQL version option to pgBackRest backup and restore operations.
    • Updated preloaded libraries for improved plugin compatibility.
  • Improvements

    • Updated container images and component versions for IvorySQL, backup, monitoring, and management tools.
    • Modernized CI workflows with updated runners, tools, and artifact retention policies.
    • Enhanced role recognition by standardizing "primary" terminology across labels, annotations, and test scripts.
  • Bug Fixes

    • Improved test compatibility with different Kubernetes server versions.
  • Documentation

    • Added comprehensive release notes for multiple IvorySQL Operator versions.
    • Updated and replaced release notes documentation files.
  • Style

    • Minor whitespace and formatting adjustments for clarity and consistency.
  • Tests

    • Updated test cases to reflect new options, configuration changes, and stricter shell script linting.

@coderabbitai
Copy link

coderabbitai bot commented May 26, 2025

Walkthrough

This update modernizes the IvorySQL Operator project by upgrading supported IvorySQL versions, updating container images, and refining Kubernetes resource definitions and CI workflows. It replaces "master" with "primary" in role labels, enhances backup and restore logic with version-forcing, expands preloaded libraries, and improves test strictness and documentation. Release notes are migrated from text to markdown.

Changes

Files / Groups Change Summary
.github/workflows/* CI workflows updated: action versions, runner OS, Go versions, image tags, artifact retention, and matrix values.
config/crd/bases/, pkg/apis/ivory-operator.ivorysql.org/v1beta1/ CRD and API validation: max IvorySQL/Postgres version increased from 16 to 17.
config/default/kustomization.yaml, config/singlenamespace/kustomization.yaml, examples/kustomize/install/default/kustomization.yaml, examples/kustomize/install/singlenamespace/kustomization.yaml Operator image repository and tag updated to new versions.
config/manager/manager.yaml, examples/kustomize/install/manager/manager.yaml Environment variables for container images updated to newer versions.
internal/controller/ivorycluster/instance.go, .../apply_test.go, .../patroni.go, testing/kuttl/* Role label/annotation changed from "master" to "primary" throughout logic and tests.
internal/controller/ivorycluster/pgbackrest.go, .../pgbackrest_test.go, internal/pgbackrest/* Added --pg-version-force option (default 17) to pgBackRest commands/configs and updated related tests.
internal/controller/ivorycluster/util.go, .../util_test.go LD_PRELOAD now includes libssl and libcrypto in addition to libnss_wrapper; tests updated accordingly.
internal/ivory/config_test.go, .../exec_test.go, .../pgadmin/config_test.go, .../pgbackrest/config_test.go, .../pgbouncer/config_test.go ShellCheck invocations in tests now use --severity=error for stricter linting.
internal/patroni/api.go JSON struct tags added for correct field mapping in GetTimeline method.
internal/pgaudit/postgres.go, .../postgres_test.go Preloaded libraries expanded to include pgaudit, liboracle_parser, ivorysql_ora; tests updated.
internal/pgadmin/reconcile.go, .../reconcile_test.go pgAdmin setup script now explicitly uses setup-db subcommand.
ivyo_release_notes.md, ivyo_release_notes.txt Release notes migrated from text to markdown, expanded for new versions.
testing/kuttl/e2e/streaming-standby/00--secrets.yaml Updated base64-encoded TLS certificates and keys in Kubernetes secrets.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Operator
    participant Kubernetes
    participant pgBackRest
    participant Patroni
    participant IvorySQL Pod

    User->>Operator: Deploy/Upgrade IvorySQLCluster (v17)
    Operator->>Kubernetes: Apply CRDs, Deployments, ConfigMaps (with updated images and version constraints)
    Operator->>IvorySQL Pod: Set LD_PRELOAD (libnss_wrapper, libssl, libcrypto)
    Operator->>Patroni: Assign pod role label "primary"
    Operator->>pgBackRest: Run backup/restore with --pg-version-force=17
    pgBackRest-->>Operator: Backup/restore result
    Operator->>Kubernetes: Update pod labels/annotations as "primary"
    Operator->>User: Status, logs, and events
Loading

Poem

🐇
Hopping through the code so bright,
"Primary" pods now in the light!
Backups forced with version keen,
Preloads richer, scripts more clean.
Release notes sparkle, markdown new—
IvorySQL, we’re proud of you!
— Your friendly release rabbit 🥕


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (2)
testing/kuttl/e2e-other/exporter-upgrade/02--update-cluster.yaml (1)

7-7: Duplicate: verify IvorySQL image tag
Same upgrade to ubi8-4.5-4.0-1 as in 00--cluster.yaml. Please confirm the tag’s availability and compatibility.

config/singlenamespace/kustomization.yaml (1)

16-17: (Duplicate) Bump operator image to v4.0
The same image update applies here as in config/default/kustomization.yaml. Ensure you’ve verified the v4.0 tag’s existence and consistency.

🧹 Nitpick comments (3)
testing/kuttl/e2e/switchover/02-annotate.yaml (1)

9-10: Consider updating the test label for consistency

The selector correctly uses "primary", but line 10 still labels pods with testing/role-before=master. For consistency, consider updating this to testing/role-before=primary unless the "master" value is specifically required for test validation.

        --selector='ivory-operator.ivorysql.org/role=primary' \
-        'testing/role-before=master'
+        'testing/role-before=primary'
ReleaseNotes.md (2)

8-16: Add blank lines around tables for better markdown formatting.

The markdown tables should be surrounded by blank lines according to markdown best practices and the static analysis hints.

Apply this diff to improve table formatting:

 组件版本:
+
 | 组件名 | 版本 | 描述 |
 |---------|---------|---------|
 | IvorySQL | 4.5 | 基于PG 17.5兼容Oracle的开源数据库最新版本 IvorySQL |
 | pgBackrest | 2.54.1 | PostgreSQL 备份和恢复工具 |
 | PgBouncer | 1.23.0 | PostgreSQL 轻量级连接池工具 |
 | Patroni | 4.0.4 | PostgreSQL 高可用集群管理工具 |
 | pgAdmin4 | 8.14.0 | PostgreSQL 官方图形化管理工具 |
 | pgExporter | 0.17.0 | 为 PostgreSQL 提供 Prometheus 监控指标导出的工具 |
+
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

8-8: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)


17-26: Add blank lines around the extensions table for consistent formatting.

Apply this diff to improve table formatting:

 扩展版本:
+
 | 扩展名 | 版本 | 描述 |
 |---------|---------|---------|
 | PostGIS | 3.4.0 |  PostgreSQL 的空间数据库扩展 |
 | pgaudit | 17.0 | PostgreSQL 的审计扩展 |
 | pg_cron | 1.6.5 | PostgreSQL 定时执行 SQL 语句的扩展 |
 | timescaledb | 2.17.2 | PostgreSQL 的时间序列数据库扩展 |
 | wal2json | 2.6 | 将 PostgreSQL 的 WAL 日志数据转换为 JSON 格式的扩展 |
 | pgnodemx | 1.7 | 收集操作系统级别和实例级别的运行时指标的扩展 |
+
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

18-18: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ea5f367 and 9e24868.

📒 Files selected for processing (60)
  • .github/workflows/lint.yaml (1 hunks)
  • .github/workflows/test.yaml (7 hunks)
  • ReleaseNotes.md (1 hunks)
  • config/crd/bases/ivory-operator.ivorysql.org_ivoryclusters.yaml (1 hunks)
  • config/crd/bases/ivory-operator.ivorysql.org_ivyupgrades.yaml (2 hunks)
  • config/default/kustomization.yaml (1 hunks)
  • config/manager/manager.yaml (1 hunks)
  • config/singlenamespace/kustomization.yaml (1 hunks)
  • examples/kustomize/install/crd/bases/ivory-operator.ivorysql.org_ivoryclusters.yaml (1 hunks)
  • examples/kustomize/install/default/kustomization.yaml (1 hunks)
  • examples/kustomize/install/manager/manager.yaml (1 hunks)
  • examples/kustomize/install/singlenamespace/kustomization.yaml (1 hunks)
  • internal/controller/ivorycluster/apply_test.go (1 hunks)
  • internal/controller/ivorycluster/instance.go (2 hunks)
  • internal/controller/ivorycluster/ivory.go (0 hunks)
  • internal/controller/ivorycluster/patroni.go (1 hunks)
  • internal/controller/ivorycluster/pgbackrest.go (3 hunks)
  • internal/controller/ivorycluster/pgbackrest_test.go (6 hunks)
  • internal/controller/ivorycluster/util.go (2 hunks)
  • internal/controller/ivorycluster/util_test.go (1 hunks)
  • internal/ivory/config_test.go (1 hunks)
  • internal/ivory/exec_test.go (1 hunks)
  • internal/patroni/api.go (1 hunks)
  • internal/patroni/config_test.go (2 hunks)
  • internal/pgadmin/config_test.go (1 hunks)
  • internal/pgadmin/reconcile.go (1 hunks)
  • internal/pgadmin/reconcile_test.go (2 hunks)
  • internal/pgaudit/postgres.go (1 hunks)
  • internal/pgaudit/postgres_test.go (2 hunks)
  • internal/pgbackrest/config.go (1 hunks)
  • internal/pgbackrest/config_test.go (3 hunks)
  • internal/pgbackrest/pgbackrest.go (1 hunks)
  • internal/pgbackrest/pgbackrest_test.go (2 hunks)
  • internal/pgbouncer/config_test.go (1 hunks)
  • pkg/apis/ivory-operator.ivorysql.org/v1beta1/ivorycluster_types.go (1 hunks)
  • pkg/apis/ivory-operator.ivorysql.org/v1beta1/pgupgrade_types.go (2 hunks)
  • testing/kuttl/e2e-other/cluster-migrate/06-assert.yaml (1 hunks)
  • testing/kuttl/e2e-other/cluster-migrate/07--set-collation.yaml (1 hunks)
  • testing/kuttl/e2e-other/cluster-migrate/09--check-data.yaml (1 hunks)
  • testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/10-assert.yaml (1 hunks)
  • testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/11-annotate.yaml (1 hunks)
  • testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/12-assert.yaml (1 hunks)
  • testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/13-delete-cluster-and-check.yaml (1 hunks)
  • testing/kuttl/e2e-other/exporter-upgrade/00--cluster.yaml (1 hunks)
  • testing/kuttl/e2e-other/exporter-upgrade/01--check-exporter.yaml (1 hunks)
  • testing/kuttl/e2e-other/exporter-upgrade/02--update-cluster.yaml (1 hunks)
  • testing/kuttl/e2e-other/exporter-upgrade/03--check-exporter.yaml (1 hunks)
  • testing/kuttl/e2e/delete/10-assert.yaml (1 hunks)
  • testing/kuttl/e2e/pgbackrest-restore/07--annotate.yaml (1 hunks)
  • testing/kuttl/e2e/pgbackrest-restore/08--wait-restart.yaml (1 hunks)
  • testing/kuttl/e2e/pgbackrest-restore/10--wait-archived.yaml (1 hunks)
  • testing/kuttl/e2e/pgbackrest-restore/14--lose-data.yaml (1 hunks)
  • testing/kuttl/e2e/scaledown/10-assert.yaml (1 hunks)
  • testing/kuttl/e2e/scaledown/11-annotate.yaml (1 hunks)
  • testing/kuttl/e2e/scaledown/12-assert.yaml (1 hunks)
  • testing/kuttl/e2e/security-context/00-assert.yaml (1 hunks)
  • testing/kuttl/e2e/streaming-standby/00--secrets.yaml (1 hunks)
  • testing/kuttl/e2e/switchover/01-assert.yaml (1 hunks)
  • testing/kuttl/e2e/switchover/02-annotate.yaml (1 hunks)
  • testing/kuttl/e2e/switchover/03-assert.yaml (1 hunks)
💤 Files with no reviewable changes (1)
  • internal/controller/ivorycluster/ivory.go
🧰 Additional context used
🧬 Code Graph Analysis (2)
internal/controller/ivorycluster/patroni.go (1)
internal/naming/names.go (1)
  • PatroniScope (416-418)
internal/controller/ivorycluster/instance.go (1)
internal/naming/labels.go (2)
  • RolePatroniLeader (99-99)
  • RolePrimary (94-94)
🪛 markdownlint-cli2 (0.17.2)
ReleaseNotes.md

8-8: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)


18-18: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)

🪛 actionlint (1.7.7)
.github/workflows/test.yaml

16-16: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


34-34: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


59-59: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


93-93: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


161-161: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (67)
internal/ivory/exec_test.go (1)

198-198: LGTM! Enhanced shellcheck strictness improves test reliability.

Adding the --severity=error flag restricts shellcheck to report only error-level issues, making the tests more focused and reducing noise from warnings. This change aligns with similar improvements made across other test files in the codebase.

internal/pgadmin/reconcile.go (1)

129-129: LGTM! Explicit setup command improves clarity.

Making the pgAdmin4 database setup command explicit by adding the setup-db argument improves code clarity and self-documentation. This change aligns with the pgAdmin4 8.14.0 upgrade and makes the setup process more transparent.

internal/pgbouncer/config_test.go (1)

227-227: LGTM! Consistent shellcheck enhancement across test files.

Adding the --severity=error flag maintains consistency with similar improvements made in other test files (like internal/ivory/exec_test.go). This standardizes the shellcheck approach across the codebase to focus on error-level issues only.

internal/ivory/config_test.go (1)

488-488: Good improvement to shellcheck validation.

Adding the --severity=error flag focuses the validation on actual errors rather than warnings, which is appropriate for testing generated shell scripts. This change aligns with similar updates across other test files and reduces noise while maintaining essential quality checks.

internal/pgadmin/reconcile_test.go (1)

203-203: Excellent update for pgAdmin4 version compatibility.

The explicit setup-db argument makes the database initialization command more precise and aligns with the pgAdmin4 8.14.0 upgrade mentioned in the release notes. This ensures compatibility with newer pgAdmin versions that may require explicit subcommand specification.

Also applies to: 437-437

internal/pgadmin/config_test.go (1)

76-76: Consistent shellcheck improvement.

Same beneficial change as other test files - focusing on error-level issues improves test signal-to-noise ratio while maintaining essential validation.

internal/patroni/api.go (1)

203-204: Great addition of explicit JSON field tags.

Adding explicit JSON field tags improves the robustness of API response parsing and follows Go best practices. This ensures reliable unmarshaling of Patroni status responses regardless of potential changes to Go's default field name mapping behavior. The change creates consistency with the existing Timeline field that already had a JSON tag.

internal/controller/ivorycluster/util.go (2)

112-112: SSL library preloading added for NSS wrapper script.

The addition of libssl.so.1.1 and libcrypto.so.1.1 to the LD_PRELOAD environment variable suggests compatibility requirements with IvorySQL 4.5/PostgreSQL 17. This change ensures proper SSL library loading in the NSS wrapper environment.


197-197: Consistent SSL library preloading in Go function.

The addNSSWrapper function correctly mirrors the SSL library preloading changes made in the script above. Note that pgAdmin containers (line 206) maintain the original LD_PRELOAD value, which appears intentional for container-specific SSL requirements.

internal/controller/ivorycluster/util_test.go (1)

271-271: Test correctly updated to match SSL library preloading changes.

The expected LD_PRELOAD value has been properly updated to include the additional SSL libraries, maintaining test coverage for the implementation changes in util.go. The test correctly preserves the different expectations for pgAdmin containers.

testing/kuttl/e2e/scaledown/12-assert.yaml (1)

18-18: Role label terminology updated from 'master' to 'primary'.

This change improves role naming clarity and aligns with modern conventions. The semantic meaning remains the same while using more explicit terminology for the primary database role.

examples/kustomize/install/default/kustomization.yaml (1)

16-16: Align operator version label with image tag
The newTag: v4.0 correctly points to the Operator v4 release. However, the app.kubernetes.io/version label on line 6 still reads v0.1. Please confirm whether this common label should also be bumped to v4.0 to stay in sync with the Operator version.

testing/kuttl/e2e/security-context/00-assert.yaml (1)

48-48: Standardize role label to primary
The ivory-operator.ivorysql.org/role label has been updated to primary (from master). Ensure that any KUTTL assertions, label selectors, or controller logic referencing this label are also updated to primary so the tests continue to target the correct Pod.

testing/kuttl/e2e-other/cluster-migrate/06-assert.yaml (1)

19-19: Ensure migration test uses updated role label
In this migration assertion, the Pod’s ivory-operator.ivorysql.org/role label is now primary. Verify that any downstream steps (e.g., cleanup, switchover checks) expecting the old master label have been updated so the test remains valid.

examples/kustomize/install/crd/bases/ivory-operator.ivorysql.org_ivoryclusters.yaml (1)

10471-10471: Align postgresVersion max value with major version 17
This update correctly raises the CRD schema’s maximum allowed PostgreSQL version to 17, ensuring compatibility with the IvorySQL Operator V4 release.

testing/kuttl/e2e/scaledown/10-assert.yaml (1)

18-18: Consistent role label update
Changed the pod role label from “master” to “primary” to align with the operator’s new naming convention.

testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/12-assert.yaml (1)

9-9: Align primary role label
Updated the ivory-operator.ivorysql.org/role label on the first Pod to “primary” for consistency with the operator and other test manifests.

testing/kuttl/e2e-other/exporter-upgrade/00--cluster.yaml (1)

7-7: Verify new IvorySQL image tag
The image was bumped to docker.io/ivorysql/ivorysql:ubi8-4.5-4.0-1. Ensure this tag is published in the registry and compatible with PostgreSQL 17 before merging.

testing/kuttl/e2e/pgbackrest-restore/14--lose-data.yaml (1)

9-10: Consistent primary-role label in pod selector
The label selector has been correctly updated from role=master to role=primary, ensuring this test step targets the new primary pod naming.

testing/kuttl/e2e/pgbackrest-restore/10--wait-archived.yaml (1)

9-11: Update to primary-role selector for WAL archiving
The selector now uses ivory-operator.ivorysql.org/role=primary instead of master, matching the operator’s updated role labels for primary pods.

testing/kuttl/e2e/switchover/03-assert.yaml (1)

10-10: Primary pod label standardized in switchover assertion
Changed the role label to primary to reflect the operator’s new standard, so the former replica is correctly detected as primary.

testing/kuttl/e2e/switchover/01-assert.yaml (1)

20-20: Role label updated to primary for initial switchover check
This change ensures the test waits for pods labeled role=primary instead of master, aligning with the operator’s role rename.

testing/kuttl/e2e-other/exporter-upgrade/01--check-exporter.yaml (1)

10-11: Exporter test selects primary pod by updated label
The selector has been updated to use ivory-operator.ivorysql.org/role=primary, ensuring the exporter metrics check runs against the correct pod.

testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/10-assert.yaml (1)

20-20:

Details

✅ Verification successful

Consistent role label update to “primary”
The Pod selector has been updated from master to primary to align with the new naming convention. Ensure that all other KUTTL tests and the operator’s code recognize primary and that no residual master labels remain.

To verify there are no leftover master labels in the test suite, you can run:

Expect zero matches.


🏁 Script executed:

#!/usr/bin/env bash
# Search for any remaining 'master' role labels in KUTTL tests
rg "ivory-operator.ivorysql.org/role: *master" -n testing/kuttl

Length of output: 65


🏁 Script executed:

#!/usr/bin/env bash
set -eo pipefail

# 1. Check for any specific operator role labels still using 'master'
rg 'ivory-operator\.ivorysql\.org/role:\s*master' -n testing/kuttl || true

# 2. Check for any generic 'role: master' occurrences in KUTTL tests
rg 'role:\s*master' -n testing/kuttl || true

Length of output: 140


No leftover master labels detected
I searched the entire testing/kuttl suite for both the specific label ivory-operator.ivorysql.org/role: master and any generic role: master occurrences—zero matches found. The switch to primary is fully applied. Approving these changes.

testing/kuttl/e2e/delete/10-assert.yaml (1)

20-20: Align Pod role label with updated convention
This change replaces the master role label with primary, consistent with the operator code modifications. No functional logic is altered.

testing/kuttl/e2e-other/cluster-migrate/09--check-data.yaml (1)

11-11: Update selector to use primary role
The kubectl selector has been updated from role=master to role=primary, matching the operator’s new role terminology. This is a straightforward label rename.

config/default/kustomization.yaml (1)

14-15:

Details

✅ Verification successful

Bump operator image to v4.0
The ivory-operator image reference has been updated to docker.io/ivorysql/ivory-operator:v4.0 for the v4 release. Please confirm that the v4.0 tag exists in the registry and matches the published release artifacts.

Expectation: an exact match on v4.0.


🏁 Script executed:

#!/usr/bin/env bash
# Check if the 'v4.0' tag exists for ivorysql/ivory-operator on Docker Hub
curl -s 'https://registry.hub.docker.com/v2/repositories/ivorysql/ivory-operator/tags?page_size=100' \
  | jq -r '.results[].name' \
  | grep -x 'v4.0'

Length of output: 148


Operator image tag v4.0 verified
The docker.io/ivorysql/ivory-operator:v4.0 tag exists in the registry. Ready to merge the bump.

• config/default/kustomization.yaml (lines 14–15)

testing/kuttl/e2e/pgbackrest-restore/07--annotate.yaml (1)

11-11: Update Pod selector role label
The selector has been correctly changed from role=master to role=primary, aligning this test step with the operator’s new primary role naming.

testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/11-annotate.yaml (1)

9-9: Align role selector in label command
Switching the selector from role=master to role=primary ensures that the test targets the correct primary pods under the updated role convention.

config/crd/bases/ivory-operator.ivorysql.org_ivoryclusters.yaml (1)

10468-10474: Validate the CRD schema bump from PostgreSQL version 16 to 17

Updating maximum: 17 correctly extends support to PostgreSQL 17.x for IvorySQL 4.5. Please ensure that:

  1. All related CRDs (e.g., ivyupgrades) have been updated in parallel.
  2. Example manifests and default kustomizations reference postgresVersion: 17.
  3. CI/integration tests include a dry-run or schema-validation step for postgresVersion: 17.

Would you like to run a dry-run validation against this CRD to confirm acceptance of version 17?

testing/kuttl/e2e/pgbackrest-restore/08--wait-restart.yaml (1)

14-14: LGTM: Role label modernization

The change from "master" to "primary" role label follows modern inclusive terminology practices and aligns with the broader updates mentioned in the PR.

testing/kuttl/e2e-other/exporter-upgrade/03--check-exporter.yaml (1)

11-11: LGTM: Consistent role label update

The role selector change from "master" to "primary" is consistent with the terminology modernization across the test suite.

testing/kuttl/e2e-other/cluster-migrate/07--set-collation.yaml (1)

13-13: LGTM: Role label modernization

The selector update from "master" to "primary" continues the consistent terminology modernization across test files.

internal/pgbackrest/config.go (1)

313-313:

Details

❓ Verification inconclusive

Verify pgBackRest compatibility with PostgreSQL 17

The addition of pg-version-force=17 forces pgBackRest to recognize PostgreSQL version 17. This aligns with the upgrade to PostgreSQL 17 support, but please ensure that:

  1. The version of pgBackRest being used supports PostgreSQL 17
  2. This forced version setting is appropriate for all deployment scenarios
  3. The setting doesn't conflict with actual PostgreSQL version detection

🏁 Script executed:

#!/bin/bash
# Description: Verify pgBackRest version support and usage of pg-version-force

# Check for other pgBackRest version configurations
rg -A 2 -B 2 "pg-version" --type go

# Check for pgBackRest version or image references
rg -A 2 -B 2 "(pgbackrest|PGBackRest).*version|image.*pgbackrest" --type yaml --type go

Length of output: 12336


Review pg-version-force behavior

The hardcoded stanza setting pg-version-force = "17" in internal/pgbackrest/config.go (line 313) forces all stanza configs to PostgreSQL 17, while elsewhere (e.g. in internal/controller/ivorycluster/pgbackrest.go) the --pg-version-force flag is set dynamically from Spec.PostgresVersion. Please verify:

  • internal/pgbackrest/config.go:313
    → Should this use a variable (e.g. the cluster’s PostgresVersion) rather than the literal "17"?
  • internal/controller/ivorycluster/pgbackrest.go
    → Ensure CLI flags and config file remain in sync for mixed‐version scenarios.
  • internal/*/pgbackrest_test.go & config_test.go
    → Confirm tests correctly capture the intended behavior for non-PG17 clusters.
  • examples/kustomize/**/ivory.yaml and examples/ivorycluster/ivorycluster.yaml
    → They reference docker.io/ivorysql/pgbackrest:ubi8-2.45-1.1-1; verify this image supports PG17 or update to a version that does.
  • General compatibility
    → Make sure forcing PG17 doesn’t conflict with pgBackRest’s built-in version detection.
config/crd/bases/ivory-operator.ivorysql.org_ivyupgrades.yaml (2)

858-862: LGTM! Version constraint update supports IvorySQL 17.

The maximum value increase for fromIvoryVersion correctly enables upgrades from IvorySQL version 17, aligning with the operator's support for PostgreSQL 17.5.


937-941: LGTM! Complementary version constraint update.

The maximum value increase for toIvoryVersion correctly enables upgrades to IvorySQL version 17, completing the version support for upgrade operations.

pkg/apis/ivory-operator.ivorysql.org/v1beta1/ivorycluster_types.go (1)

124-128: LGTM! API validation constraint matches CRD schema update.

The PostgresVersion maximum constraint increase to 17 correctly aligns with the corresponding CRD schema changes, ensuring consistent validation across the API surface.

testing/kuttl/e2e/scaledown/11-annotate.yaml (1)

6-9: LGTM! Test updated for new role label convention.

The selector correctly changes to use ivory-operator.ivorysql.org/role=primary to match the updated role labeling system. The applied label value (testing/role-before=master) appears to be test-specific and may intentionally retain the old terminology for comparison purposes.

examples/kustomize/install/manager/manager.yaml (1)

29-32:

Details

❓ Verification inconclusive

LGTM! Version upgrades align with V4 release objectives.

The image tag updates correctly reflect the upgrade to IvorySQL 4.5 and pgBackRest 2.54.1, which is consistent with the V4 operator release.

Please verify that these updated container images are available and properly tagged:


🏁 Script executed:

#!/bin/bash
# Description: Verify the updated container images exist and are accessible

echo "Checking IvorySQL image availability..."
docker manifest inspect docker.io/ivorysql/ivorysql:ubi8-4.5-4.0-1

echo "Checking pgBackRest image availability..."  
docker manifest inspect docker.io/ivorysql/pgbackrest:ubi8-2.54.1-4.0-1

Length of output: 518


Approved – version upgrades align with V4 release objectives, pending image availability check

The updated environment variables correctly reflect IvorySQL 4.5 and pgBackRest 2.54.1 in examples/kustomize/install/manager/manager.yaml.

Please manually verify that these container images are available and properly tagged in your registry:

  • IvorySQL: docker.io/ivorysql/ivorysql:ubi8-4.5-4.0-1
  • pgBackRest: docker.io/ivorysql/pgbackrest:ubi8-2.54.1-4.0-1

You can confirm with, for example:

docker manifest inspect docker.io/ivorysql/ivorysql:ubi8-4.5-4.0-1
docker manifest inspect docker.io/ivorysql/pgbackrest:ubi8-2.54.1-4.0-1
internal/patroni/config_test.go (2)

924-924: Good improvement to shell script linting.

Adding --severity=error to shellcheck focuses the validation on critical issues, which improves test reliability and reduces noise from minor style suggestions.


950-950: Consistent shellcheck improvement.

The same shellcheck enhancement applied here maintains consistency across the test suite.

internal/pgbackrest/pgbackrest_test.go (2)

41-41: PostgreSQL 17 support correctly implemented.

The addition of --pg-version-force=17 aligns with the V4 release objective to support PostgreSQL 17, ensuring pgBackRest operations use the correct PostgreSQL version.


71-71: Consistent shellcheck improvement.

The --severity=error flag addition maintains consistency with similar improvements in other test files, focusing on critical issues.

testing/kuttl/e2e/streaming-standby/00--secrets.yaml (2)

3-5: Certificate data updated for test environment.

The base64-encoded certificate and key data has been updated, which is appropriate for a test environment refresh corresponding to the V4 upgrade.


13-15: Replication certificate data updated consistently.

The replication certificate data has been updated consistently with the cluster certificate, maintaining proper test environment configuration.

internal/pgaudit/postgres.go (1)

72-72: LGTM! Oracle compatibility libraries added correctly.

The addition of liboracle_parser and ivorysql_ora to the shared preload libraries is appropriate for IvorySQL 4.5's Oracle compatibility features. The library order appears correct, with pgaudit first, followed by the Oracle compatibility components.

config/manager/manager.yaml (1)

22-30: Container image versions updated consistently for V4 release.

All IvorySQL-related container images have been updated to version 4.0-1, maintaining consistency across the operator ecosystem. The unchanged RELATED_IMAGE_PGUPGRADE and RELATED_IMAGE_POSTGRES_16_GIS_3.4 images appear to be intentionally preserved at their current versions.

internal/pgaudit/postgres_test.go (2)

65-65: Test expectations updated correctly for new shared libraries.

The test expectation correctly reflects the implementation change, verifying that pgaudit,liboracle_parser,ivorysql_ora are properly appended to the shared preload libraries.


74-74: Test case for non-empty libraries updated correctly.

The test properly validates the append behavior when existing shared libraries are present, ensuring the new Oracle compatibility libraries are correctly added to the end of the list.

internal/pgbackrest/config_test.go (3)

156-156: PostgreSQL 17 version forcing added correctly.

The addition of pg-version-force = 17 in the pgBackRest configuration test aligns with the operator's upgrade to support PostgreSQL 17. This ensures pgBackRest uses the correct version-specific settings.


282-282: Shellcheck severity standardized to errors only.

The addition of --severity=error flag standardizes shell script linting to report only error-level issues, reducing noise from warnings and info messages while maintaining code quality.


310-310: Consistent shellcheck configuration applied.

The shellcheck command is updated with the --severity=error flag, maintaining consistency with the standardization applied across the test suite.

internal/pgbackrest/pgbackrest.go (1)

73-73: Correct implementation of PostgreSQL 17 version forcing.

The addition of --pg-version-force=17 to the pgbackrest command is correctly implemented and necessary for ensuring pgBackRest properly handles the PostgreSQL 17 upgrade. This change aligns with the broader operator upgrade to support IvorySQL 4.5 based on PostgreSQL 17.5.

ReleaseNotes.md (1)

1-26: Well-structured release notes documenting the V4 upgrade.

The release notes comprehensively document the upgrade to IvorySQL Operator V4 with detailed component and extension version information. The content clearly outlines the transition to IvorySQL 4.5 based on PostgreSQL 17.5 and provides valuable information for users about updated versions.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

8-8: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)


18-18: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)

pkg/apis/ivory-operator.ivorysql.org/v1beta1/pgupgrade_types.go (2)

62-62: Correct update of maximum IvorySQL version validation.

The increase of the maximum validation from 16 to 17 for FromIvoryVersion is correctly implemented and necessary to support upgrades involving IvorySQL 4.5 based on PostgreSQL 17.


73-73: Consistent update of maximum version validation for ToIvoryVersion.

The maximum validation update for ToIvoryVersion is consistent with the FromIvoryVersion change and correctly enables support for upgrading to IvorySQL version 17.

internal/controller/ivorycluster/pgbackrest.go (3)

24-24: Approve: import strconv for version flag
The new strconv import is necessary to convert Spec.PostgresVersion (an integer) into a string when building the --pg-version-force option.


679-679: Verify consistency of the --pg-version-force flag
You’ve appended --pg-version-force=<version> to the backup job command. Please ensure:

  1. All backup-related tests and workflows include assertions or coverage for this new flag.
  2. This flag is intentionally omitted or also applied in restore or other pgBackRest invocations if version enforcement is required there.
  3. Any user-facing documentation or examples are updated to reflect the new option.

2569-2569: Skip whitespace-only change
This adjustment only affects indentation/blank-line formatting in reconcileStanzaCreate, with no functional impact.

internal/controller/ivorycluster/instance.go (2)

78-78: LGTM! Backward-compatible role detection.

The updated IsPrimary() method correctly supports both the legacy RolePatroniLeader ("master") and new RolePrimary ("primary") labels, enabling smooth transition during the role naming migration.


145-146: LGTM! Comprehensive writable state detection.

The IsWritable() method now properly handles both "role":"master" and "role":"primary" annotations in the status field, maintaining compatibility across the role naming transition.

internal/controller/ivorycluster/apply_test.go (1)

82-92: LGTM! Proper handling of Kubernetes version-specific behavior.

The conditional test logic correctly accounts for the known Kubernetes server-side apply issue (#116861) where resource versions change unexpectedly in specific version ranges. This ensures test reliability across different Kubernetes versions.

.github/workflows/test.yaml (4)

13-19: LGTM! Modernized CI environment.

The updates to ubuntu-24.04 runner, actions v4, and pinned Go version 1.19 improve CI reliability and reproducibility. The static analysis warnings about actions/setup-go@v4 being "too old" appear to be false positives - v4 is compatible with ubuntu-24.04.

🧰 Tools
🪛 actionlint (1.7.7)

16-16: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


67-69: LGTM! Updated container images align with IvorySQL 4.5.

The Docker image updates to the 4.0-1 series (e.g., ivorysql:ubi8-4.5-4.0-1) properly reflect the upgrade to IvorySQL 4.5/PostgreSQL 17 mentioned in the PR objectives.

Also applies to: 101-106, 121-127


138-142: LGTM! Test environment updated for PostgreSQL 17.

The environment variable updates from version 16 to 17 correctly align with the PostgreSQL 17 support being added in this release.


191-191: Good improvement! Extended artifact retention.

Increasing coverage report retention from 1 to 15 days provides better visibility into coverage trends and debugging capabilities.

internal/controller/ivorycluster/pgbackrest_test.go (1)

2105-2105: PostgreSQL version configuration aligns with upgrade objectives

The configuration strings correctly specify pg-version-force = 17 which aligns with the PR's objective to support IvorySQL 4.5 (PostgreSQL 17.5). The generated pgBackRest configuration properly includes the version forcing parameter for PostgreSQL 17.

However, ensure that the PostgreSQL version used in these configuration tests is consistent with the version used in command option tests (line 957) to maintain test coherence.

Also applies to: 2122-2122, 2137-2137, 2156-2156

- uses: golangci/golangci-lint-action@v3
with:
version: latest
version: v1.60.1
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

LGTM! Version pinning improves CI reproducibility.

Pinning the golangci-lint-action to a specific version (v1.60.1) instead of using "latest" is a best practice that ensures reproducible builds and prevents unexpected CI failures from breaking changes in newer versions.

Let me verify that this version exists and is valid:


🏁 Script executed:

#!/bin/bash
# Description: Verify golangci-lint-action version v1.60.1 exists on GitHub
# Expected: Should return version information if valid

gh api repos/golangci/golangci-lint-action/releases --jq '.[] | select(.tag_name == "v1.60.1") | {tag_name, published_at, name}'

Length of output: 130


Let’s recheck the release tag using a direct GitHub API call:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Check HTTP status code for the golangci-lint-action v1.60.1 release tag
status=$(curl -s -o /dev/null -w "%{http_code}" \
  https://api.github.com/repos/golangci/golangci-lint-action/releases/tags/v1.60.1)
echo "HTTP status code: $status"

Length of output: 208


Invalid golangci-lint-action version pin – v1.60.1 not found

The GitHub API returned HTTP 404 for releases/tags/v1.60.1, so CI will break trying to fetch a non-existent release. Please update the version on line 55 of .github/workflows/lint.yaml to a valid tag (see https://github.com/golangci/golangci-lint-action/releases):

• File: .github/workflows/lint.yaml
Line 55:

- version: v1.60.1
+ version: <VALID_TAG_HERE>  # e.g., v1.59.1 or the latest stable release
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
version: v1.60.1
version: <VALID_TAG_HERE> # e.g., v1.59.1 or the latest stable release
🤖 Prompt for AI Agents
In .github/workflows/lint.yaml at line 55, the golangci-lint-action version is
pinned to v1.60.1, which does not exist and causes CI failures. Update the
version on line 55 to a valid release tag by checking the official
golangci-lint-action releases page and replacing v1.60.1 with an existing
version to ensure the action runs correctly.

- name: ivory-operator
newName: docker.io/ivorysql/ivory-operator
newTag: v1.1
newTag: v4.0
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Operator image updated to v4.0 release.

The image tag has been properly updated to reflect the new IvorySQL Operator v4.0 release. This major version increment aligns with the PR objectives for the V4 release.

Verify that the v4.0 image tag exists and is available:


🏁 Script executed:

#!/bin/bash
# Verify the availability of the v4.0 image tag
docker pull docker.io/ivorysql/ivory-operator:v4.0 2>/dev/null && echo "Image v4.0 exists" || echo "Image v4.0 not found"

Length of output: 103


IvorySQL Operator image tag v4.0 not found

The kustomization is referencing a nonexistent operator image tag. Please ensure that docker.io/ivorysql/ivory-operator:v4.0 has been published and is available before updating the manifest. If the v4.0 tag isn’t yet released, revert to the latest published tag or wait until the image is pushed.

• File: examples/kustomize/install/singlenamespace/kustomization.yaml (line 16)
• Current snippet:

  newTag: v4.0
🤖 Prompt for AI Agents
In examples/kustomize/install/singlenamespace/kustomization.yaml at line 16, the
newTag is set to v4.0, but the corresponding Docker image tag
docker.io/ivorysql/ivory-operator:v4.0 does not exist or is not yet published.
To fix this, verify the availability of the v4.0 image tag; if it is not
available, revert the newTag value to the latest published image tag or wait
until the v4.0 image is pushed before updating the manifest.

PRIMARY=$(
kubectl get pods --namespace="${NAMESPACE}" \
--selector='ivory-operator.ivorysql.org/role=master' \
--selector='ivory-operator.ivorysql.org/role=primary' \
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Update selector to use primary
Replaced role=master with role=primary in the kubectl get pods selector. Run a quick search to ensure no leftover role=master references remain in any test scripts:


🏁 Script executed:

rg -n "ivory-operator.ivorysql.org/role=master" -A 2 testing/kuttl/

Length of output: 67


🏁 Script executed:

#!/bin/bash
# Search the entire repository for any remaining 'role=master' selectors
rg -n "ivory-operator.ivorysql.org/role=master" -A2 .

Length of output: 1415


Update all role=master selectors to role=primary globally

We’ve discovered several leftover references to ivory-operator.ivorysql.org/role=master outside of the e2e test:

• internal/naming/selectors_test.go: lines 156–158
• internal/controller/ivorycluster/pgbackrest_test.go: lines 836–838 and 2514–2516
• docs/content/tutorial/high-availability.md: lines 133–135 and 176–178

Please update each of these to use role=primary. For example:

-  --selector=ivory-operator.ivorysql.org/role=master \
+  --selector=ivory-operator.ivorysql.org/role=primary \

It may help to run:

rg -n "ivory-operator.ivorysql.org/role=master"

and verify that all occurrences have been replaced.

🤖 Prompt for AI Agents
In
testing/kuttl/e2e-other/delete-with-replica-and-check-timestamps/13-delete-cluster-and-check.yaml
at line 12, update the selector from 'ivory-operator.ivorysql.org/role=master'
to 'ivory-operator.ivorysql.org/role=primary'. Additionally, perform a global
search across the repository for any remaining occurrences of
'ivory-operator.ivorysql.org/role=master' and replace them with 'role=primary',
including in internal/naming/selectors_test.go,
internal/controller/ivorycluster/pgbackrest_test.go, and
docs/content/tutorial/high-availability.md as indicated.

})

return errors.WithStack(exec.RestartPendingMembers(ctx, "master", naming.PatroniScope(cluster)))
return errors.WithStack(exec.RestartPendingMembers(ctx, "primary", naming.PatroniScope(cluster)))
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

LGTM! Role terminology standardization to "primary".

The change from "master" to "primary" aligns with modern inclusive terminology standards. Ensure that all role-dependent components (Patroni, instance recognition logic, etc.) consistently use the "primary" designation.

Verify that role recognition is consistent across the codebase:


🏁 Script executed:

#!/bin/bash
# Description: Verify consistent role terminology usage across the codebase.

# Search for any remaining "master" role references that might need updating
echo "=== Checking for remaining 'master' role references ==="
rg -i 'role.*master|master.*role' --type go --type yaml

echo "=== Verifying 'primary' role usage ==="
rg -i 'role.*primary|primary.*role' --type go --type yaml

echo "=== Checking RestartPendingMembers function signature ==="
ast-grep --pattern 'func $_ RestartPendingMembers($$$) $$$'

Length of output: 8665


Ensure Complete Migration from “master” to “primary”

A repository-wide search shows numerous remaining references to the old “master” role in both code and tests. To avoid inconsistencies at runtime and in your CI tests, please update every occurrence to the new primary designation. Key areas to address:

• internal/naming/labels.go
– Deprecate or remove RolePatroniLeader = "master" and consolidate on RolePrimary = "primary".
• internal/controller/ivorycluster/instance.go
– Replace checks like Labels[naming.LabelRole] == "master" with == naming.RolePrimary.
• All *_test.go under internal/controller/ivorycluster/
– Change assertions and fixture annotations from "role":"master" or naming.LabelRole: "master" to use "primary" or naming.RolePrimary.
• internal/patroni/reconcile_test.go
– Update pod status annotation tests ({"role":"master"}{"role":"primary"}).
• testing/kuttl/e2e/**/*.yaml
– Replace YAML selectors and asserts that reference master to reference primary.

A global search-and-replace (e.g. rg -l 'master' | xargs sed -i '' 's/master/primary/g') followed by targeted adjustments in constants and tests should help ensure full coverage.

🤖 Prompt for AI Agents
In internal/controller/ivorycluster/patroni.go at line 109, the role terminology
has been updated from "master" to "primary" in the RestartPendingMembers call.
To ensure consistency and avoid runtime or test failures, perform a
repository-wide update replacing all remaining "master" role references with
"primary". This includes constants in internal/naming/labels.go, role checks in
internal/controller/ivorycluster/instance.go, test files under
internal/controller/ivorycluster/, internal/patroni/reconcile_test.go, and YAML
files in testing/kuttl/e2e/. Use a global search-and-replace followed by manual
verification and adjustments to constants and tests to complete the migration.

assert.Assert(t, env.Value == "backup")
case "COMMAND_OPTS":
assert.Assert(t, env.Value == "--stanza=db --repo=1")
assert.Assert(t, env.Value == "--stanza=db --repo=1 --pg-version-force=13")
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Version inconsistency in pgBackRest tests

There's an inconsistency between the PostgreSQL versions used in different parts of the tests. This test expects --pg-version-force=13, but other tests in the same file expect pg-version-force = 17 in configuration strings (lines 2105, 2122, 2137, 2156), while the fakeIvoryCluster function sets PostgresVersion: 13 (line 75).

This inconsistency should be resolved by either:

  1. Using PostgreSQL version 13 consistently throughout all tests
  2. Using PostgreSQL version 17 consistently throughout all tests
  3. Making the version configurable and testing both scenarios

Apply this diff to align with the PostgreSQL 17 version used elsewhere:

-    assert.Assert(t, env.Value == "--stanza=db --repo=1 --pg-version-force=13")
+    assert.Assert(t, env.Value == "--stanza=db --repo=1 --pg-version-force=17")

Additionally, consider updating the fakeIvoryCluster function to use PostgreSQL 17 consistently or parameterizing the version for better test flexibility.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert.Assert(t, env.Value == "--stanza=db --repo=1 --pg-version-force=13")
assert.Assert(t, env.Value == "--stanza=db --repo=1 --pg-version-force=17")
🤖 Prompt for AI Agents
In internal/controller/ivorycluster/pgbackrest_test.go at line 957, the test
asserts the pgBackRest command uses --pg-version-force=13, which conflicts with
other tests and the fakeIvoryCluster setup that use version 17. To fix this,
update the assertion at line 957 to expect --pg-version-force=17, and also
modify the fakeIvoryCluster function around line 75 to set PostgresVersion to 17
for consistency across tests. Alternatively, consider parameterizing the
PostgresVersion in fakeIvoryCluster and tests to support both versions if
needed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
ivyo_release_notes.md (3)

22-30: Fix list indentation to use spaces instead of hard tabs
The nested list under “组件版本升级” is indented with hard tabs and inconsistent spacing. Convert tabs to two spaces (per markdownlint’s MD007/MD010) for proper rendering.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

22-22: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


22-22: Hard tabs
Column: 1

(MD010, no-hard-tabs)


23-23: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


23-23: Hard tabs
Column: 1

(MD010, no-hard-tabs)


24-24: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


24-24: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


25-25: Hard tabs
Column: 1

(MD010, no-hard-tabs)


26-26: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


26-26: Hard tabs
Column: 1

(MD010, no-hard-tabs)


27-27: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


27-27: Hard tabs
Column: 1

(MD010, no-hard-tabs)


28-28: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


28-28: Hard tabs
Column: 1

(MD010, no-hard-tabs)


29-29: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


29-29: Hard tabs
Column: 1

(MD010, no-hard-tabs)


30-30: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


30-30: Hard tabs
Column: 1

(MD010, no-hard-tabs)


34-38: Normalize nested list indentation under 4.0 components
The component upgrade list for 4.0 uses four spaces. Align it with the two-space convention:

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

34-34: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


36-36: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


37-37: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


38-38: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


40-45: Replace hard tabs in plugin upgrade list with spaces
Lines 40–45 contain hard tabs at the start—switch to two-space indentation to satisfy markdownlint:

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

40-40: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


40-40: Hard tabs
Column: 1

(MD010, no-hard-tabs)


41-41: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


41-41: Hard tabs
Column: 1

(MD010, no-hard-tabs)


42-42: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


42-42: Hard tabs
Column: 1

(MD010, no-hard-tabs)


43-43: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


44-44: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


44-44: Hard tabs
Column: 1

(MD010, no-hard-tabs)


45-45: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


45-45: Hard tabs
Column: 1

(MD010, no-hard-tabs)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e24868 and a64f2f2.

📒 Files selected for processing (2)
  • ivyo_release_notes.md (1 hunks)
  • ivyo_release_notes.txt (0 hunks)
💤 Files with no reviewable changes (1)
  • ivyo_release_notes.txt
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
ivyo_release_notes.md

22-22: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


22-22: Hard tabs
Column: 1

(MD010, no-hard-tabs)


23-23: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


23-23: Hard tabs
Column: 1

(MD010, no-hard-tabs)


24-24: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


24-24: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


25-25: Hard tabs
Column: 1

(MD010, no-hard-tabs)


26-26: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


26-26: Hard tabs
Column: 1

(MD010, no-hard-tabs)


27-27: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


27-27: Hard tabs
Column: 1

(MD010, no-hard-tabs)


28-28: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


28-28: Hard tabs
Column: 1

(MD010, no-hard-tabs)


29-29: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


29-29: Hard tabs
Column: 1

(MD010, no-hard-tabs)


30-30: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


30-30: Hard tabs
Column: 1

(MD010, no-hard-tabs)


34-34: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


36-36: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


37-37: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


38-38: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


40-40: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


40-40: Hard tabs
Column: 1

(MD010, no-hard-tabs)


41-41: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


41-41: Hard tabs
Column: 1

(MD010, no-hard-tabs)


42-42: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


42-42: Hard tabs
Column: 1

(MD010, no-hard-tabs)


43-43: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


44-44: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


44-44: Hard tabs
Column: 1

(MD010, no-hard-tabs)


45-45: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


45-45: Hard tabs
Column: 1

(MD010, no-hard-tabs)

⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: kuttl-k3d (v1.22)
  • GitHub Check: kuttl-k3d (v1.23)
  • GitHub Check: kuttl-k3d (v1.25)
  • GitHub Check: kuttl-k3d (v1.24)
  • GitHub Check: kuttl-k3d (v1.21)
  • GitHub Check: kubernetes-k3d (v1.25)
  • GitHub Check: kubernetes-k3d (v1.28)
  • GitHub Check: kubernetes-api (1.23.5)
  • GitHub Check: golangci-lint
🔇 Additional comments (2)
ivyo_release_notes.md (2)

1-46: Confirm language consistency for release notes
The document mixes English headings with Chinese item descriptions. If this project’s primary language is English, consider translating the bullet points or providing bilingual support to ensure clarity for all contributors.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

22-22: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


22-22: Hard tabs
Column: 1

(MD010, no-hard-tabs)


23-23: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


23-23: Hard tabs
Column: 1

(MD010, no-hard-tabs)


24-24: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


24-24: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


25-25: Hard tabs
Column: 1

(MD010, no-hard-tabs)


26-26: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


26-26: Hard tabs
Column: 1

(MD010, no-hard-tabs)


27-27: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


27-27: Hard tabs
Column: 1

(MD010, no-hard-tabs)


28-28: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


28-28: Hard tabs
Column: 1

(MD010, no-hard-tabs)


29-29: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


29-29: Hard tabs
Column: 1

(MD010, no-hard-tabs)


30-30: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


30-30: Hard tabs
Column: 1

(MD010, no-hard-tabs)


34-34: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


36-36: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


37-37: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


38-38: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


40-40: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


40-40: Hard tabs
Column: 1

(MD010, no-hard-tabs)


41-41: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


41-41: Hard tabs
Column: 1

(MD010, no-hard-tabs)


42-42: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


42-42: Hard tabs
Column: 1

(MD010, no-hard-tabs)


43-43: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


44-44: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


44-44: Hard tabs
Column: 1

(MD010, no-hard-tabs)


45-45: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


45-45: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1-46: Great addition of detailed release notes!
This new file comprehensively documents versions 1.0, 1.1, 2.0, and 4.0, aligning well with the PR’s updates to supported versions and component upgrades.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

22-22: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


22-22: Hard tabs
Column: 1

(MD010, no-hard-tabs)


23-23: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


23-23: Hard tabs
Column: 1

(MD010, no-hard-tabs)


24-24: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


24-24: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


25-25: Hard tabs
Column: 1

(MD010, no-hard-tabs)


26-26: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


26-26: Hard tabs
Column: 1

(MD010, no-hard-tabs)


27-27: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


27-27: Hard tabs
Column: 1

(MD010, no-hard-tabs)


28-28: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


28-28: Hard tabs
Column: 1

(MD010, no-hard-tabs)


29-29: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


29-29: Hard tabs
Column: 1

(MD010, no-hard-tabs)


30-30: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


30-30: Hard tabs
Column: 1

(MD010, no-hard-tabs)


34-34: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


36-36: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


37-37: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


38-38: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


40-40: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


40-40: Hard tabs
Column: 1

(MD010, no-hard-tabs)


41-41: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


41-41: Hard tabs
Column: 1

(MD010, no-hard-tabs)


42-42: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


42-42: Hard tabs
Column: 1

(MD010, no-hard-tabs)


43-43: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


44-44: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


44-44: Hard tabs
Column: 1

(MD010, no-hard-tabs)


45-45: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


45-45: Hard tabs
Column: 1

(MD010, no-hard-tabs)

@gaoxueyu gaoxueyu merged commit 20a1255 into IvorySQL:master May 29, 2025
30 of 35 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 20, 2025
10 tasks
This was referenced Dec 11, 2025
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.

2 participants