Skip to content

Conversation

@soeun2537
Copy link
Member

@soeun2537 soeun2537 commented Dec 26, 2025

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 애플리케이션 로그 파일의 저장 경로가 변경되었습니다. 프로덕션 및 개발 환경에서 애플리케이션 로그 파일이 새로운 디렉토리에 저장되도록 구성이 업데이트되었습니다. 로그 파일에 접근하거나 로그 모니터링 및 분석 작업을 수행하신다면, 변경된 저장 경로를 확인하여 로그 접근 경로 설정을 적절히 업데이트해주시기 바랍니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 26, 2025

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'tools'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

logback-spring.xml에서 prod와 dev 로깅 프로파일의 LOG_FILE_PATH 프로퍼티 값을 "/var/log"에서 "/var/log/festabook"으로 수정했습니다. 이 변경은 JSON_FILE 어펜더가 애플리케이션 로그를 저장하는 경로와 롤링 정책의 대상 디렉터리에 직접 영향을 미칩니다.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

검토 시 고려할 점

변경 자체는 매우 단순하지만, 로깅 경로 변경과 관련해서 몇 가지 확인할 부분들이 있습니다:

경로 변경의 영향 범위 확인

  • 현재 /var/log/festabook 디렉터리가 실제로 Docker, 클라우드 환경, 그리고 로컬 개발 환경에서 모두 생성 가능한지 검증이 필요합니다. 단순히 경로를 변경하는 것만으로는 부족하며, 실행 환경에서 해당 디렉터리에 대한 쓰기 권한이 충분한지도 함께 확인해야 합니다.

다른 환경과의 일관성

  • 현재 변경이 prod와 dev 프로파일에만 적용되는데, test나 local 프로파일에서도 같은 경로를 사용해야 하는지 명확하지 않습니다. 모든 프로파일의 로깅 경로 전략을 재검토하면 향후 환경별 관리가 수월해질 것입니다.

디렉터리 자동 생성 설정

  • 로그백이 존재하지 않는 디렉터리에 자동으로 파일을 생성하지 않는 경우가 있으므로, appender 설정에서 <createParent>true</createParent> 옵션이 명시적으로 지정되어 있는지 확인하면 안정성을 높일 수 있습니다.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between b3df2b1 and 81d226a.

📒 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"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Explore repository structure
git ls-files | head -30

Repository: 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 -20

Repository: 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 -5

Repository: 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 -20

Repository: 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.sh

Repository: festabook/backend

Length of output: 931


🏁 Script executed:

# Check if directory creation is handled in other infra scripts
cat -n infra/appspec.yml

Repository: festabook/backend

Length of output: 641


🏁 Script executed:

# Check docker-compose.yml for volume or directory setup
cat -n src/main/resources/docker-compose.yml

Repository: 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 shell

Repository: festabook/backend

Length of output: 90


🏁 Script executed:

# Check CI/CD prod workflow
cat -n .github/workflows/ci-cd-prod.yml

Repository: festabook/backend

Length of output: 3395


로그 디렉터리 사전 생성 로직이 배포 파이프라인에 누락되었습니다

더 구체적인 하위 디렉터리로 로그 경로를 조정한 것은 좋은 개선이지만, prod 배포 시 실제로 동작하지 않을 가능성이 높습니다.

문제의 핵심:

RollingFileAppender는 로그 파일이 저장될 디렉터리를 자동으로 생성하지 않습니다. 따라서 /var/log/festabook 디렉터리가 미리 존재하지 않으면:

  • 애플리케이션이 시작되지 않거나
  • 로그를 기록하지 못하고 조용히 실패하거나
  • 런타임 에러가 발생합니다

현재 배포 구조의 문제점:

현재 배포 파이프라인을 살펴보면:

  1. infra/start.sh - JAR만 실행하고 디렉터리 생성 로직이 없음
  2. infra/appspec.yml - ApplicationStart 훅에서 디렉터리 생성 처리 안 함
  3. .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.

@github-actions
Copy link

Overall Project 93.41% 🍏

There is no coverage information present for the Files changed

@sonarqubecloud
Copy link

@soeun2537 soeun2537 merged commit 2f373f2 into prod Dec 26, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants