Skip to content

Conversation

@dkdltm221
Copy link
Contributor

Summary

해당 PR에 대한 요약을 작성해주세요.
도커 볼륨 설정하였습니다.
file 저장시 uuid추가했습니다.

Tasks

  • 파일 업로드 볼륨 생성
  • file 저장시 uuid 붙이도록 수정

To Reviewer

(없을 경우 삭제) 더 전달할 내용이 있다면 여기에 작성해주세요.

Screenshot

(없을 경우 삭제) 작업한 내용에 대한 스크린샷을 첨부해주세요.

@dkdltm221 dkdltm221 self-assigned this Jan 12, 2026
@dkdltm221 dkdltm221 added the 🐞bug Something isn't working label Jan 12, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

UUID 접두사를 파일 저장소의 파일명에 추가하고 Docker Compose 구성에 새로운 업로드 데이터 볼륨을 추가하는 변경. 공개 메서드 서명은 유지되며 내부 구현과 인프라 설정만 수정됨.

Changes

Cohort / File(s) 요약
파일 저장소 서비스 UUID 접두사 추가
aics-domain/src/main/java/kgu/developers/domain/file/infrastructure/repository/FileStorageServiceImpl.java
저장된 파일명에 UUID 접두사를 추가하여 파일 고유성 보장. fileNameWithUuid = UUID.randomUUID() + "_" + fileName 구성으로 전체 경로 생성. UUID import 추가. 유효성 검사 및 예외 동작 유지.
Docker Compose 업로드 데이터 볼륨 구성
docker/development/docker-compose.yml
새로운 upload-data 볼륨을 선언하고 aics-api, aics-admin, aics-auth 서비스의 /app/cloud 경로에 마운트. 기존 caddy_config 볼륨은 유지되며 새 볼륨과 함께 배치.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10분

Possibly related issues

  • kgu-developers/aics-server#316: 파일명의 UUID 접두사 생성 및 업로드 데이터를 위한 Docker 볼륨 추가 구현으로, 이 PR의 변경사항과 정확히 일치.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 PR의 주요 변경 사항을 명확하게 요약하고 있습니다: 도커 볼륨 설정과 파일 저장 시 UUID 추가.
Description check ✅ Passed 설명이 변경 사항과 관련이 있습니다: 도커 볼륨 설정 및 파일 저장 시 UUID 추가에 대해 언급하고 있습니다.

✏️ 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.

❤️ Share

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

@dkdltm221 dkdltm221 linked an issue Jan 12, 2026 that may be closed by this pull request
2 tasks
@github-actions
Copy link

Test Coverage Report

Overall Project 80.41% 🍏

There is no coverage information present for the Files changed

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bcc6f79...b0267d7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between bcc6f79 and 6d55013.

📒 Files selected for processing (2)
  • aics-domain/src/main/java/kgu/developers/domain/file/infrastructure/repository/FileStorageServiceImpl.java
  • docker/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)가 올바르게 생성됩니다.

Copy link
Contributor

@JangYeongHu JangYeongHu left a 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는 잘 수정해주신 것 같습니다

@JangYeongHu JangYeongHu self-requested a review January 13, 2026 13:57
@dkdltm221 dkdltm221 merged commit 9bbccbe into develop Jan 13, 2026
5 checks passed
@dkdltm221 dkdltm221 deleted the fix/KD-63 branch January 13, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

개발 서버 도커 볼륨 설정/ file 저장시 uuid추가

3 participants