misskey-dev / misskey

🌎 An interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
9.63k stars 1.28k forks source link

Fix(backend): Limit antenna/clip/list/webhook to exact amount #14036

Closed ltlapy closed 1 week ago

ltlapy commented 1 week ago

アンテナ・Webhook・クリップ・リスト(と、挿入できる項目)の数をロールの設定ぴったりに制限する

What

Why

Additional info (optional)

Checklist

github-actions[bot] commented 1 week ago

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

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

Get diff files from Workflow Page

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 65.22%. Comparing base (379ce01) to head (d2d660c).

Files Patch % Lines
packages/backend/src/core/ClipService.ts 0.00% 2 Missing :warning:
packages/backend/src/core/UserListService.ts 0.00% 1 Missing :warning:
...ackend/src/server/api/endpoints/antennas/create.ts 0.00% 1 Missing :warning:
...kend/src/server/api/endpoints/i/import-antennas.ts 0.00% 1 Missing :warning:
...kend/src/server/api/endpoints/i/webhooks/create.ts 0.00% 1 Missing :warning:
...er/api/endpoints/users/lists/create-from-public.ts 0.00% 1 Missing :warning:
...end/src/server/api/endpoints/users/lists/create.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14036 +/- ## ============================================ - Coverage 77.79% 65.22% -12.58% ============================================ Files 184 1008 +824 Lines 25536 115358 +89822 Branches 487 4620 +4133 ============================================ + Hits 19865 75237 +55372 - Misses 5664 40090 +34426 - Partials 7 31 +24 ```

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

anatawa12 commented 1 week ago

テストに明示的にあるし、なぜ +1 にするのかをしっかり考えたほうが良さそう。

また、互換性的にはマイグレーションで +1 したいきもする (1つを意図して0にしてたところが作れなくて混乱が発生しそう)

KisaragiEffective commented 1 week ago

昨日軽く履歴を追いかけたけど、「テストは後付 (#10358) で、もともとの実装がそうなっていたのを書き起こしたから」以上のことは言えなさそう

マイグレーションはまぁそう

Sayamame-beans commented 1 week ago

This fix #12279

samunohito commented 1 week ago

1件ずれているのがバグなのか仕様なのかで対応が変わりそうです。

@syuilo 過去の経緯など、なにかご存じだったりしますか…?

syuilo commented 1 week ago

覚えてないけどバグじゃないかしら

syuilo commented 1 week ago

🙏

samunohito commented 1 week ago

また、互換性的にはマイグレーションで +1 したいきもする

これは別issueで考えたい感じです?

zyoshoka commented 1 week ago

少なくとも CHANGELOG 要ると思います

KisaragiEffective commented 1 week ago

少なくとも CHANGELOG 要ると思います

→ #14037