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

suspend周りの改修 #14409

Closed syuilo closed 1 month ago

syuilo commented 2 months ago

What

Why

Additional info (optional)

Checklist

github-actions[bot] commented 2 months ago

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

差分はこちら ```diff ```

Get diff files from Workflow Page

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 24.30556% with 109 lines in your changes missing coverage. Please review.

Project coverage is 41.65%. Comparing base (45d8857) to head (daeab84). Report is 2 commits behind head on develop.

Files Patch % Lines
packages/backend/src/core/UserSuspendService.ts 21.05% 60 Missing :warning:
packages/backend/src/core/DeleteAccountService.ts 21.15% 41 Missing :warning:
...ackages/frontend/src/pages/admin/modlog.ModLog.vue 0.00% 4 Missing :warning:
.../src/server/api/endpoints/admin/accounts/delete.ts 33.33% 2 Missing :warning:
...end/src/server/api/endpoints/admin/suspend-user.ts 50.00% 1 Missing :warning:
...d/src/server/api/endpoints/admin/unsuspend-user.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14409 +/- ## =========================================== + Coverage 39.91% 41.65% +1.73% =========================================== Files 1545 1549 +4 Lines 190506 196605 +6099 Branches 3506 3573 +67 =========================================== + Hits 76046 81892 +5846 - Misses 113869 114150 +281 + Partials 591 563 -28 ```

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

syuilo commented 1 month ago

pnpm build-misskey-js-with-types すると

Oops! Something went wrong! :(

ESLint: 9.8.0

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
    at callTranslator (node:internal/modules/esm/loader:436:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)
syuilo commented 1 month ago

tasukete

syuilo commented 1 month ago

依存関係更新したら出なくなったけど Unsupported schema format, expected openapi: 3.x と言われる

syuilo commented 1 month ago

直った

syuilo commented 1 month ago

今度は

✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
 ✘  Every operation must have a unique `operationId`.
syuilo commented 1 month ago

tasukete

syuilo commented 1 month ago
// misskey-jsはPOST固定で送っているので、こちらも決め打ちする。別メソッドに対応することがあればこちらも直す必要あり

が関係している?

kakkokari-gtyih commented 1 month ago

pnpm --filter misskey-js api (api extractor生成物の再生成)する必要がありそう(build-misskey-js-with-typesをすれば普通は自動で生成されるけど)

samunohito commented 1 month ago

Every operation must have a unique operationId.

getとpostがあるエンドポイントに同一のoperationidがあてがわれていることが原因と推測します。 この辺と関連ありそう https://github.com/misskey-dev/misskey/issues/13498

samunohito commented 1 month ago

(というかなんの対応を行うprなんだろう…)

KisaragiEffective commented 1 month ago

(というかなんの対応を行うprなんだろう…)

物理削除に対してモデログを残す対応っぽい?

syuilo commented 1 month ago

(というかなんの対応を行うprなんだろう…)

物理削除に対してモデログを残す対応っぽい?

なんかいろいろやる

samunohito commented 1 month ago

コード以外にも何したかわかるような情報を残してくれるとちぇりぴする時とかに嬉しいかも

syuilo commented 1 month ago

語彙力がないから説明できないわね

syuilo commented 1 month ago

SyntaxError: Unexpected identifier 'assert' が再発した

syuilo commented 1 month ago

eslint ./built/*/.ts --fix って要る??

syuilo commented 1 month ago

/home/runner/work/misskey/misskey/packages/misskey-js/generator/built/autogen/types.ts 4:8 error Parsing error: ',' expected

nani

samunohito commented 1 month ago

misskey-jsまわりのupdate deps、必須でないのであれば後回しが丸いのでは…

syuilo commented 1 month ago

必須っぽそう

syuilo commented 1 month ago

自分のnodeを20に下げれば良いかもしれないけど

anatawa12 commented 1 month ago

SyntaxError: Unexpected identifier 'assert'

eslint周りのどっかのパッケージが node v22 で廃止された import asserts を使ってそう。てもとでもnode v22だと再現した

anatawa12 commented 1 month ago
/home/runner/work/misskey/misskey/packages/misskey-js/generator/built/autogen/types.ts
4:8 error Parsing error: ',' expected

nani

types.tsがこうなってたのでジェネレータのどっかがおかしい。openapi-typescriptのmajor更新が原因そう

/* eslint @typescript-eslint/naming-convention: 0 */
/* eslint @typescript-eslint/no-explicit-any: 0 */

[object Object],[object Object],[object Object],[object Object],[object Object]
anatawa12 commented 1 month ago

misskey-dev/eslint-pluginがimport assert使ってるからそれじゃないかな

syuilo commented 1 month ago

🙏🏿🙏🏿🙏🏿

anatawa12 commented 1 month ago

misskey-dev/eslint-pluginがimport assert使ってるからそれじゃないかな

とりあえず issueだけ misskey-dev/eslint-plugin-misskey-dev#4

anatawa12 commented 1 month ago

misskey-dev/eslint-plugin を直せば misskey js 周りの変更を全体的に戻しても node v22 でも問題なく動きそうとりあえず戻すPRと、eslint-plugin側の修正を準備します

anatawa12 commented 1 month ago

当面は node v20 で作業していただけると多分ありがたいです

syuilo commented 1 month ago

近いうちにやらなきゃいけないし戻さなくても良さそう

anatawa12 commented 1 month ago

一つのPRにまとめるとわけがわからなくなるので分けてほしい気持ち

syuilo commented 1 month ago

難しい

syuilo commented 1 month ago

PR形式でやるとこうなっちゃうからdevelopに直接入れようと思ったけどテストの様子を見たいからPR形式にした

syuilo commented 1 month ago

どかっとなんかいろいろな言葉にできないような変更を一括的に行いたいときの良い方法がなさそう

anatawa12 commented 1 month ago

どかっとなんかいろいろな言葉にできないような変更を一括的に行いたいとき

分割できない範囲はまぁまとまっててもいいと思いますが分割できる範囲は別にしてて欲しい...

あとはSquashせずにPRにして、Mergeまえにrebase iで適宜reward . fixupするとかがあとから遡るときにわかりやすくていいと思ってます

syuilo commented 1 month ago

🙏🏻