Skip to content

fix: 배경 사진이 있는 대학만 추천 - #863

Merged
manNomi merged 2 commits into
developfrom
fix/recommend-schools-with-photos
Nov 30, 2026
Merged

manNomi merged 2 commits into
developfrom
fix/recommend-schools-with-photos

Conversation

@manNomi

@manNomi manNomi commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

작업 내용

홈의 실시간 인기 파견학교 API가 사진을 표시할 수 있는 대학만 반환합니다. 일반 추천과 개인 추천 모두 DB에서 사진 경로가 비어 있는 후보를 먼저 제외합니다. 그다음 등록된 경로가 업로드 CDN에서 정상적인 이미지 응답을 주는지 확인합니다. CDN에 파일이 없거나 접근할 수 없으면 해당 학교를 빼고 응답합니다.

  • DB 조회를 마친 뒤 최대 6개 후보를 동시에 확인합니다. CDN에는 이미지 본문을 받지 않는 HEAD 요청을 보냅니다. 같은 이미지의 동시 조회를 합치고 결과를 인스턴스별로 1분간 재사용합니다.
  • 기존 S3 주소도 업로드 CDN 경로로 변환합니다. 리다이렉트나 외부 호스트를 따라가지 않습니다.
  • 기존 추천 캐시를 읽어도 CDN 확인을 거칩니다. 일반 추천의 DB 필터 변경에 맞춰 추천 캐시 키를 갱신했으며 관리자 변경 시에는 기존 접두사로 캐시를 삭제합니다.
  • 유효한 후보가 없으면 빈 목록을 반환합니다. 사진 응답이 늦을 때는 최대 2초까지 기다립니다.

검증

  • MySQL 및 Redis Testcontainers에서 일반 추천과 개인 추천 테스트 9개를 실행했습니다.
  • 로컬 HTTP 서버를 사용한 테스트 2개에서 정상 이미지와 404 및 빈 파일과 HTML 응답을 구분했습니다. 예전 S3 주소와 상대 경로가 같은 파일을 가리키는 경우 CDN 요청을 한 번만 보냅니다.
  • 운영 API의 추천 응답 1건에 이 PR의 검증 코드를 로컬에서 실행했습니다. 사진 경로가 등록된 6개 중 CDN이 403으로 응답한 2개가 빠지고 4개가 반환됐습니다. 같은 응답의 첫 확인은 351ms였고 캐시가 채워진 뒤에는 0.34ms였습니다. 운영 서버에는 읽기 요청만 보냈습니다.
  • 화면에서 이미지 로딩에 실패했을 때의 처리는 웹 PR #648에 있습니다.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T17:55:40.384218Z d6021e6 New commits
🔒 Security Review ✅ Completed 2026-11-29T17:57:31.213991Z d6021e6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

1. **추천 후보 필터링.** 관심 지역 및 무작위 조회는 배경 이미지 URL에 공백이 아닌 문자가 있는 대학만 반환합니다. 무작위 조회는 언어 요구사항 fetch join을 제거하고, 일반 추천 서비스는 새 조회 메서드를 사용합니다.
2. **추천 동작 테스트.** 테스트는 배경 이미지 URL이 비어 있거나 공백인 경우 일반 추천에 이미지가 있는 대학 4곳만 포함되고, 맞춤 추천 결과는 비어 있음을 확인합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to 4e657

Home recommendations now exclude universities without a background photo, and the cache key change keeps older cached results from bypassing the filter. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed 제목 'fix: 배경 사진이 있는 대학만 추천'은 홈 추천 결과에서 배경 사진 경로가 없는 대학을 제외하는 주요 변경과 직접 일치합니다. 일반 추천과 관심 지역 기반 개인 추천 모두 이 조건을 적용하므로 변경 범위와도 맞습니다. 캐시 키 버전 변경과 fetch join 제거는 제목에 없지만 핵심 변경이 아니므로 허용 범위입니다.
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.
Description check Passed PR 설명은 작업 내용, 검증 방법, 관련 웹 PR 링크를 충분히 담고 있습니다. 다만 템플릿의 '관련 이슈' 항목(resolves: #이슈 번호)이 비어 있고, '특이 사항'과 '리뷰 요구사항' 섹션은 작성되지 않았습니다. 핵심 정보는 모두 포함되어 있으므로 전체적으로 거의 완성된 설명입니다. 참고로 PR 설명에는 CDN 확인, 캐시 키 변경, 2초 대기…
Full details: Description check

Explanation

PR 설명은 작업 내용, 검증 방법, 관련 웹 PR 링크를 충분히 담고 있습니다. 다만 템플릿의 '관련 이슈' 항목(resolves: #이슈 번호)이 비어 있고, '특이 사항'과 '리뷰 요구사항' 섹션은 작성되지 않았습니다. 핵심 정보는 모두 포함되어 있으므로 전체적으로 거의 완성된 설명입니다. 참고로 PR 설명에는 CDN 확인, 캐시 키 변경, 2초 대기 등 중요한 동작 변경이 자세히 적혀 있습니다.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6cbf4e86-9c83-418f-9778-628f27002065
Commits

Reviewing files that changed from the base of the PR and between b773743 and 4e65798.

Files selected for processing: 4

  • src/main/java/com/example/solidconnection/university/repository/UnivApplyInfoRepository.java
  • src/main/java/com/example/solidconnection/university/service/GeneralUnivApplyInfoRecommendService.java
  • src/test/java/com/example/solidconnection/university/service/GeneralUnivApplyInfoRecommendServiceTest.java
  • src/test/java/com/example/solidconnection/university/service/UnivApplyInfoRecommendServiceTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@manNomi
manNomi merged commit 4cd6a6d into develop Nov 30, 2026
3 checks passed
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