Repository navigation
[fix] PB-111 Backend CD Firebase 비활성화 시 앱 부팅 실패 수정 - #216
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PHJ2000
marked this pull request as ready for review
April 13, 2026 23:59
PHJ2000
marked this pull request as draft
April 14, 2026 00:36
PHJ2000
force-pushed
the
fix/PB-111-backend-cd-firebase-runtime-config
branch
from
April 14, 2026 00:37
82e5a4d to
99b4bb1
Compare
PHJ2000
marked this pull request as ready for review
April 14, 2026 00:48
geonusp
requested changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🐛 Bugfix PR
🔗 Jira Issue (필수)
🔒 Close Issue (필수)
🧩 한눈에 요약 (필수)
어떤 버그였나?
APP_FIREBASE_ENABLED=false인 상태로 Backend CD가 배포를 수행하면, 컨테이너가 기동 직후 재시작 루프에 들어가고 헬스체크가 실패했다.왜 발생했나? (Root Cause)
FirebaseConfig는 Firebase 비활성화 시FirebaseMessaging빈을 만들지 않는데, Outbox 발송 체인(OutboxEventDispatcher,OutboxPublisher,OutboxSchedulingConfig)은 해당 빈이 항상 존재한다고 가정하고 있었다.어떻게 고쳤나?
APP_FIREBASE_CREDENTIALS_JSON_BASE64,APP_FIREBASE_CREDENTIALS_PATH, classpath 파일 순으로 읽을 수 있게 확장했다.FirebaseMessaging빈이 존재할 때만 Outbox 발송 체인이 등록되도록 조건부 빈 구성을 적용했다.🧯 재현 & 검증 (권장)
재현 방법(가능하면)
APP_FIREBASE_ENABLED=false를 둔다.main반영 후Backend CDworkflow를 실행한다.Deploy to EC2단계에서 컨테이너가 재시작되고curl http://127.0.0.1:8081/actuator/health가 실패하는지 확인한다.No qualifying bean of type 'com.google.firebase.messaging.FirebaseMessaging' available로 부팅 실패했다.재발 방지(있다면)
✅ Acceptance Criteria (AC) (필수)
APP_FIREBASE_ENABLED=false인 운영 환경에서도 백엔드 애플리케이션이 정상 기동한다.🧪 테스트 / 검증 (필수)
로컬
.\\gradlew.bat test --tests "com.beachcheck.config.OutboxFirebaseConditionContextTest" --tests "com.beachcheck.config.EmailSenderBeanSelectionConditionTest"CI
Smoke / 수동 검증
테스트 공백(있다면 이유 필수)
🧭 영향 범위 (필수)
APP_FIREBASE_CREDENTIALS_JSON_BASE64,APP_FIREBASE_CREDENTIALS_PATH)💥 Breaking / Compatibility (필수)
🚀 배포/릴리즈 (해당 시 필수)
Feature Flag
모니터링/알림
Backend CDdocker compose ps/actuator/healthFirebaseMessagingFailed to initialize Firebasedocker logs beach-complex-backend리스크
롤백
📸 증빙 (선택)
Backend CDdocker logs beach-complex-backend --tail 200💬 리뷰 가이드 (필수)
src/main/java/com/beachcheck/config/FirebaseConfig.javasrc/main/java/com/beachcheck/service/OutboxEventDispatcher.javasrc/main/java/com/beachcheck/service/OutboxPublisher.javasrc/main/java/com/beachcheck/config/OutboxSchedulingConfig.java.github/workflows/backend-cd.yml