Skip to content

In 362 analytics 관련 수정사항 반영 - #213

Merged
youcastle03 merged 3 commits into
developfrom
in-362-analytics-관련-수정사항-반영
Jun 29, 2026

Hidden character warning

The head ref may contain hidden characters: "in-362-analytics-\uad00\ub828-\uc218\uc815\uc0ac\ud56d-\ubc18\uc601"
Merged

youcastle03 merged 3 commits into
developfrom
in-362-analytics-관련-수정사항-반영

Conversation

@youcastle03

@youcastle03 youcastle03 commented Jun 28, 2026 •

Copy link
Copy Markdown
Collaborator

Issue


comment

analytics 관련하여 추가 요청사항 반영하였습니다!!

Summary by CodeRabbit

  • Bug Fixes
    • 채널 참여율 응답의 일부 필드명이 longFormEngagementRate / shortFormEngagementRate로 변경되었습니다.
    • 신규 구독자 영상이나 구독자 분포 분석 데이터가 없을 경우, 빈 결과 대신 데이터 없음 오류를 반환하도록 개선되었습니다.

@youcastle03 youcastle03 self-assigned this Jun 28, 2026
@coderabbitai

coderabbitai Bot commented Jun 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 45 minutes and 8 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ 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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0d6e44ba-4b46-4bc3-84bb-76fdeb46854d

📥 Commits

Reviewing files that changed from the base of the PR and between a889b6a and 95b2684.

📒 Files selected for processing (1)
  • src/main/java/com/example/inflace/domain/channel/controller/ChannelApi.java

Walkthrough

ChannelEngagementRateResponse.Summary 레코드의 두 필드명에서 "Average"를 제거하고, getNewSubscriberVideos와 getSubscriberDistribution에서 빈 analytics 데이터 조회 시 ANALYTICS_DATA_NOT_FOUND 예외를 발생시키는 검증 로직을 추가했습니다.

Changes

채널 분석 데이터 검증 강화 및 응답 필드명 변경

Layer / File(s) Summary
EngagementRate 응답 필드명 변경
src/main/java/com/example/inflace/domain/channel/dto/response/ChannelEngagementRateResponse.java
Summary 레코드의 longFormAverageEngagementRate → longFormEngagementRate, shortFormAverageEngagementRate → shortFormEngagementRate로 필드명 변경.
빈 analytics 데이터 예외 처리 및 검증 헬퍼 추가
src/main/java/com/example/inflace/domain/channel/service/ChannelService.java
getNewSubscriberVideos에서 빈 videos 리스트 시 예외 발생, getSubscriberDistribution에 validateSubscriberDistributionAnalytics 호출 추가, validateSubscriberDistributionAnalytics 및 isEmpty(Map<?, ?>) 헬퍼 메서드 신규 도입.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • JECT-Study/inflace-4th-server#44: 구독자 분포 DTO/엔드포인트 및 서비스 흐름을 최초 도입한 PR로, 이번 PR의 getSubscriberDistribution 검증 로직 추가와 직접 연관됨.

Suggested labels

👨🏻‍💻backend

🐇 필드 이름에서 Average를 지우고,
빈 데이터엔 예외를 던지네~
구독자도, 영상도, 분포도
이제 빈 손으론 못 돌아가!
토끼도 깔끔한 응답이 좋아 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive 제목은 analytics 관련 수정임을 나타내지만 구체적인 변경 내용을 충분히 드러내지 않아 다소 포괄적입니다. 채널 참여율 응답 필드명 변경과 구독자 통계 데이터 없음 처리 추가처럼 핵심 변경을 더 구체적으로 반영하세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch in-362-analytics-관련-수정사항-반영

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.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/example/inflace/domain/channel/service/ChannelService.java (1)

253-266: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

새 예외가 공개 API 계약에 반영되지 않았습니다.

Line 253에서 ANALYTICS_DATA_NOT_FOUND를 새로 던지도록 바뀌었는데, src/main/java/com/example/inflace/domain/channel/controller/ChannelApi.java:84-90의 getSubscriberDistribution는 아직 이 에러를 선언하지 않습니다. 실제 응답과 Swagger 계약이 달라집니다.

수정 예시
 `@ApiErrorDefines`({
     ErrorDefine.INVALID_ARGUMENT,
     ErrorDefine.CHANNEL_NOT_FOUND,
     ErrorDefine.AUTH_FORBIDDEN,
-    ErrorDefine.CHANNEL_ANALYTICS_NOT_FOUND
+    ErrorDefine.CHANNEL_ANALYTICS_NOT_FOUND,
+    ErrorDefine.ANALYTICS_DATA_NOT_FOUND
 })
 BaseResponse<ChannelSubscriberDistributionResponse> getSubscriberDistribution(`@PathVariable` Long channelId);
🤖 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 `@src/main/java/com/example/inflace/domain/channel/service/ChannelService.java`
around lines 253 - 266, `ChannelService.validateSubscriberDistributionAnalytics`
now throws `ErrorDefine.ANALYTICS_DATA_NOT_FOUND`, but
`ChannelApi.getSubscriberDistribution` does not declare it in the public API
contract. Update the `getSubscriberDistribution` endpoint so its
documented/declared responses include this new exception, keeping the
controller’s Swagger contract and actual behavior aligned.
🤖 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.

Outside diff comments:
In
`@src/main/java/com/example/inflace/domain/channel/service/ChannelService.java`:
- Around line 253-266: `ChannelService.validateSubscriberDistributionAnalytics`
now throws `ErrorDefine.ANALYTICS_DATA_NOT_FOUND`, but
`ChannelApi.getSubscriberDistribution` does not declare it in the public API
contract. Update the `getSubscriberDistribution` endpoint so its
documented/declared responses include this new exception, keeping the
controller’s Swagger contract and actual behavior aligned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ea629979-d22b-4c22-90dc-d8a3086b09de

📥 Commits

Reviewing files that changed from the base of the PR and between d6f5d9f and a889b6a.

📒 Files selected for processing (2)
  • src/main/java/com/example/inflace/domain/channel/dto/response/ChannelEngagementRateResponse.java
  • src/main/java/com/example/inflace/domain/channel/service/ChannelService.java

@HanYoonSoo HanYoonSoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

고생하셨습니다~!

@MINUUUUUUUUUUUU MINUUUUUUUUUUUU left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

수고하셨습니다~

@youcastle03
youcastle03 merged commit 135a47b into develop Jun 29, 2026
3 checks passed
@youcastle03
youcastle03 deleted the in-362-analytics-관련-수정사항-반영 branch June 29, 2026 12:52
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.

3 participants