Skip to content

Add new build option and refactor CI to test changes - #72

Open
leborchuk wants to merge 14 commits into
lithium-tech:mainfrom
leborchuk:ExtTableAsOption
Open

Add new build option and refactor CI to test changes#72
leborchuk wants to merge 14 commits into
lithium-tech:mainfrom
leborchuk:ExtTableAsOption

Conversation

@leborchuk

@leborchuk leborchuk commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Here I added new build option TEA_BUILD_EXT.

Option should be enabled for adb-based distributions and disabled for open-gpdb based. But current CI does not enable easily test it.

So to build binaries and check code I made refactoring in CI. Goals was to speed up tests and use traditional pg_regress approach for check if database works as expected. Detailed list of changes:

  1. A new option for building tea without support EXT tables TEA_BUILD_EXT. By default is ON for adb and OFF for open-gpdb.

  2. Add pg_regress tests where I check if working with tea + fdw and tea + ext tables works as expected (using traditional approach with executing sql and compare them with expected output). Create simple extension Makefile to do it. Tests will fail if we enable TEA_BUILD_EXT in open-gpdb without fixing CI too.

  3. Add Summary report, logging errors and downloading them to github actions - for better debugging.

  4. Launch all checks inside pre-defined container ghcr.io/lithium-tech/tea-build:ubuntu22.04-latest - no need to install dependencies and compile additional components like arrow && grpc.

I Added new option for building tea without support EXT tables. In order to check if everything is Ok we need regress tests

So I added launch regress tests (cannot use cmake files for it, create usual for extensions Makefile) check.

And logging errors and downloading them to github actions - for better debugging.

All workflow now executes inside building container so no need to spend 40 minutes compiling arrow and grpc.
Copilot AI review requested due to automatic review settings July 24, 2026 14:14
@leborchuk
leborchuk marked this pull request as draft July 24, 2026 14:14

Copilot AI 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.

Pull request overview

This PR updates the build/test pipeline to run inside a prebuilt container image, adds a CMake toggle to build Tea without external-table (custom protocol) support, and introduces a PGXS pg_regress installcheck suite to validate the extension behavior in CI.

Changes:

  • Add TEA_BUILD_EXT option and conditionally compile/install Tea external-table protocol pieces.
  • Add a PGXS Makefile + pg_regress test (tea_extension) and a CI runner script to stage under gpdb/gpcontrib.
  • Move build/smoke/REST GitHub Actions jobs into the container image and upload logs/results artifacts for debugging.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CMakeLists.txt Introduces TEA_BUILD_EXT CMake option to toggle external-table support.
tea/gpext/CMakeLists.txt Conditionally compiles external-table sources only when TEA_BUILD_EXT is enabled.
extension/CMakeLists.txt Conditionally injects external-table SQL (and metrics SQL) into generated extension scripts based on TEA_BUILD_EXT.
extension/Makefile Adds PGXS installcheck harness for running pg_regress in CI.
extension/sql/tea_extension.sql Adds pg_regress SQL verifying extension presence, FDW path, and expected behavior when external tables are disabled.
extension/expected/tea_extension.out Adds expected output for the new tea_extension pg_regress test.
ci/run-pg-regress.sh Stages repo under gpdb/gpcontrib/tea and runs make installcheck, collecting logs/results.
ci/build-tea.sh Builds Tea in CI with TEA_BUILD_EXT=OFF.
ci/build-gpdb.sh Keeps the gpdb source directory (needed later for staging pg_regress).
.github/workflows/build.yml Runs build/tests in the container, runs pg_regress, and uploads logs/results artifacts.
.github/workflows/smoke-tests.yml Runs smoke tests in the container and uploads logs/results/regression artifacts.
.github/workflows/ci.yml Adds permissions/concurrency, moves relevant jobs into the container approach, and uploads REST logs/artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ci/build-tea.sh Outdated
Comment thread ci/run-pg-regress.sh
Comment thread extension/sql/tea_extension.sql Outdated
@leborchuk
leborchuk marked this pull request as ready for review July 27, 2026 14:48
@leborchuk leborchuk changed the title Build using container && add pg_regress tests Refactor CI to launch inside build using container and using pg_regress tests Jul 28, 2026
Comment thread extension/sql/tea_extension.sql Outdated
Comment thread extension/sql/tea_extension.sql Outdated
Comment thread extension/sql/tea_extension.sql Outdated
@leborchuk
leborchuk marked this pull request as draft July 29, 2026 08:34
@leborchuk
leborchuk marked this pull request as ready for review July 29, 2026 16:08
@leborchuk leborchuk changed the title Refactor CI to launch inside build using container and using pg_regress tests Add new build option and refactor CI to test changes Jul 29, 2026
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.

3 participants