Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backend): リアルタイム更新時のノート取得にCDNキャッシュを併用できるように #15188

Draft
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

kakkokari-gtyih
Copy link
Contributor

@kakkokari-gtyih kakkokari-gtyih commented Dec 28, 2024

What

かいてあるとおり(デフォルトオフ、設定画面には「べータ」の文字も入れてある)

Why

Fix #15187

Additional info (optional)

  • connection.cacheNoteはCDNの使用の有無に関係なく実行すべきでは?(今はioの実装そのままにしてある)
  • CDNの設定などについてMisskey Hubにドキュメントを書く必要がありそう

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

@kakkokari-gtyih kakkokari-gtyih marked this pull request as draft December 28, 2024 09:30
@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js packages/backend:test labels Dec 28, 2024
Copy link

codecov bot commented Dec 28, 2024

Codecov Report

Attention: Patch coverage is 54.02299% with 160 lines in your changes missing coverage. Please review.

Project coverage is 41.57%. Comparing base (3c81926) to head (d66c2a6).

Files with missing lines Patch % Lines
...ages/backend/src/server/web/ClientServerService.ts 1.23% 80 Missing ⚠️
packages/frontend/src/components/MkTimeline.vue 0.00% 45 Missing ⚠️
packages/frontend/src/pages/admin/performance.vue 0.00% 16 Missing ⚠️
...ges/backend/src/core/entities/NoteEntityService.ts 27.27% 8 Missing ⚠️
packages/frontend/src/scripts/merge.ts 0.00% 5 Missing ⚠️
...kend/src/server/api/endpoints/admin/update-meta.ts 20.00% 4 Missing ⚠️
...ges/backend/src/core/entities/MetaEntityService.ts 0.00% 1 Missing ⚠️
...ges/backend/src/server/api/endpoints/admin/meta.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #15188      +/-   ##
===========================================
+ Coverage    39.96%   41.57%   +1.61%     
===========================================
  Files         1563     1567       +4     
  Lines       197878   203973    +6095     
  Branches      3646     3685      +39     
===========================================
+ Hits         79080    84806    +5726     
- Misses      118193   118560     +367     
- Partials       605      607       +2     

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

Copy link
Contributor

github-actions bot commented Dec 28, 2024

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -431,6 +431,9 @@
                     "enableReactionsBuffering": {
                       "type": "boolean"
                     },
+                    "enableStreamNotesCdnCache": {
+                      "type": "boolean"
+                    },
                     "notesPerOneAd": {
                       "type": "number"
                     },
@@ -664,6 +667,7 @@
                     "perUserHomeTimelineCacheMax",
                     "perUserListTimelineCacheMax",
                     "enableReactionsBuffering",
+                    "enableStreamNotesCdnCache",
                     "notesPerOneAd",
                     "backgroundImageUrl",
                     "deeplAuthKey",
@@ -14333,6 +14337,9 @@
                   "enableReactionsBuffering": {
                     "type": "boolean"
                   },
+                  "enableStreamNotesCdnCache": {
+                    "type": "boolean"
+                  },
                   "notesPerOneAd": {
                     "type": "integer"
                   },
@@ -82429,6 +82436,9 @@
           "enableUrlPreview": {
             "type": "boolean"
           },
+          "enableStreamNotesCdnCache": {
+            "type": "boolean"
+          },
           "backgroundImageUrl": {
             "type": [
               "string",
@@ -82529,6 +82539,7 @@
           "translatorAvailable",
           "mediaProxy",
           "enableUrlPreview",
+          "enableStreamNotesCdnCache",
           "backgroundImageUrl",
           "impressumUrl",
           "logoImageUrl",

Get diff files from Workflow Page

@anatawa12
Copy link
Member

具体的な方法を思いついてないけど、型の問題どうにかしたい気持ちがある

@kakkokari-gtyih
Copy link
Contributor Author

kakkokari-gtyih commented Dec 29, 2024

具体的な方法を思いついてないけど、型の問題どうにかしたい気持ちがある

どの部分かしら?

@kakkokari-gtyih
Copy link
Contributor Author

具体的な方法を思いついてないけど、型の問題どうにかしたい気持ちがある

どの部分かしら?

とりあえずmisskey-js側に型ガード関数を置いてtestのアサーションを撲滅した

@anatawa12
Copy link
Member

minimizeがfalse/未指定のときにはnote eventはNoteを返してほしい。古いコードの型を壊しちゃうのと、シンプルに対応する気がない人がわざわざasしないといけないのは避けたい

@kakkokari-gtyih
Copy link
Contributor Author

minimizeがfalse/未指定のときにはnote eventはNoteを返してほしい。古いコードの型を壊しちゃうのと、シンプルに対応する気がない人がわざわざasしないといけないのは避けたい

もの自体はそうなってるはず(型をあわせるのは難しそうなのでガード関数にした)

@anatawa12
Copy link
Member

minimizeがfalse/未指定のときにはnote eventはNoteを返してほしい。古いコードの型を壊しちゃうのと、シンプルに対応する気がない人がわざわざasしないといけないのは避けたい

これは型の上でそうしたいってこと

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 packages/frontend Client side specific issue/PR packages/misskey-js
Projects
4 participants