Skip to content

[BUG] 구글 캘린더 삭제 일정 동기화 누락 및 공휴일 중복 버그 수정 - #290

Merged
hoondongseo merged 1 commit into
mainfrom
bug/simon/289-fix-calendar-sync
Aug 18, 2026
Merged

[BUG] 구글 캘린더 삭제 일정 동기화 누락 및 공휴일 중복 버그 수정#290
hoondongseo merged 1 commit into
mainfrom
bug/simon/289-fix-calendar-sync

Conversation

@hoondongseo

@hoondongseo hoondongseo commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🔗 이슈 번호

#️⃣ 기능 설명

  • 구글 캘린더에서 삭제(cancelled)된 일정이 트라이나 서버로 동기화되지 않아 유령 일정으로 남는 문제를 해결했습니다.
  • 다중 서버 환경(또는 스케줄러 동시 실행)에서 애플 공휴일이 DB에 2개씩 중복 생성되는 동시성 문제(Race Condition)를 원천 차단했습니다.

📌 작업 내용

  • GoogleCalendarClient.java: 증분 동기화(updatedMin) 호출 시 구글 API가 삭제된 일정을 응답에서 제외하지 않도록 timeMin, timeMax 파라미터를 쿼리에서 제거
  • V20__add_unique_index_for_holiday.sql: 기존 중복 공휴일 데이터를 초기화하고, 공휴일(HOLIDAY)의 external_event_id에 Unique Index를 생성하여 DB 레벨에서 중복 저장 완벽 방어 적용

✅ 체크리스트

  • Assignees, Labels를 모두 지정했나요?
  • GitHub Copilot의 자동 코드 리뷰 제안을 검토하고 필요한 부분을 반영했나요?
  • PR 머지 전 빌드 및 CI가 정상 작동하는지 확인했나요?

📸 스크린샷 (선택)

  • 변경 사항

    • 증분 동기화에서 updatedMin만 사용하도록 변경했습니다.
    • 초기 동기화에서는 timeMin, timeMax, orderBy=startTime을 유지합니다.
    • 기존 공휴일 데이터를 삭제하고 external_event_id에 공휴일 전용 Unique Index를 추가했습니다.
  • 변경 이유

    • 삭제된 Google Calendar 일정이 누락되지 않도록 수정했습니다.
    • 삭제된 일정의 Soft Delete와 관련 알람 제거를 지원합니다.
    • 다중 서버 환경의 공휴일 중복 생성을 방지합니다.
  • Breaking Changes

    • 없습니다.
  • 테스트

    • 테스트 파일을 확인했지만 실행 결과는 제공되지 않았습니다.

@hoondongseo hoondongseo self-assigned this Aug 18, 2026
@hoondongseo hoondongseo added the bug 버그 수정 label Aug 18, 2026
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c976c1a5-b9ca-45b0-8acd-f390fb1ccaa3

📥 Commits

Reviewing files that changed from the base of the PR and between ce5ca6f and 96d8180.

📒 Files selected for processing (2)
  • src/main/java/com/tryna/domain/external/service/GoogleCalendarClient.java
  • src/main/resources/db/migration/V20__add_unique_index_for_holiday.sql

📝 Walkthrough

Walkthrough

Changes

Calendar and holiday data integrity

Layer / File(s) Summary
Google Calendar synchronization query
src/main/java/com/tryna/domain/external/service/GoogleCalendarClient.java
Incremental synchronization sends only updatedMin. Full synchronization sends timeMin, timeMax, and orderBy=startTime.
Holiday event uniqueness migration
src/main/resources/db/migration/V20__add_unique_index_for_holiday.sql
The migration deletes existing holiday events and adds a partial unique index for holiday external_event_id values.
✨ 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 bug/simon/289-fix-calendar-sync

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.

@hoondongseo
hoondongseo merged commit 1933cf4 into main Aug 18, 2026
2 checks passed
@hoondongseo
hoondongseo deleted the bug/simon/289-fix-calendar-sync branch August 18, 2026 09:33
hoondongseo added a commit that referenced this pull request Aug 18, 2026
…endar-sync"

This reverts commit 1933cf4, reversing
changes made to ce5ca6f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 구글 캘린더 삭제 일정 동기화 누락 및 애플 공휴일 중복 적재 버그 수정

1 participant