Skip to content

feat: add YugabyteDB as a compatibility-tested database#315

Open
driessamyn wants to merge 1 commit into
mainfrom
feature/add-yugabytedb-compat
Open

feat: add YugabyteDB as a compatibility-tested database#315
driessamyn wants to merge 1 commit into
mainfrom
feature/add-yugabytedb-compat

Conversation

@driessamyn
Copy link
Copy Markdown
Owner

@driessamyn driessamyn commented Mar 23, 2026

Summary

  • Adds YugabyteDB compatibility testing (PostgreSQL wire-compatible, auto-detected as DbFlavour.POSTGRESQL)
  • Uses YugabyteDBYSQLContainer with 3-min startup timeout
  • Added to nightly compatibility-test CI matrix

Test plan

  • Integration tests pass locally with -Ddb=YUGABYTEDB
  • CI compatibility-test job runs successfully

Summary by CodeRabbit

  • New Features

    • YugabyteDB added as an officially supported database option.
  • Bug Fixes / CI

    • Continuous integration expanded to run integration tests against YugabyteDB and set matrix runs to not cancel on failure.
  • Documentation

    • README updated to include a YugabyteDB badge indicating support.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 73820bf4-cdad-4822-8fd5-a8f75d84bda8

📥 Commits

Reviewing files that changed from the base of the PR and between ee0e655 and 3c25510.

📒 Files selected for processing (4)
  • .github/workflows/build-and-test.yml
  • README.md
  • core/src/integrationTest/kotlin/net/samyn/kapper/AbstractDbTests.kt
  • gradle/libs.versions.toml
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • core/src/integrationTest/kotlin/net/samyn/kapper/AbstractDbTests.kt
  • gradle/libs.versions.toml

📝 Walkthrough

Walkthrough

YugabyteDB was added to the project's integration test matrix and tooling: CI workflow matrix expanded, Testcontainers-based YugabyteDB test container wired into integration tests, JDBC and Testcontainers dependencies added to libs, and a YugabyteDB badge added to the README.

Changes

Cohort / File(s) Summary
CI workflow
.github/workflows/build-and-test.yml
Expanded compatibility-test matrix to include YUGABYTEDB and set fail-fast: false so matrix runs continue independently. Test/publish steps will now run per matrix.db.
Integration tests
core/src/integrationTest/kotlin/net/samyn/kapper/AbstractDbTests.kt
Added lazily-started YugabyteDBYSQLContainer (image yugabytedb/yugabyte:2024.2.8.0-b85) with a 3-minute startup timeout and registered it under "YUGABYTEDB" in the DB connection map.
Dependency declarations
gradle/libs.versions.toml
Added yugabytedb-driver = "42.7.3-yb-4", com.yugabyte:jdbc-yugabytedb library entry, Testcontainers org.testcontainers:yugabytedb library, and included them in test-dbs/test-containers bundles.
Documentation
README.md
Inserted a YugabyteDB shields.io badge into the top technology/support badges list.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    rect rgba(220,230,241,0.5)
    CI->>Gradle: Trigger matrix job (db = MARIADB / YUGABYTEDB)
    end
    rect rgba(200,240,200,0.5)
    Gradle->>TestRunner: run integrationTest -Ddb=${matrix.db}
    end
    rect rgba(255,235,205,0.5)
    TestRunner->>Testcontainers: Start DB container (selected by matrix)
    Testcontainers->>YugabyteDB: Launch yugabytedb/yugabyte image
    end
    rect rgba(240,220,255,0.5)
    TestRunner->>Database: Run integration tests against DB
    Database-->>TestRunner: Test results
    end
    rect rgba(230,240,250,0.5)
    TestRunner->>CI: Publish artifacts & test reports (named by matrix.db)
    CI-->>Stakeholders: Store artifacts / report status
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

run-compat-tests

Poem

🐰 I hopped into CI with a cheerful spin,
Yugabyte joined — let testing begin!
Containers hum, JDBC wakes the day,
Tests run, badges gleam, we bounce away.
🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add YugabyteDB as a compatibility-tested database' clearly and concisely summarizes the main change: adding YugabyteDB support to the compatibility testing matrix across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-yugabytedb-compat

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

Copy link
Copy Markdown

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

🧹 Nitpick comments (1)
.github/workflows/build-and-test.yml (1)

127-129: Consider adding fail-fast: false for robustness.

The integration-test job (line 87) explicitly sets fail-fast: false to ensure all database tests run even if one fails. The compatibility-test job doesn't have this setting, so if MARIADB fails, YUGABYTEDB won't run (and vice versa). This may be intentional, but for consistency and better test coverage visibility, consider:

     strategy:
+      fail-fast: false
       matrix:
         db: [ MARIADB, YUGABYTEDB ]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-and-test.yml around lines 127 - 129, The
