fix: alpine 환경에서도 webp 변환이 가능하도록 scrimage 기반 인코더로 교체#388
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughWebP 이미지 변환 라이브러리를 TwelveMonkeys에서 Scrimage로 교체하고, 코드 포맷팅 스크립트의 경로 해석을 개선하며, 예외 처리 및 로깅을 강화합니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/code-formatting.sh`:
- Around line 26-31: The script uses the non-portable realpath command when
resolving files (see resolved_file assignments in resolve_target_java_file)
which fails on macOS/older Linux and the caller silences failures with "||
true"; replace the realpath usage with a POSIX-safe resolution (compute
dirname+pwd and basename) when setting resolved_file for input_file,
invocation_dir/$input_file and repo_root/$input_file, and remove the "|| true"
suppression so failures propagate (or explicitly check and emit an error) to
avoid silently skipping files.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f4584324-cb7e-46c8-b703-e76ffeb1aee8
📒 Files selected for processing (4)
build.gradlescripts/code-formatting.shsrc/main/java/gg/agit/konect/domain/upload/service/ImageConversionService.javasrc/main/java/gg/agit/konect/global/exception/GlobalExceptionHandler.java
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*
⚙️ CodeRabbit configuration file
**/*: 공통 리뷰 톤 가이드:
- 모든 코멘트는 첫 줄에
[LEVEL: ...]태그를 포함한다.- 과장된 표현 없이 사실 기반으로 작성한다.
- 한 코멘트에는 하나의 이슈만 다룬다.
- 코드 예시가 필요하면 최소 수정 예시를 제시한다.
- 가독성/단순화/확장성 이슈를 발견하면 우선순위를 높여 코멘트한다.
Files:
scripts/code-formatting.shsrc/main/java/gg/agit/konect/domain/upload/service/ImageConversionService.javabuild.gradlesrc/main/java/gg/agit/konect/global/exception/GlobalExceptionHandler.java
src/main/java/**/*.java
⚙️ CodeRabbit configuration file
src/main/java/**/*.java: 아래 원칙으로 리뷰 코멘트를 작성한다.
- 코멘트는 반드시 한국어로 작성한다.
- 반드시 수정이 필요한 항목만 코멘트로 남기고, 단순 취향 차이는 지적하지 않는다.
- 각 코멘트 첫 줄에 심각도를
[LEVEL: high|medium|low]형식으로 반드시 표기한다.- 심각도 기준: high=운영 장애 가능, medium=품질 저하, low=개선 권고.
- 각 코멘트는 "문제 -> 영향 -> 제안" 순서로 3문장 이내로 간결하게 작성한다.
- 가능하면 재현 조건 및 실패 시나리오도 포함한다.
- 제안은 현재 코드베이스(Spring Boot + JPA + Flyway) 패턴과 일치해야 한다.
- 보안, 트랜잭션 경계, 예외 처리, N+1, 성능 회귀 가능성을 우선 점검한다.
- 가독성: 변수/메서드 이름이 의도를 바로 드러내는지, 중첩과 메서드 길이가 과도하지 않은지 점검한다.
- 단순화: 불필요한 추상화, 중복 로직, 과한 방어 코드가 있으면 더 단순한 대안을 제시한다.
- 확장성: 새 요구사항 추가 시 변경 범위가 최소화되는 구조인지(하드코딩 분기/값 여부 포함) 점검한다.
Files:
src/main/java/gg/agit/konect/domain/upload/service/ImageConversionService.javasrc/main/java/gg/agit/konect/global/exception/GlobalExceptionHandler.java
🔇 Additional comments (1)
scripts/code-formatting.sh (1)
45-45: [LEVEL: nitpick]LGTM -
git ls-files결과에 대한realpath적용
git ls-files로 찾은 파일에 대해$repo_root를 붙여 절대 경로로 변환하는 방식이 올바릅니다. 이전 브랜치들과 일관성 있게 처리됩니다.
🔍 개요
🚀 주요 변경 내용
Alpine 환경에서
WEBP writer탐색 실패로 이미지 업로드 API가ILLEGAL_STATE로 실패하던 문제를 해결했습니다.이미지 변환 경로를
ImageIO기반 writer 탐색에서scrimage기반 WEBP 인코딩으로 교체하고, 예외 원인 로그를 보강했습니다.관련 작업은 아니지만 이전 PR에서 미처 해결하지 못한 포맷팅 관련 문제도 해결했습니다.
💬 참고 사항
✅ Checklist (완료 조건)