Skip to content

CI: run the PL/Python regression tests - #2250

Open
tuhaihe wants to merge 4 commits into
apache:mainfrom
tuhaihe:ci-plpython
Open

tuhaihe wants to merge 4 commits into
apache:mainfrom
tuhaihe:ci-plpython

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Nov 5, 2026

Copy link
Copy Markdown
Member

CI does not run the regression tests in src/pl/plpython, so nobody sees when PL/Python breaks.

Add an ic-plpython test job that runs them on Rocky 8, 9 and 10.

Assisted-by: Claude Code

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


CI does not run the regression tests in src/pl/plpython, so nobody sees
when PL/Python breaks.

Add an ic-plpython test job that runs them on Rocky 8, 9 and 10.

Assisted-by: Claude Code
PostgreSQL 16 does not have the plpythonu language any more, but the
Cloudberry tests plpython_gpdb, plpython_test and
plpython_subtransaction still use it.  So their functions are not
created.  In plpython_subtransaction this is worse: test_func() does not
exist, so the injected fault never triggers, and
gp_wait_until_triggered_fault() waits until the test times out.

Use plpython3u, as the upstream tests do.

Assisted-by: Claude Code
The REL_16_9 merge took the upstream REGRESS_OPTS and lost
--init-file=$(srcdir)/init_file.  This file hides the NOTICE and HINT
about the distribution key, and the "(plpy_elog.c:N)" position that
Cloudberry adds to PL/Python errors.  Without it, 9 more tests fail on
these lines only.

Use the init file again.

Assisted-by: Claude Code
The REL_16_9 merge took the upstream expected output of three tests and
lost the Cloudberry differences:

- plpython_trigger: Cloudberry does not allow an UPDATE of the
  distribution key of a table with an update trigger.
- plpython_error_5: Cloudberry puts the function name in "error
  fetching next item from iterator".
- plpython_transaction: Cloudberry does not enforce foreign keys, so
  the test injects a fault to fail the COMMIT.  The error and its
  SQLSTATE come from the fault.

Restore the output that the tests had before the merge.  Now all 24
tests pass on Rocky 8, 9 and 10.

Assisted-by: Claude Code

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

LGTM

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