Conversation
…ic-serving Fix/mascot download static serving
|
Warning Review limit reached
More reviews will be available in 31 minutes and 29 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough이 PR은 clean-mesh(리깅 제거 FBX) 생성을 위한 독립적인 파이프라인을 추가합니다. Nginx가 업로드된 정적 파일을 직접 서빙하도록 인프라를 변경하고, admin-bff를 통해 clean-mesh 생성 및 상태 폴링 API를 노출합니다. ChangesClean-mesh 생성 파이프라인
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
🧹 Nitpick comments (1)
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/CleanMeshJobStatusResponse.java (1)
12-13: ⚡ Quick winstatus 필드를 enum으로 변경하여 타입 안전성을 확보하는 것을 권장합니다.
현재 String 타입으로 선언된
status필드는"processing","ready","failed"세 가지 값만 가질 수 있지만, 컴파일 타임에 잘못된 값이 할당되는 것을 방지할 수 없습니다. enum을 사용하면 타입 안전성이 향상되고 IDE 자동완성 지원도 개선됩니다.♻️ 제안하는 리팩토링
별도 enum 클래스 추가:
public enum CleanMeshStatus { PROCESSING, READY, FAILED }DTO 필드 타입 변경:
- /** "processing" | "ready" | "failed" */ - private String status; + private CleanMeshStatus status;서비스 레이어에서는
.name().toLowerCase()또는 커스텀 직렬화를 통해 JSON에서 소문자 문자열로 변환 가능합니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/CleanMeshJobStatusResponse.java` around lines 12 - 13, Change the String status field on CleanMeshJobStatusResponse to a dedicated enum to enforce allowed values: create an enum CleanMeshStatus { PROCESSING, READY, FAILED } and update the DTO's field signature (status) to use CleanMeshStatus; update any code that reads/writes JSON (e.g., service/serialization layers that construct or consume CleanMeshJobStatusResponse) to convert between the enum and the lowercase string representation (use CleanMeshStatus.name().toLowerCase() when producing JSON or add a custom Jackson serializer/deserializer or `@JsonValue/`@JsonCreator on the enum) and adjust any callers that set or compare the status to use CleanMeshStatus instead of raw strings.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java`:
- Around line 246-253: The code currently stores the uploaded file via
fileStorageService.store(siteId, fileHash, file) and then immediately calls
fileStorageService.loadBytes(siteId, imageUrl) to read it back; remove this
redundant disk I/O by using the incoming MultipartFile directly (e.g.,
MultipartFile.getBytes() or getInputStream()) when calling
tripoApiService.uploadImage(filename) instead of loadBytes, and defer calling
fileStorageService.store(...) until after tripoApiService.uploadImage(...)
succeeds (so only persist the file on successful upload). Ensure updates around
FileValidator.validateImage, FileValidator.computeFileHash,
tripoApiService.uploadImage and fileStorageService.store reflect this flow.
---
Nitpick comments:
In
`@guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/CleanMeshJobStatusResponse.java`:
- Around line 12-13: Change the String status field on
CleanMeshJobStatusResponse to a dedicated enum to enforce allowed values: create
an enum CleanMeshStatus { PROCESSING, READY, FAILED } and update the DTO's field
signature (status) to use CleanMeshStatus; update any code that reads/writes
JSON (e.g., service/serialization layers that construct or consume
CleanMeshJobStatusResponse) to convert between the enum and the lowercase string
representation (use CleanMeshStatus.name().toLowerCase() when producing JSON or
add a custom Jackson serializer/deserializer or `@JsonValue/`@JsonCreator on the
enum) and adjust any callers that set or compare the status to use
CleanMeshStatus instead of raw strings.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b40f4ce6-6398-45bd-9175-37abab7d3ec5
📒 Files selected for processing (6)
deploy/docker-compose.prod.ymldeploy/nginx.conf.templateguideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/controller/MascotController.javaguideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/CleanMeshGenerateResponse.javaguideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/CleanMeshJobStatusResponse.javaguideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java
Summary by CodeRabbit