-
Notifications
You must be signed in to change notification settings - Fork 1
fix/KD-63 개발 서버 도커 볼륨 설정/ file 저장시 uuid추가 #317
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
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughUUID 접두사를 파일 저장소의 파일명에 추가하고 Docker Compose 구성에 새로운 업로드 데이터 볼륨을 추가하는 변경. 공개 메서드 서명은 유지되며 내부 구현과 인프라 설정만 수정됨. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10분 Possibly related issues
🚥 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. 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 |
Test Coverage Report
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #317 +/- ##
==========================================
Coverage 86.51% 86.51%
Complexity 67 67
==========================================
Files 24 24
Lines 267 267
Branches 14 14
==========================================
Hits 231 231
Misses 24 24
Partials 12 12 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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: 0
🧹 Nitpick comments (1)
aics-domain/src/main/java/kgu/developers/domain/file/infrastructure/repository/FileStorageServiceImpl.java (1)
59-61: UUID 접두사 추가로 파일명 충돌 방지가 구현되었습니다.파일명 고유성 보장을 위한 적절한 접근입니다. 다만, 유효성 검사(
validateAttributes)가 경로 생성 후에 수행되고 있습니다. 현재 로직상 큰 문제는 없지만, 검증을 먼저 수행하는 것이 더 명확할 수 있습니다.♻️ 선택적 개선: 유효성 검사를 경로 생성 전으로 이동
public String store(MultipartFile file, FileDomain fileDomain) { String fileName = StringUtils.cleanPath(Objects.requireNonNull(file.getOriginalFilename())); + validateExtension(fileName, disallowedExtensions); String fileNameWithUuid = UUID.randomUUID() + "_" + fileName; String path = getFullPath(fileDomain, fileNameWithUuid); - validateAttributes(path, fileName); + validateInvalidPath(path); try {
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
aics-domain/src/main/java/kgu/developers/domain/file/infrastructure/repository/FileStorageServiceImpl.javadocker/development/docker-compose.yml
🔇 Additional comments (5)
docker/development/docker-compose.yml (2)
98-102: 볼륨 선언이 올바릅니다.
upload-data볼륨이 적절하게 선언되었습니다. 개발 환경에서는 기본 로컬 드라이버를 사용하는 것이 적합합니다.
16-17: 공유 볼륨 구성이 적절하고 마운트 경로가 올바르게 설정되었습니다.세 서비스(aics-api, aics-admin, aics-auth)가 동일한
upload-data볼륨을/app/cloud에 마운트하며, 모든 서비스의 Dockerfile에서WORKDIR /app으로 설정되어 있습니다. 애플리케이션의upload-path: ${user.dir}/cloud설정과 완벽하게 일치합니다.aics-domain/src/main/java/kgu/developers/domain/file/infrastructure/repository/FileStorageServiceImpl.java (3)
14-14: UUID import 추가가 적절합니다.
62-77: 파일 저장 로직이 올바르게 구현되었습니다.UUID가 포함된 경로로 파일이 저장되고, 반환되는 URL도 UUID가 포함된 상대 경로를 정확히 반영합니다.
REPLACE_EXISTING옵션은 UUID 사용으로 인해 실질적으로 충돌 가능성이 거의 없어 안전합니다.
107-123: 경로 생성 로직이 UUID 파일명과 잘 통합되었습니다.디렉토리 구조(
domain/yyyy/MM/dd/uuid_filename)가 올바르게 생성됩니다.
JangYeongHu
left a comment
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.
docker-compose.yml에 맞추어서 application.yml 역시 수정이 필요해 보여요!
UUID는 잘 수정해주신 것 같습니다
Summary
해당 PR에 대한 요약을 작성해주세요.
도커 볼륨 설정하였습니다.
file 저장시 uuid추가했습니다.
Tasks
To Reviewer
(없을 경우 삭제) 더 전달할 내용이 있다면 여기에 작성해주세요.
Screenshot
(없을 경우 삭제) 작업한 내용에 대한 스크린샷을 첨부해주세요.