Skip to content

feat(application): 우편번호별 대표 좌표 초기 적재 #399 - #451

Merged
tlgms merged 1 commit into
developfrom
feat/399-postal-code-location-seed
Oct 18, 2026
Merged

tlgms merged 1 commit into
developfrom
feat/399-postal-code-location-seed

Conversation

@kusuri12-09

Copy link
Copy Markdown
Member

Summary

  • 우편번호별 대표 주소·좌표 34,403건을 실행 리소스에 포함하고, 애플리케이션 시작 시 테이블이 비어 있을 때만 전체 적재합니다.

Related Issue

Scope

  • In scope: 대표 좌표 CSV, 좌표 테이블·초기화 잠금 행, 시작 시 초기 적재, 관련 테스트
  • Out of scope: 수험번호 발급의 거리 조회 fallback 연결, 기존 데이터 보충·덮어쓰기, 운영 DB 직접 적재

Implementation

  • V021 마이그레이션으로 postal_code_locations와 초기화 잠금 행을 생성합니다.
  • 잠금 행을 SELECT ... FOR UPDATE로 획득한 뒤 기존 데이터가 한 건이라도 있으면 CSV를 읽지 않고 종료합니다.
  • 빈 테이블에는 1,000건 단위 배치를 단일 트랜잭션으로 적재하며, 오류가 나면 전체 롤백합니다. 갱신 시각은 UTC로 변환합니다.
  • CSV는 우체국 2026-10-08 기준 주소를 카카오 좌표로 검증한 결과입니다. 44663 한 건은 응답에 우편번호가 없어 원본과 구조화 지번의 일치를 별도 확인했습니다.
  • 애플리케이션 시작 중 외부 API는 호출하지 않습니다.

Testing

  • Unit tests
  • Integration tests
  • Manual verification
  • H2 MySQL 호환 모드 테스트 6개 통과: 실제 Spring 시작 시 34,403건 적재, 기존 데이터 보존, UTC·선행 0 유지, 입력 오류·배치 실패 전체 롤백, 동시 시작 직렬화.
  • bazel test //systems/application/application-bootstrap:postal_code_location_initializer_test --test_output=errors 통과.
  • bazel build //systems/application/application-bootstrap:main 통과. JAR 내 CSV·초기화 클래스·V021 포함 및 CSV 해시 일치를 확인했습니다.
  • 실제 MySQL 인스턴스 기동 검증은 미실행입니다.

Deployment Notes

  • Feature flag: 없음. application 시작 시 실행합니다.
  • Migration required: V021.
  • Rollout considerations: 처음 비어 있는 테이블에만 34,403건을 적재합니다. 일부 데이터가 존재하면 누락된 행도 자동 보충하지 않습니다. 잠금 행은 다중 인스턴스 시작을 직렬화하므로 유지해야 합니다.

Checklist

  • Matches product/tech requirements
  • Backward compatibility considered
  • Docs updated if applicable

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1
  • ready-for-review
🚫 Excluded labels (none allowed): 2
  • wip
  • do-not-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: EntryDSM/entrydsm-platform/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f547e65d-df84-4301-9399-7ea5d8b7f45f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@tlgms
tlgms merged commit 6417361 into develop Oct 18, 2026
2 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