Skip to content

perf(profile): 올린 프로필 사진은 받은 바이트로 심사한다 - #364

Merged
selee1012 merged 1 commit into
devfrom
fix/profile-image-moderate-bytes
Oct 28, 2026
Merged

selee1012 merged 1 commit into
devfrom
fix/profile-image-moderate-bytes

Conversation

@selee1012

@selee1012 selee1012 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

무엇

프로필 사진 업로드 직후 심사를, 서버가 받은 바이트로 바로 한다.

왜

지금은 S3 저장 뒤 같은 사진을 공개 주소(https://prod.ruleup.co.kr/files/...)로 다시 내려받아 심사한다. prod 트레이스에서 이 왕복만 ~0.66초(업로드 전체 중앙값 0.85초·최대 2.1초).

어떻게

  • UserModerationService.moderate(userId, UploadedImage) 오버로드 — 지금 제출값(profile_image_key)이 방금 올린 URL 과 같을 때만 moderateImageBytes 를 쓰고, 그사이 바뀌었으면 기존처럼 URL 로 받는다.
  • ProfileService.uploadImage 는 validate → storeValidated 로 나눠 검증된 바이트를 넘긴다.

확인

  • OnboardingApiContractIT 「올린 사진은 받은 바이트로 심사한다」: moderateImageBytes(바이트, image/png) 1회, moderateImage(url) 0회

🤖 Generated with Claude Code

@selee1012
selee1012 added this pull request to stack #366 October 28, 2026 13:14
Base automatically changed from fix/safesearch-key-header to dev October 28, 2026 13:34
S3 에 저장한 직후 공개 주소(/files/...)로 같은 사진을 다시 내려받아 심사하느라
prod 에서 ~0.66초가 더 걸렸다(X-Ray 1-6ae1d6f6). 제출값이 방금 올린 URL 과 같을 때만
바이트를 쓰고, 그 사이 바뀌었으면 기존처럼 URL 로 받는다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@selee1012
selee1012 force-pushed the fix/profile-image-moderate-bytes branch from 7991b7b to 0c5fb2a Compare October 28, 2026 13:34
@selee1012
selee1012 merged commit cc37662 into dev Oct 28, 2026
@selee1012
selee1012 deleted the fix/profile-image-moderate-bytes branch October 28, 2026 13:35
@github-actions

Copy link
Copy Markdown

Test Coverage

There is no coverage information present for the Files changed

@github-actions

Copy link
Copy Markdown

Test Coverage

Overall Project 83.37% 🍏
Files changed 100% 🍏

File Coverage
ProfileService.java 85.83% 🍏
UserModerationService.java 83.69% 🍏

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.

1 participant