misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
9.95k stars 1.35k forks source link

refactor/perf(backend): provide metadata statically #14601

Closed syuilo closed 3 weeks ago

syuilo commented 3 weeks ago

What

14578

Why

See #14578

Additional info (optional)

Checklist

github-actions[bot] commented 3 weeks ago

api.jsonの差分作成中にエラーが発生しました。詳細はWorkflowのログを確認してください。

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 52.13483% with 213 lines in your changes missing coverage. Please review.

Project coverage is 39.65%. Comparing base (7640866) to head (699d54e). Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...ages/backend/src/server/web/ClientServerService.ts 0.00% 25 Missing :warning:
...ackages/backend/src/server/api/SignupApiService.ts 5.88% 16 Missing :warning:
packages/backend/src/core/EmailService.ts 21.05% 15 Missing :warning:
packages/backend/src/core/NoteCreateService.ts 57.69% 11 Missing :warning:
packages/backend/src/core/DriveService.ts 67.85% 9 Missing :warning:
...ckages/backend/src/server/web/UrlPreviewService.ts 0.00% 8 Missing :warning:
packages/backend/src/GlobalModule.ts 88.52% 7 Missing :warning:
packages/backend/src/core/WebAuthnService.ts 57.14% 6 Missing :warning:
...ackend/src/server/api/endpoints/notes/translate.ts 33.33% 6 Missing :warning:
...ckages/backend/src/core/chart/charts/federation.ts 44.44% 5 Missing :warning:
... and 33 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14601 +/- ## =========================================== - Coverage 41.47% 39.65% -1.82% =========================================== Files 1545 1541 -4 Lines 197907 192171 -5736 Branches 3595 2520 -1075 =========================================== - Hits 82077 76207 -5870 - Misses 115268 115400 +132 - Partials 562 564 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

syuilo commented 3 weeks ago

思ってたよりパフォーマンス向上効果ありそうな感じがしている

syuilo commented 3 weeks ago

あとサーバー設定の反映が一瞬で行われるようになった

syuilo commented 3 weeks ago

jestでどうmockすればいいのか分からん

syuilo commented 3 weeks ago

overrideProvider(DI.meta).useFactory({ factory: () => meta })じゃダメっぽい

syuilo commented 3 weeks ago

TASUKETE

syuilo commented 3 weeks ago

factoryは一回だけ呼ばれるから参照を保ったままにしないとダメだ

syuilo commented 3 weeks ago

syuilo commented 3 weeks ago

なぜかアンテナのe2eテストが失敗する

syuilo commented 3 weeks ago

ゔわー

syuilo commented 3 weeks ago

Cannot post because it contains prohibited words.

syuilo commented 3 weeks ago

別のe2eテストの設定が残っている可能性があるけど、e2eテスト間ってDBリセットされなかったっけ

syuilo commented 3 weeks ago

あーDBはリセットされるけどnestインスタンスは作り直されないのか

syuilo commented 3 weeks ago

その設計自体見直した方が良さそうだけど何か応急処置を考える必要がある

syuilo commented 3 weeks ago

TASUKETE

syuilo commented 3 weeks ago

通った

syuilo commented 3 weeks ago

マージするか