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

fix(backend): happy-domで外部HTMLをパースする際に関連リソースが読み込まれる問題を修正 #14521

Closed kakkokari-gtyih closed 4 weeks ago

kakkokari-gtyih commented 1 month ago

version 10 didn't quite support disabling all of that

I have tested that MfmService (the other code that uses happy-dom) still works fine: the RSS feed for a user is generated correctly, with HTML rendered from MFM

(cherry picked from commit 26e0412fbb91447c37e8fb06ffb0487346063bb8)

What

https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/610?commit_id=f244d425005ae662cfb94f2a18e38cedadfb3c0a#note_5069

Why

無駄かも

Additional info (optional)

v14で見られたメモリリークはv15になるときのリファクタリングで解消されたかもしれないという報告があるけど真偽は不明

https://github.com/capricorn86/happy-dom/issues/1055#issuecomment-2332029328

Checklist

github-actions[bot] commented 1 month ago

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

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

Get diff files from Workflow Page

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 39.62%. Comparing base (837a8e1) to head (f9c7bd1). Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...s/backend/src/core/activitypub/ApRequestService.ts 0.00% 33 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14521 +/- ## ============================================ + Coverage 19.53% 39.62% +20.09% ============================================ Files 713 1535 +822 Lines 100287 190816 +90529 Branches 997 2597 +1600 ============================================ + Hits 19591 75618 +56027 - Misses 80152 114637 +34485 - Partials 544 561 +17 ```

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

syuilo commented 4 weeks ago

🙏🏿

kakkokari-gtyih commented 3 weeks ago

Sharkeyでこの変更からしばらくしたあとにメモリ使用量の瞬間的な増加が見られたらしいのでやっぱあかんかもしれない(原因の切り分けまではまだ行われていないので今なにかをするというよりかはそういうことがあったということを覚えておく程度で良い)