Skip to content

fix(cdc): reject ignored PostgreSQL SPI config - #300

Merged
github-actions[bot] merged 3 commits into
developfrom
repro/postgres-spi-config-truth-609b290
Aug 12, 2026
Merged

fix(cdc): reject ignored PostgreSQL SPI config#300
github-actions[bot] merged 3 commits into
developfrom
repro/postgres-spi-config-truth-609b290

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Implements issue #238 without accepting caller-supplied PostgreSQL CDC values that the live service would silently ignore.

Exact current state:

  • head: 827df9b2e15b8afbd78da23ac4a165e7a45e26fe
  • live base: protected develop@f340d37caba9df0d4aeb88e5d18b78bd8cca4b60
  • auditable ancestry: GREEN 690f6ed6eae00b11c732f126393df99303c2739e + live protected base, combined non-destructively by the current merge commit
  • original RED parent: 10074824dc7cbc97ac097ae0bf51a4a74c70a8fc

Behavior: PostgresDebeziumCdcSource.start(config) rejects null and every non-empty per-call map before service lookup, uses a stable non-sensitive error, and preserves empty-map delegation to the deployment-configured live CdcService. Public Javadocs document that deployment configuration owns PostgreSQL/Debezium settings.

Focused regression coverage proves credential-like values are rejected without echo, no service interaction occurs on invalid input, null fails before provider lookup, and empty configuration still starts the service.

Fresh current-head GitHub workflows completed successfully for CI, Dependency Review, Generate SBOM, SAST, and Security across the repository's hosted matrix. These checks do not substitute for a qualifying independent exact-head formal APPROVED review. Historical checks/reviews from predecessor heads do not transfer.

Summary by CodeRabbit

  • 문서

    • PostgreSQL Debezium CDC 어댑터의 배포 구성 및 호출별 설정 사용 방식에 대한 설명을 명확히 했습니다.
  • 버그 수정

    • 호출 시 비어 있지 않은 설정이나 null 설정을 제공하면 서비스 조회 및 시작 전에 명확한 오류가 표시됩니다.
    • 빈 설정을 사용하면 배포 시 구성된 설정으로 정상적으로 서비스가 조회되고 시작됩니다.
    • 오류 메시지에 민감한 설정값이 노출되지 않도록 개선했습니다.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

PostgreSQL Debezium CDC 소스가 배포 구성 기반 서비스와 빈 per-call 설정 계약을 문서화하고 검증합니다. null 및 비어 있지 않은 설정은 예외로 처리하며, 빈 설정은 배포 구성 서비스를 시작합니다.

Changes

PostgreSQL CDC 설정 계약

Layer / File(s) Summary
배포 설정 기반 CDC 소스 계약
cdc-service/src/main/java/com/xtrmetl/cdc/spi/PostgresDebeziumCdcSource.java
생성자와 validatestart 메서드의 Javadoc에 배포 설정 사용과 서비스 위임 계약을 명시합니다. null 또는 비어 있지 않은 설정 맵을 IllegalArgumentException으로 거부합니다.
설정 검증 및 시작 동작 테스트
cdc-service/src/test/java/com/xtrmetl/cdc/spi/PostgresDebeziumCdcSourceConfigurationTest.java
설정 거부 시 provider 및 서비스와 상호작용하지 않는 동작과 예외 메시지의 민감한 값 미포함을 검증합니다. 빈 설정에서는 배포 구성 서비스를 조회하고 start()를 호출하는 동작을 검증합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 비어 있지 않은 PostgreSQL SPI 설정을 거부하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 repro/postgres-spi-config-truth-609b290

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.

@seonghobae seonghobae changed the title test(cdc): replay PostgreSQL SPI config truth on current develop fix(cdc): reject ignored PostgreSQL SPI config Aug 12, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 12, 2026 21:18

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

🧹 Nitpick comments (1)
cdc-service/src/test/java/com/xtrmetl/cdc/spi/PostgresDebeziumCdcSourceConfigurationTest.java (1)

42-42: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

provider 조회 부재도 검증하세요.

현재 verifyNoInteractions(service)만 사용합니다. provider.getIfAvailable()가 호출된 뒤 CdcService 메서드가 호출되지 않아도 테스트가 통과합니다. 비어 있지 않은 설정을 서비스 조회 전에 거부하는 계약을 보호하려면 provider 조회 횟수가 0인지 확인하세요.

수정 예시
+import static org.mockito.Mockito.never;
...
+        verify(provider, never()).getIfAvailable();
         verifyNoInteractions(service);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@cdc-service/src/test/java/com/xtrmetl/cdc/spi/PostgresDebeziumCdcSourceConfigurationTest.java`
at line 42, Update the test around the configuration validation path to
explicitly verify that the provider lookup via provider.getIfAvailable() occurs
zero times, in addition to verifyNoInteractions(service). Preserve the assertion
that non-empty configuration is rejected before any CdcService method is
invoked.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@cdc-service/src/test/java/com/xtrmetl/cdc/spi/PostgresDebeziumCdcSourceConfigurationTest.java`:
- Line 42: Update the test around the configuration validation path to
explicitly verify that the provider lookup via provider.getIfAvailable() occurs
zero times, in addition to verifyNoInteractions(service). Preserve the assertion
that non-empty configuration is rejected before any CdcService method is
invoked.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6134b981-2bff-4c26-91c0-0671bb7b503b

📥 Commits

Reviewing files that changed from the base of the PR and between f340d37 and 827df9b.

📒 Files selected for processing (2)
  • cdc-service/src/main/java/com/xtrmetl/cdc/spi/PostgresDebeziumCdcSource.java
  • cdc-service/src/test/java/com/xtrmetl/cdc/spi/PostgresDebeziumCdcSourceConfigurationTest.java

@github-actions
github-actions Bot merged commit cc0cf39 into develop Aug 12, 2026
35 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.

1 participant