Skip to content

fix: 애니메이션 GLB 업로드 후 animModelUrl 미갱신 — merge 트리거 누락#196

Merged
yyuneu merged 6 commits into
developfrom
feat/anim-merge-on-upload
Jun 4, 2026
Merged

fix: 애니메이션 GLB 업로드 후 animModelUrl 미갱신 — merge 트리거 누락#196
yyuneu merged 6 commits into
developfrom
feat/anim-merge-on-upload

Conversation

@yyuneu

@yyuneu yyuneu commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Tasks

  • MascotAnimationMergeService 추출 (기존 triggerAnimationMerge 로직 이동)
  • MascotAnimConfigService.uploadAnimationGlbs — 업로드 완료 후 최신 rig 완료 이력 있으면 즉시 동기 병합 실행
  • AnimationGlbsUploadResponseanimModelUrl 필드 추가

To Reviewer

  • 병합 실패 시 예외를 삼키는 기존 정책은 유지합니다. (rig base GLB는 확보된 상태, animModelUrl만 null로 남음)

Screenshot

Summary by CodeRabbit

릴리스 노트

  • New Features
    • 마스코트 애니메이션 업로드 후 병합 완료 시 통합 애니메이션 모델 URL을 즉시 응답에 포함하도록 개선했습니다. 병합 성공 시 모델 URL을 반환하고, 병합 실패 시에는 null을 반환합니다.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yyuneu, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f6be18d2-3626-4fbe-b6ee-f64c3c5aaecc

📥 Commits

Reviewing files that changed from the base of the PR and between 3d72362 and 2022d9f.

📒 Files selected for processing (2)
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimConfigService.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimationMergeService.java

주요 변경사항

GLB 업로드 파이프라인에 애니메이션 병합을 동기적으로 통합하고, 병합 로직을 전담 서비스로 추출하는 구조 개선. MascotAnimConfigService에서 병합 완료 시 animModelUrl을 즉시 응답에 포함하며, MascotGenerationService는 rigging 완료 후 병합을 새로운 서비스에 위임.

Changes

애니메이션 병합 파이프라인 재구성

Layer / File(s) Summary
응답 DTO 계약 업데이트
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/AnimationGlbsUploadResponse.java
AnimationGlbsUploadResponseanimModelUrl 필드 추가하여 병합 완료 시 생성된 애니메이션 GLB URL을 응답에 포함.
애니메이션 병합 서비스 신규 생성
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimationMergeService.java
mergeIfRiggedMascotExists() 메서드를 통해 사이트별 애니메이션 설정을 조회하고 mesh-processor로 GLB 통합 병합 수행. 성공 시 완료 상태 반영, 실패 시 경고 로그만 기록하고 파이프라인 유지.
GLB 업로드 파이프라인 병합 트리거 통합
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimConfigService.java
uploadAnimationGlbs() 후 최신 MascotGeneration 조회하여 완료 및 resultModelUrl 유효성 검증 후 병합 수행. triggerMergeIfAvailable() 헬퍼로 anim_{generationId}.glb URL 반환 또는 null 처리. 저장소 및 서비스 의존성 추가.
MascotGenerationService 병합 로직 제거 및 위임
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java
triggerAnimationMerge() 제거하고 rig 완료 후 animationMergeService.mergeIfRiggedMascotExists() 호출로 위임. 불필요한 import 정리 및 새 서비스 의존성 주입.

예상 코드 검토 시간

🎯 3 (Moderate) | ⏱️ ~20분

관련 이슈

  • Project-Guideon/guideon-backend#195: GLB 업로드 후 병합 트리거가 누락되어 animModelUrl이 업데이트되지 않던 문제를 MascotAnimConfigService에서 직접 병합을 수행하여 해결.

관련 PR

  • Project-Guideon/guideon-backend#189: 애니메이션 파이프라인을 기존 retarget 흐름에서 수동 Mixamo 업로드 방식으로 변경한 PR과 함께, 본 PR은 MascotGenerationService의 병합 트리거를 새로운 MascotAnimationMergeService로 추출하고 GLB 업로드 직후 animModelUrl을 반환하도록 확장.
  • Project-Guideon/guideon-backend#183: 병합 로직을 MascotAnimationMergeService로 재구성하여 생성 완료 시점의 merge 트리거를 변경하는 본 PR과, MascotGeneration의 animModelUrl/animClips 필드 생성 및 영속화를 다루는 PR #183이 같은 애니메이션 결과 필드 주변의 생성 파이프라인 수정 범위와 겹침.

🐰 병합 로직, 깔끔하게 분리해
글브 업로드 후 모델 URL 즉시 얻고
세대 서비스는 한 걸음 물러서
파이프라인 흐름, 더욱 명확해!
✨ 애니메이션 완성의 길,
이제 더욱 우아하네~

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확히 설명하고 있습니다. 애니메이션 GLB 업로드 후 animModelUrl 미갱신 및 merge 트리거 누락이라는 주요 문제를 직관적으로 전달합니다.
Description check ✅ Passed PR 설명이 템플릿의 주요 섹션(Summary, Tasks, To Reviewer)을 포함하고 있으며, 변경사항의 목적과 영향 범위를 명확히 설명하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/anim-merge-on-upload

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3e4d708 and 3d72362.

📒 Files selected for processing (4)
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/AnimationGlbsUploadResponse.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimConfigService.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimationMergeService.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java

@yyuneu yyuneu merged commit 233a5ba into develop Jun 4, 2026
2 checks passed
@yyuneu yyuneu deleted the feat/anim-merge-on-upload branch June 4, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants