Skip to content

[#FIX] Disable compilation of unit tests in postgres lib - #1218

Merged
andre-senna merged 1 commit into
masterfrom
senna-fix-postgres-build-1
Aug 4, 2026
Merged

[#FIX] Disable compilation of unit tests in postgres lib#1218
andre-senna merged 1 commit into
masterfrom
senna-fix-postgres-build-1

Conversation

@andre-senna

Copy link
Copy Markdown
Contributor

In MacOS this step in our Dockerfile was flaky:

RUN cd /tmp \
    && tar xzvf libpqxx-7.10.5.tar.gz \
    && cd /tmp/libpqxx-7.10.5 \
    && cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON\
    && cmake --build build -j \
    && cmake --install build \
    && ldconfig

The first cmake commands sometimes breaks with:

46.11 c++: fatal error: Killed signal terminated program cc1plus
46.12 compilation terminated.
46.18 gmake[2]: *** [test/CMakeFiles/runner.dir/build.make:678: test/CMakeFiles/runner.dir/unit/test_array.cxx.o] Error 1
46.20 gmake[2]: *** Waiting for unfinished jobs....
48.59 c++: fatal error: Killed signal terminated program cc1plus
48.59 compilation terminated.
48.67 gmake[2]: *** [test/CMakeFiles/runner.dir/build.make:1182: test/CMakeFiles/runner.dir/unit/test_test_helpers.cxx.o] Error 1
52.66 c++: fatal error: Killed signal terminated program cc1plus
52.66 compilation terminated.
52.71 gmake[2]: *** [test/CMakeFiles/runner.dir/build.make:90: test/CMakeFiles/runner.dir/test00.cxx.o] Error 1
54.32 c++: fatal error: Killed signal terminated program cc1plus
54.32 compilation terminated.
54.42 gmake[2]: *** [test/CMakeFiles/runner.dir/build.make:398: test/CMakeFiles/runner.dir/test60.cxx.o] Error 1
76.43 gmake[1]: *** [CMakeFiles/Makefile2:160: test/CMakeFiles/runner.dir/all] Error 2
76.43 gmake: *** [Makefile:156: all] Error 2

This flakiness were also reported to happen in our pipeline as well.

In this PR, I disable the unit tests compilation in libpqxx since this is where the error is happening and we don't really need these unit tests.

@andre-senna andre-senna self-assigned this Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 16fd91ea-7951-4a04-9399-9250c0a34a36

📥 Commits

Reviewing files that changed from the base of the PR and between e49e9e6 and 5ccedf9.

📒 Files selected for processing (1)
  • src/docker/Dockerfile

  • Adds -DSKIP_BUILD_TEST=ON to the libpqxx CMake build.
  • Prevents libpqxx unit-test compilation, which reduces parallel build memory use and avoids intermittent Killed signal failures on macOS and CI.
  • The change affects build-time test compilation only. It does not change runtime behavior, thread safety, error handling, or hot-path allocations.
  • No matching test changes are present in src/tests/ or client test suites because the project does not require the disabled libpqxx unit tests.
  • The main quality risk is reduced validation of libpqxx itself during the build. The project’s own tests remain unaffected.

Walkthrough

The Dockerfile now passes -DSKIP_BUILD_TEST=ON when it builds libpqxx 7.10.5. Existing build type and position-independent code options remain unchanged.

Changes

libpqxx Docker build

Layer / File(s) Summary
Skip libpqxx test builds
src/docker/Dockerfile
The CMake command adds -DSKIP_BUILD_TEST=ON while retaining the existing build options.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: marcocapzzoli

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that libpqxx unit test compilation is disabled, which matches the primary change.
Description check ✅ Passed The description explains the macOS and pipeline failures and the change that disables unnecessary libpqxx unit test compilation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Tests For Behavior Changes ✅ Passed PR modifies only Docker infrastructure configuration (src/docker/Dockerfile), adding -DSKIP_BUILD_TEST=ON flag to libpqxx build. No production code changes; CI/config-only modification satisfies cr...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch senna-fix-postgres-build-1

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

Comment @coderabbitai help to get the list of available commands.

@andre-senna
andre-senna merged commit 2c19177 into master Aug 4, 2026
4 checks passed
@andre-senna
andre-senna deleted the senna-fix-postgres-build-1 branch August 4, 2026 14:13
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.

1 participant