fix: 애니메이션 GLB 업로드 후 animModelUrl 미갱신 — merge 트리거 누락#196
Conversation
Add map coordinates to Site creation and update APIs
FEAT: 새 버전 배포
변경사항 추가에 따른 배포
|
Warning Review limit reached
More reviews will be available in 46 minutes and 56 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 (2)
주요 변경사항GLB 업로드 파이프라인에 애니메이션 병합을 동기적으로 통합하고, 병합 로직을 전담 서비스로 추출하는 구조 개선. MascotAnimConfigService에서 병합 완료 시 animModelUrl을 즉시 응답에 포함하며, MascotGenerationService는 rigging 완료 후 병합을 새로운 서비스에 위임. Changes애니메이션 병합 파이프라인 재구성
예상 코드 검토 시간🎯 3 (Moderate) | ⏱️ ~20분 관련 이슈
관련 PR
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 3
🤖 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/MascotAnimationMergeService.java`:
- Around line 40-41: The method mergeIfRiggedMascotExists currently swallows
exceptions and returns void causing callers (e.g., MascotAnimConfigService's
upload flow that builds AnimationGlbsUploadResponse) to always proceed as if
merge succeeded; change mergeIfRiggedMascotExists to return the merged
riggedModelUrl (String) on success and null on failure (or return
Optional<String>) instead of void, stop catching/consuming exceptions silently
inside the method (or convert caught errors into a null/empty Optional result),
and update callers in MascotAnimConfigService to use that return value to decide
whether to set the URL or null in AnimationGlbsUploadResponse. Ensure the same
change is applied to the other similar method at the second occurrence (lines
noted in review).
- Around line 49-52: 현재 MascotAnimationMergeService의 animGlbs 생성(변수 animGlbs, 소스
animConfigs, 키 매퍼 MascotAnimConfig::getClipName)이 Collectors.toMap를 사용해 중복
clipName이 있으면 IllegalStateException을 발생시키므로 운영 데이터에서 병합이 중단됩니다; 이를 고치려면
Collectors.toMap에 중복 키 병합 로직을 추가하거나 groupingBy로 먼저 그룹화한 뒤 적절한 값을 선택하도록 변경하여 중복
clipName이 있을 때 안전하게 하나의 경로를 선택(예: 첫값 유지 또는 나중값 덮어쓰기)하도록 구현하세요. Ensure you update
the toMap call or use Collectors.groupingBy on animConfigs and resolve
duplicates deterministically (reference: animGlbs, animConfigs,
MascotAnimConfig::getClipName, fileStorageService.toLocalPath).
In
`@guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimConfigService.java`:
- Around line 176-179: 현재 코드는
generationRepository.findTopBySite_SiteIdOrderByCreatedAtDesc(siteId)로 가장 최신 한
건만 조회한 뒤 MascotGeneration::isFullyCompleted와 getResultModelUrl 필터를 적용해 최신 레코드가
미완료면 이전 완료 이력을 놓칩니다; 이를 고치려면 "최신 완료된(rig 완료 및 resultModelUrl 존재) 기록"을 직접 조회하도록
변경하세요 — 예: repository에
findTopBySite_SiteIdAndIsFullyCompletedTrueAndResultModelUrlIsNotNullOrderByCreatedAtDesc
같은 쿼리 메서드를 추가하거나 findAllBySite_SiteIdOrderByCreatedAtDesc를 사용해 스트림에서 첫 번째
isFullyCompleted && resultModelUrl != null인 항목을 찾도록 수정하고 기존 chain
(generationRepository.findTopBySite_SiteIdOrderByCreatedAtDesc,
MascotGeneration::isFullyCompleted, getResultModelUrl)을 대체하십시오.
🪄 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: a3ab9fd0-0b0c-48f0-a244-09fa43b81753
📒 Files selected for processing (4)
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/AnimationGlbsUploadResponse.javaguideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimConfigService.javaguideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimationMergeService.javaguideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java
Summary
POST /mascot/animations) 후 mesh-processor 병합이 실행되지 않아animModelUrl이 갱신되지 않던 문제를 수정했습니다.MascotAnimationMergeService로 추출해 rig 완료 / GLB 업로드 양쪽에서 공통 사용 합니다.Tasks
MascotAnimationMergeService추출 (기존triggerAnimationMerge로직 이동)MascotAnimConfigService.uploadAnimationGlbs— 업로드 완료 후 최신 rig 완료 이력 있으면 즉시 동기 병합 실행AnimationGlbsUploadResponse에animModelUrl필드 추가To Reviewer
Screenshot
Summary by CodeRabbit
릴리스 노트