Skip to content

refactor(backend): UserBlockingService <-> UserFollowingService 双方向循環を解消#17413

Open
samunohito wants to merge 2 commits into
misskey-dev:developfrom
samunohito:refactor/break-userblocking-userfollowing-cycle
Open

refactor(backend): UserBlockingService <-> UserFollowingService 双方向循環を解消#17413
samunohito wants to merge 2 commits into
misskey-dev:developfrom
samunohito:refactor/break-userblocking-userfollowing-cycle

Conversation

@samunohito
Copy link
Copy Markdown
Member

@samunohito samunohito commented May 15, 2026

What

#17412 のサンプルとして、UserBlockingService <-> UserFollowingService の双方向循環参照を解消しました。
データアクセス・キャッシュ保持を責務とした BlockingDataAccessService を作成することで、Blocking / Following がそれぞれ互いを知らなくても良くなりました。

Why

#17412

Additional info (optional)

このprは、「17412をどう実現するのか」のサンプルとしての意味合いが強いです。
そもそもの方針としてダメそうであれば、issue/prともにclose頂けると助かります

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

このPRによるapi.jsonの差分
差分はありません。
Get diff files from Workflow Page

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 58.53659% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.82%. Comparing base (e6375fb) to head (bfce851).

Files with missing lines Patch % Lines
.../src/core/data-access/BlockingDataAccessService.ts 55.55% 11 Missing and 1 partial ⚠️
packages/backend/src/core/UserBlockingService.ts 60.00% 4 Missing ⚠️
packages/backend/src/core/UserFollowingService.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #17413   +/-   ##
========================================
  Coverage    24.82%   24.82%           
========================================
  Files         1156     1157    +1     
  Lines        39330    39347   +17     
  Branches     10952    10949    -3     
========================================
+ Hits          9762     9768    +6     
- Misses       23694    23704   +10     
- Partials      5874     5875    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Backend memory usage comparison

Before GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 311.24 MB 296.37 MB -14.87 MB -4.77%
VmHWM 311.24 MB 296.37 MB -14.87 MB -4.77%
VmSize 23177.34 MB 23162.80 MB -14.53 MB -0.06%
VmData 1377.31 MB 1361.41 MB -15.90 MB -1.15%

After GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 311.32 MB 296.37 MB -14.95 MB -4.80%
VmHWM 311.32 MB 296.37 MB -14.95 MB -4.80%
VmSize 23177.43 MB 23162.80 MB -14.62 MB -0.06%
VmData 1377.39 MB 1361.41 MB -15.98 MB -1.16%

After Request

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 311.74 MB 296.88 MB -14.86 MB -4.76%
VmHWM 311.74 MB 296.88 MB -14.86 MB -4.76%
VmSize 23177.51 MB 23162.97 MB -14.53 MB -0.06%
VmData 1377.48 MB 1361.58 MB -15.90 MB -1.15%

See workflow logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/backend:test packages/backend Server side specific issue/PR size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

1 participant