Skip to content

CI: add Cloudberry main support - #124

Merged
tuhaihe merged 3 commits into
apache:mainfrom
tuhaihe:cc/cloudberry-main-ci-support-1ddfc8
Oct 23, 2026
Merged

tuhaihe merged 3 commits into
apache:mainfrom
tuhaihe:cc/cloudberry-main-ci-support-1ddfc8

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Oct 22, 2026

Copy link
Copy Markdown
Member

closes: #ISSUE_Number


Change logs

Describe your change clearly, including what problem is being solved or what document is being added or updated.

Contributor's checklist

Here are some reminders before you submit your pull request:

@tuhaihe
tuhaihe marked this pull request as draft October 22, 2026 03:21
tuhaihe and others added 3 commits October 22, 2026 16:27
Cloudberry main (the future 3.x) is now on the PG16 kernel. Running the
suites against it gives 8 integration failures and 1 end_to_end
failure. Both suites pass on REL_2_STABLE. All of the failures come
from PG16 behavior changes, not from gpbackup bugs:

- A superuser that grants a membership without GRANTED BY is now
  recorded as the bootstrap superuser, not as itself.
- A role named in GRANTED BY must hold ADMIN OPTION on the granted
  role, even when it is a superuser.
- A role that granted a membership can no longer be dropped while
  that membership exists, so the "dropped granter" case cannot be
  set up at all.
- pg_get_viewdef() no longer qualifies the columns of a single-table
  query.

Add testutils.IsCBDB3OrLater() and use it to set up and check these
cases per version. It compares SemVer.Major directly because a main
build reports "3.0.0-devel", which sorts before "3.0.0" under semver,
so Version.AtLeast("3") returns false.

The membership tests now also match on the member, since granting
ADMIN OPTION to testrole first adds a second row for usergroup.

Tested on a demo cluster on Cloudberry main (PG 16.9) and on
REL_2_STABLE (PG 14.10): integration and end_to_end pass on both.

See: apache#103

Assisted-by: Claude Code
CI was pinned to Cloudberry REL_2_STABLE in deeb094 because main moved
to the PG16 kernel and broke some tests. That left Cloudberry main
(the future 3.x) without any coverage.

Turn the Cloudberry branch into a matrix dimension, so that every test
target runs against both REL_2_STABLE and main. Artifact names and job
names now include the branch. The test job runs with !cancelled(), so a
failed build on one branch does not skip the test jobs of the other.

Also fix the regression target on main. Its minimal_schedule tests now
expect the shared tables (char_tbl, int2_tbl, ...) to exist already,
and those tables are created by test_setup. Without test_setup, 5 of
the 7 tests failed and the regression database being backed up was
almost empty. Run test_setup first wherever it exists. On
REL_2_STABLE all tests still pass and the schema diff is unchanged.

Tested by running every target on a demo cluster on Cloudberry main
in the CI build image.

Assisted-by: Claude Code
GetForeignDataWrappers() and GetForeignServers() have no ORDER BY, so
the database may return their rows in any order. The integration test
"creates foreign data wrappers with a validator and options" indexes
the result as [0] and [1], and it failed on the Cloudberry main leg of
CI with the two wrappers swapped. The same run had passed earlier on a
local main cluster only by chance.

Order both queries by oid. That makes the tests deterministic, and the
backup now writes these objects in a stable order too.

This change is taken from Jinbao Chen's PR apache#106.

See: apache#106

Co-authored-by: Jinbao Chen <chenjinbao1989@gmail.com>
Assisted-by: Claude Code
@tuhaihe
tuhaihe force-pushed the cc/cloudberry-main-ci-support-1ddfc8 branch from 80dd22c to 7e81890 Compare October 22, 2026 08:27
@tuhaihe
tuhaihe marked this pull request as ready for review October 22, 2026 08:27

@leborchuk leborchuk 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.

LGTM, we have 2 active branches, need tests for both of them. I checked matrix for tests - all looks good

@tuhaihe

tuhaihe commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Let's merge it. If anything wrong, we can always revert or create a new fix.

@tuhaihe
tuhaihe merged commit 8b045de into apache:main Oct 23, 2026
39 checks passed
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