Skip to content

fix(config): apply aliases after ConfigData - #245

Merged
github-actions[bot] merged 5 commits into
developfrom
fix/config-alias-after-config-data-622e5e6
Aug 10, 2026
Merged

fix(config): apply aliases after ConfigData#245
github-actions[bot] merged 5 commits into
developfrom
fix/config-alias-after-config-data-622e5e6

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Preserve the documented dual-read configuration contract at the real Spring Boot ConfigData startup boundary: mightyetl.* is preferred and mirrored to legacy xtrmetl.*, while legacy-only values remain visible under the modern namespace.

Spring Boot 3.5.16 loads EnvironmentPostProcessor implementations from META-INF/spring.factories, and ConfigDataEnvironmentPostProcessor.ORDER defines the point at which file-backed ConfigData becomes available. The former mightyETL processor order was exactly equal to that ConfigData order, so it had no explicit happens-after relationship to application configuration.

Primary framework evidence:

Exact identities and TDD evidence

  • branch: fix/config-alias-after-config-data-622e5e6
  • branch creation base: develop@622e5e6c3d534f230c390f10e3832efadfc01825
  • current independently resolved live base: develop@c2511f6b9d716ef9ab8de60a91fffd826714a4c5
  • current exact head: 6d40912102edbae26a5907b0ea2fd4bbe51a7b8c
  • current live-base synthetic integration revision exercised by hosted CI: 9f53a34dfc4e8e36306da596fa77fba5899b46d5

RED

Real SpringApplication tests load temporary file-backed application.properties containing conflicting modern/legacy values and require the synthetic alias property source to exist and the modern value to win. On the test-first head, hosted CI failed at that production startup boundary because the alias property source was absent.

Remedy 1 — registration

6ca6ae881ba95c42952f5cd2bffc621c54735845 registered the ETL and CDC processors through each module's META-INF/spring.factories. The same real startup test remained RED. That falsified registration as the sole cause and isolated the remaining ordering boundary.

Remedy 2 — deterministic ordering

6d40912102edbae26a5907b0ea2fd4bbe51a7b8c orders both processors at ConfigDataEnvironmentPostProcessor.ORDER + 1, establishing an explicit happens-after relationship without copying a framework magic number.

Hosted CI on the current live-base synthetic integration revision is GREEN for the behavioral change:

  • full Maven reactor succeeds across all six modules;
  • ETL: 276 tests, including 7 alias-processor tests, 0 failures;
  • CDC: 112 tests, including 4 alias-processor tests, 0 failures;
  • Linux CI, macOS CI, Windows CI, Dependency Review, SBOM and Semgrep completed successfully on this exact head/current integration state.

Remaining gates — no merge yet

This PR is not represented as protected-integration ready yet:

  1. Security Scan is RED because Trivy reports the inherited jackson-databind findings already owned by the dedicated Jackson baseline work in PR fix(security): move Jackson to fixed 2.21.5 baseline #160; this branch does not alter Jackson or either affected POM and must not race that writer.
  2. Current CI checks out GitHub's synthetic PR merge revision rather than literal source-head evidence; PR ci: schedule NVIDIA OpenCode maintenance agent #121 owns that workflow-control gap.
  3. The current JaCoCo gate still reports 0 classes while passing, so non-vacuous owned-production coverage is not established here; issue [Quality gate] Make JaCoCo fail closed when production class selection is empty #162 / PR fix(coverage): make JaCoCo production gate non-vacuous #164 own that shared coverage-control repair.
  4. There is no qualifying independent non-author formal APPROVED review on this exact head.

No security, coverage, review or branch-protection gate is weakened by this PR. The remaining blockers are kept explicit so passing behavioral tests are not misrepresented as merge authority.

Summary by CodeRabbit

  • 개선 사항

    • 설정 처리 순서를 조정해 애플리케이션 설정이 Spring Boot의 설정 로딩 과정과 안정적으로 연동됩니다.
    • 최신 설정 키가 레거시 별칭보다 우선 적용되며, 기존 별칭 설정도 계속 사용할 수 있습니다.
    • CDC 및 ETL 서비스에서 동일한 설정 호환성이 제공됩니다.
  • 테스트

    • 최신 키와 레거시 키가 함께 지정된 환경에서 우선순위와 별칭 처리를 검증하는 통합 테스트를 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 10, 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a7942c2-feaf-4315-af52-31501f4dc914

📥 Commits

Reviewing files that changed from the base of the PR and between 622e5e6 and 6d40912.

📒 Files selected for processing (6)
  • cdc-service/src/main/java/com/xtrmetl/cdc/config/MightyEtlConfigAliasEnvironmentPostProcessor.java
  • cdc-service/src/main/resources/META-INF/spring.factories
  • cdc-service/src/test/java/com/xtrmetl/cdc/config/MightyEtlConfigAliasEnvironmentPostProcessorTest.java
  • etl-service/src/main/java/com/xtrmetl/etl/config/MightyEtlConfigAliasEnvironmentPostProcessor.java
  • etl-service/src/main/resources/META-INF/spring.factories
  • etl-service/src/test/java/com/xtrmetl/etl/config/MightyEtlConfigAliasEnvironmentPostProcessorTest.java

📝 Walkthrough

Walkthrough

CDC와 ETL 모듈의 환경 별칭 후처리기 실행 순서를 ConfigDataEnvironmentPostProcessor.ORDER + 1로 변경했습니다. 두 모듈에 후처리기를 등록하고, 현대 설정 키의 우선순위를 검증하는 통합 테스트를 추가했습니다.

Changes

환경 별칭 처리

Layer / File(s) Summary
후처리기 순서 및 등록
cdc-service/src/main/java/..., cdc-service/src/main/resources/META-INF/spring.factories, etl-service/src/main/java/..., etl-service/src/main/resources/META-INF/spring.factories
두 모듈의 후처리기 실행 순서를 ConfigDataEnvironmentPostProcessor.ORDER + 1로 변경했습니다. 두 모듈의 spring.factories에 후처리기를 등록했습니다.
별칭 우선순위 통합 테스트
cdc-service/src/test/java/..., etl-service/src/test/java/...
임시 application.properties와 비웹 Spring 컨텍스트를 사용해 alias property source 등록과 mightyetl 설정 값의 우선 적용을 검증합니다.

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 제목은 ConfigData 처리 이후 별칭 적용이라는 변경의 핵심을 간결하고 정확하게 설명합니다.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/config-alias-after-config-data-622e5e6

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(config): prove config-data alias ordering fix(config): apply aliases after ConfigData Aug 10, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 10, 2026 15:48
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