-
Notifications
You must be signed in to change notification settings - Fork 0
[Release] Dev -> Prod 병합 #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Title check | ❓ Inconclusive | 제목이 한국어와 영어가 혼용되어 있으며, '병합(merge)'이라는 표현만으로는 실제 변경 사항(로그 파일 경로 업데이트)을 명확히 설명하지 못합니다. | 제목을 더 구체적으로 개선해주세요. 예: '[Release] 로그 파일 경로를 /var/log에서 /var/log/festabook으로 변경' 또는 '[Release] Prod 배포를 위한 로깅 경로 설정 업데이트'와 같이 실제 변경 사항을 명확히 반영하는 것이 좋습니다. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
dev
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 @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/resources/logback-spring.xml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run-PR-Test
- GitHub Check: build-and-upload
| <!-- DEV, PROD: JSON 형식으로 로그 파일 기록 --> | ||
| <springProfile name="prod | dev"> | ||
| <property name="LOG_FILE_PATH" value="/var/log"/> | ||
| <property name="LOG_FILE_PATH" value="/var/log/festabook"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Explore repository structure
git ls-files | head -30Repository: festabook/backend
Length of output: 1102
🏁 Script executed:
# Look for deployment-related files
fd -e dockerfile -e yml -e yaml -e sh | grep -E "(docker|k8s|deploy|infra|script)" | head -20Repository: festabook/backend
Length of output: 198
🏁 Script executed:
# Check for any directory creation logic related to /var/log/festabook
rg -n "festabook|/var/log" --type-list | head -5Repository: festabook/backend
Length of output: 450
🏁 Script executed:
# List all configuration and deployment files
fd -e dockerfile -e yml -e yaml -o -name "*docker*" -o -name "*k8s*" -o -name "*deploy*" | head -20Repository: festabook/backend
Length of output: 291
🏁 Script executed:
# Check the actual logback-spring.xml to understand context
cat -n src/main/resources/logback-spring.xml 2>/dev/null || echo "File not found, searching..."
fd -name "logback-spring.xml"Repository: festabook/backend
Length of output: 2153
🏁 Script executed:
# Check the start.sh script which likely handles directory setup
cat -n infra/start.shRepository: festabook/backend
Length of output: 931
🏁 Script executed:
# Check if directory creation is handled in other infra scripts
cat -n infra/appspec.ymlRepository: festabook/backend
Length of output: 641
🏁 Script executed:
# Check docker-compose.yml for volume or directory setup
cat -n src/main/resources/docker-compose.ymlRepository: festabook/backend
Length of output: 858
🏁 Script executed:
# Search for any mkdir or directory creation logic
rg -n "mkdir.*festabook|festabook.*permission|chown.*festabook" --type shellRepository: festabook/backend
Length of output: 90
🏁 Script executed:
# Check CI/CD prod workflow
cat -n .github/workflows/ci-cd-prod.ymlRepository: festabook/backend
Length of output: 3395
로그 디렉터리 사전 생성 로직이 배포 파이프라인에 누락되었습니다
더 구체적인 하위 디렉터리로 로그 경로를 조정한 것은 좋은 개선이지만, prod 배포 시 실제로 동작하지 않을 가능성이 높습니다.
문제의 핵심:
RollingFileAppender는 로그 파일이 저장될 디렉터리를 자동으로 생성하지 않습니다. 따라서 /var/log/festabook 디렉터리가 미리 존재하지 않으면:
- 애플리케이션이 시작되지 않거나
- 로그를 기록하지 못하고 조용히 실패하거나
- 런타임 에러가 발생합니다
현재 배포 구조의 문제점:
현재 배포 파이프라인을 살펴보면:
infra/start.sh- JAR만 실행하고 디렉터리 생성 로직이 없음infra/appspec.yml- ApplicationStart 훅에서 디렉터리 생성 처리 안 함.github/workflows/ci-cd-prod.yml- 배포 전 사전 준비 단계 없음
해결 방법 (3가지 선택지):
옵션 1: start.sh에서 디렉터리 생성 (가장 간단)
- 장점: 배포 스크립트 수정만으로 해결, 별도 인프라 변경 불필요
- 단점: 매 시작 시마다 mkdir 실행 (비효율적이지만 무해함)
mkdir -p /var/log/festabook
sudo chown ubuntu:ubuntu /var/log/festabook옵션 2: appspec.yml의 BeforeInstall 훅 추가 (권장)
- 장점: 배포 시 한 번만 실행, 명확한 단계 분리
- 단점: 새로운 배포 전 준비 스크립트 필요
옵션 3: AWS CodeDeploy 호스트 사전 설정 (인프라 접근 가능 시)
- 장점: 배포 자동화와 인프라 설정 완전히 분리
- 단점: 수동 서버 설정 필요, 향후 유지보수 번거로움
이 중 옵션 2를 권장합니다. 배포 자동화 파이프라인이 모든 사전 조건을 처리하도록 설계하는 것이 운영 일관성 면에서 가장 안전합니다.
🤖 Prompt for AI Agents
In src/main/resources/logback-spring.xml around line 5, the LOG_FILE_PATH points
to /var/log/festabook but there is no deployment logic to ensure that directory
exists; add a deployment step to create and set ownership for /var/log/festabook
before the app starts — preferably add a BeforeInstall (or ApplicationStart)
hook in infra/appspec.yml that runs mkdir -p /var/log/festabook and chown to the
service user, or if you cannot change appspec, add the mkdir/chown commands to
infra/start.sh as a fallback; ensure the script runs with sufficient privileges
and that the path matches LOG_FILE_PATH.
|
|



Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.