Skip to content

Comments

Introduce support for liveness check for MSSQL CDC listener#1168

Merged
gayaldassanayake merged 4 commits intoballerina-platform:mainfrom
ayeshLK:main
Feb 18, 2026
Merged

Introduce support for liveness check for MSSQL CDC listener#1168
gayaldassanayake merged 4 commits intoballerina-platform:mainfrom
ayeshLK:main

Conversation

@ayeshLK
Copy link
Member

@ayeshLK ayeshLK commented Feb 14, 2026

Purpose

$subject

Part of: ballerina-platform/ballerina-library#8589

Checklist

  • Linked to an issue
  • Updated the specification
  • Updated the changelog
  • Added tests
  • Checked native-image compatibility

Summary

Adds liveness check support to the MSSQL CDC listener by extending internal listener configuration to include a configurable livenessInterval and refactoring how configurations are assembled and stored.

Changes

  • Liveness support and configuration refactor:

    • Internal config map type changed from map to map to allow non-string values.
    • Introduced debeziumConfigs to collect Debezium, database, and MSSQL-specific settings; replaced prior configMap usage.
    • Built listenerConfigs as a shallow copy of debeziumConfigs and added a new livenessInterval field sourced from the config.
    • CdcListener.config is now a read-only clone of listenerConfigs.
  • Dependency and packaging updates:

    • gradle.properties: multiple dependency version bumps (notably stdlibCdcVersion to 1.2.0-20260213-180200-2268a4d and several standard library bumps).
    • ballerina/Ballerina.toml and CompilerPlugin.toml: package version bumped to 1.16.3 and native/compiler-plugin artifact paths updated to SNAPSHOT versions.
    • ballerina/Dependencies.toml: multiple package version bumps and new package declarations (including avro, confluent.cavroserdes, confluent.cregistry, kafka, and mssql), which expand the project’s public dependency graph.

Impact

  • No intended public API changes; the modifications are internal configuration and typing changes but may affect downstream code that relied on the previous internal config shape or typing.
  • Checklist items not completed in this PR: updated specification, changelog, tests, and native-image compatibility verification.

@coderabbitai
Copy link

coderabbitai bot commented Feb 14, 2026

📝 Walkthrough

Walkthrough

Refactors internal listener configuration to use map<anydata>, route population through a new debeziumConfigs map, create a shallow-copied listenerConfigs augmented with livenessInterval, and store it as a read-only config. Also bumps multiple dependency and manifest versions.

Changes

Cohort / File(s) Summary
Configuration refactor
ballerina/cdc_listener.bal
Changed internal config type from map<string> to map<anydata>. Introduced debeziumConfigs as the target for configuration population, replaced uses of the previous configMap, created listenerConfigs as a shallow copy with a new livenessInterval field, and set self.config to a read-only clone. Updated CdcListener field declaration to map<anydata> & readonly.
Gradle version updates
gradle.properties
Bumped multiple dependency version properties (e.g., stdlibTime, stdlibLog, stdlibCdc, observe, crypto, task, http, etc.).
Package manifest bumps
ballerina/Ballerina.toml, ballerina/CompilerPlugin.toml
Incremented package version (1.16.2 → 1.16.3) and updated referenced native/compiler plugin artifact paths to -1.16.3-SNAPSHOT.
Dependencies rework
ballerina/Dependencies.toml
Added new packages (avro, confluent.cavroserdes, confluent.cregistry, kafka, mssql), bumped many package versions, removed several scope entries, and reorganized dependency graphs (notably cdc, confluent.*, and kafka integrations).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hopped through maps both new and old,
Debezium buckets I neatly hold,
A listener wakes with liveness bright,
Read-only cloak for cosy night,
Version bumps—I'm bounding out of sight! 🎵

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Introduce support for liveness check for MSSQL CDC listener' directly corresponds to the main code change in cdc_listener.bal where livenessInterval is added to configuration.
Description check ✅ Passed The description follows the template structure with Purpose and Checklist sections, includes a linked issue reference, and covers the core intent; however, Examples section is missing and most checklist items remain unchecked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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

Copy link

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@gradle.properties`:
- Line 33: The gradle property stdlibCdcVersion is set to an
internal/timestamped build (1.2.0-20260213-180200-2268a4d) which is not
published; change the value of stdlibCdcVersion to a published release (e.g.,
1.0.3) so dependency resolution succeeds, or if the internal build is required,
add/configure the custom Maven repository where that artifact is hosted and
document this in the build configuration; update the stdlibCdcVersion entry
accordingly and ensure any repo settings used by Gradle are committed alongside
it.
🧹 Nitpick comments (1)
ballerina/cdc_listener.bal (1)

52-56: Add tests for livenessInterval propagation.

Please add/extend tests to assert that livenessInterval is included in the final listener config (including default/disabled scenarios).

observeInternalVersion=1.5.0

stdlibCdcVersion=1.0.2
stdlibCdcVersion=1.2.0-20260213-180200-2268a4d
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

ballerinax CDC 1.2.0-20260213-180200-2268a4d published artifact

💡 Result:

I couldn’t find any publicly published artifact (Ballerina Central or otherwise indexed by web search) for ballerinax/cdc with the exact version 1.2.0-20260213-180200-2268a4d.

What is publicly visible on Ballerina Central right now is:

  • ballerinax/cdc latest = 1.0.3 (and the “Other versions” list shown there does not include any 1.2.0-* build) [1].
  • Related CDC components (e.g., ballerinax/mysql.cdc.driver) show latest versions like 1.0.1, not 1.2.0-* [2].

So that 1.2.0-20260213-180200-2268a4d identifier looks like an internal/nightly/CI build tag rather than a version that has been published to a public package repository.

Sources: [1], [2]


Replace the unstaged CDC version with a published release.

The version 1.2.0-20260213-180200-2268a4d is not published in any public repository. Ballerina Central shows ballerinax/cdc latest as 1.0.3. This timestamped identifier appears to be an internal/nightly build tag that will cause dependency resolution failures. Use a published version like 1.0.3 or configure a custom repository if this internal version is intentional.

🤖 Prompt for AI Agents
In `@gradle.properties` at line 33, The gradle property stdlibCdcVersion is set to
an internal/timestamped build (1.2.0-20260213-180200-2268a4d) which is not
published; change the value of stdlibCdcVersion to a published release (e.g.,
1.0.3) so dependency resolution succeeds, or if the internal build is required,
add/configure the custom Maven repository where that artifact is hosted and
document this in the build configuration; update the stdlibCdcVersion entry
accordingly and ensure any repo settings used by Gradle are committed alongside
it.

@gayaldassanayake gayaldassanayake merged commit fdd727b into ballerina-platform:main Feb 18, 2026
3 of 4 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