compatibility-test job's matrix currently lists db: [ MARIADB, YUGABYTEDB ] but
doesn't set fail-fast, so add fail-fast: false under the compatibility-test
job's strategy (next to the existing matrix) to ensure all matrix variations (db
values in the matrix) run even if one fails; reference the compatibility-test
job and the strategy.matrix.db entries when making this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/build-and-test.yml:
- Around line 127-129: The compatibility-test job's matrix currently lists db: [
MARIADB, YUGABYTEDB ] but doesn't set fail-fast, so add fail-fast: false under
the compatibility-test job's strategy (next to the existing matrix) to ensure
all matrix variations (db values in the matrix) run even if one fails; reference
the compatibility-test job and the strategy.matrix.db entries when making this
change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2e6d3b87-1153-49e8-baf2-83dac5aff04b

📥 Commits

Reviewing files that changed from the base of the PR and between c431fe4 and ee0e655.

📒 Files selected for processing (4)
  • .github/workflows/build-and-test.yml
  • README.md
  • core/src/integrationTest/kotlin/net/samyn/kapper/AbstractDbTests.kt
  • gradle/libs.versions.toml

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

Unit Tests

 61 files  ±0   61 suites  ±0   3m 8s ⏱️ +6s
517 tests ±0  517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
533 runs  ±0  533 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3c25510. ± Comparison against base commit c431fe4.

This pull request removes 40 and adds 40 tests. Note that renamed tests count towards both.
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [10] LONGNVARCHAR, "LONGNVARCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1058/0x00007fba4c56aa20@51e1ee5b
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [11] LONGVARCHAR, "LONGVARCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1059/0x00007fba4c56ac40@539bf3b2
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [12] INSTANT, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$960/0x00007fba4c545fe0@6802358e
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [12] NCHAR, "NCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1060/0x00007fba4c56a400@1ff4c3e
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [13] DATE, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$961/0x00007fba4c546200@c210026
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [13] NCLOB, "NCLOB", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1061/0x00007fba4c570000@2bb34cd4
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [14] LOCALDATE, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$962/0x00007fba4c546420@35c14d35
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [14] NVARCHAR, "NVARCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1062/0x00007fba4c570220@6a38c79f
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [15] LOCALDATETIME, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$963/0x00007fba4c546640@4d81e2ae
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [15] ROWID, "ROWID", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1063/0x00007fba4c570440@77e734
…
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [10] LONGNVARCHAR, "LONGNVARCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1068/0x00007f9a20580440@50890f96
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [11] LONGVARCHAR, "LONGVARCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1069/0x00007f9a20580660@149b7541
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [12] INSTANT, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$973/0x00007f9a20557c28@457124d6
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [12] NCHAR, "NCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1070/0x00007f9a20580880@60fe5cfd
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [13] DATE, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$974/0x00007f9a20555000@473ee02a
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [13] NCLOB, "NCLOB", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1071/0x00007f9a20580aa0@2fc3bf51
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [14] LOCALDATE, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$975/0x00007f9a20555220@27d6543c
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [14] NVARCHAR, "NVARCHAR", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1072/0x00007f9a20580cc0@e2026fe
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [15] LOCALDATETIME, net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$976/0x00007f9a20555440@44305195
net.samyn.kapper.internal.automapper.SQLTypesConverterTest ‑ [15] ROWID, "ROWID", net.samyn.kapper.internal.automapper.SQLTypesConverterTest$Companion$$Lambda$1073/0x00007f9a20580ee0@cded242
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

Code Coverage

Total Project Coverage 98.17%

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

DUCKDB Integration Tests

10 files  ±0  10 suites  ±0   26s ⏱️ +2s
46 tests ±0  46 ✅ ±0  0 💤 ±0  0 ❌ ±0 
76 runs  ±0  76 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3c25510. ± Comparison against base commit c431fe4.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

POSTGRESQL Integration Tests

10 files  ±0  10 suites  ±0   27s ⏱️ -2s
46 tests ±0  46 ✅ ±0  0 💤 ±0  0 ❌ ±0 
76 runs  ±0  76 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3c25510. ± Comparison against base commit c431fe4.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

SQLITE Integration Tests

10 files  ±0  10 suites  ±0   25s ⏱️ -3s
46 tests ±0  46 ✅ ±0  0 💤 ±0  0 ❌ ±0 
76 runs  ±0  76 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3c25510. ± Comparison against base commit c431fe4.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

MSSQLSERVER Integration Tests

10 files  ±0  10 suites  ±0   49s ⏱️ +4s
46 tests ±0  46 ✅ ±0  0 💤 ±0  0 ❌ ±0 
76 runs  ±0  76 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3c25510. ± Comparison against base commit c431fe4.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

MYSQL Integration Tests

10 files  ±0  10 suites  ±0   48s ⏱️ -1s
46 tests ±0  46 ✅ ±0  0 💤 ±0  0 ❌ ±0 
76 runs  ±0  76 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3c25510. ± Comparison against base commit c431fe4.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

ORACLE Integration Tests

10 files  ±0  10 suites  ±0   1m 18s ⏱️ -3s
46 tests ±0  46 ✅ ±0  0 💤 ±0  0 ❌ ±0 
76 runs  ±0  76 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3c25510. ± Comparison against base commit c431fe4.

♻️ This comment has been updated with latest results.

@driessamyn driessamyn force-pushed the feature/add-yugabytedb-compat branch from ee0e655 to 3c25510 Compare March 24, 2026 07:57
@sonarqubecloud
Copy link
Copy Markdown

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