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

enhance: AVIF support #9281

Merged
merged 12 commits into from
Dec 8, 2022
Merged

Conversation

tamaina
Copy link
Contributor

@tamaina tamaina commented Dec 5, 2022

Resolve #9275

What

AVIFをプレビューするように

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Dec 5, 2022
@tamaina tamaina requested a review from syuilo December 5, 2022 12:48
@tamaina tamaina marked this pull request as ready for review December 5, 2022 12:48
@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Dec 5, 2022
@saschanaz
Copy link
Member

Tests have been failing for some time, is there a tracking issue for that?

@tamaina
Copy link
Contributor Author

tamaina commented Dec 5, 2022

#9230 ?

@tamaina
Copy link
Contributor Author

tamaina commented Dec 5, 2022

いや違うな

@tamaina
Copy link
Contributor Author

tamaina commented Dec 5, 2022

これじゃ完全じゃないのか

@saschanaz
Copy link
Member

まだlinterエラー何個かありますね

@tamaina
Copy link
Contributor Author

tamaina commented Dec 5, 2022

linterエラーは今回は無視で…

@saschanaz
Copy link
Member

FAIL test/unit/MetaService.ts
  ● Test suite failed to run

    Your test suite must contain at least one test.

      at onResult (../../node_modules/.store/@jest-core-virtual-2ac1eab308/node_modules/@jest/core/build/TestScheduler.js:133:18)
      at ../../node_modules/.store/emittery-npm-0.13.1-cb6cd1bb03/node_modules/emittery/index.js:363:13
          at Array.map (<anonymous>)
      at Emittery.emit (../../node_modules/.store/emittery-npm-0.13.1-cb6cd1bb03/node_modules/emittery/index.js:361:23)

あのテストは削除して後で再び追加した方がいいかもです

@tamaina
Copy link
Contributor Author

tamaina commented Dec 5, 2022

p1.a9z.devで動作中

@tamaina tamaina changed the title chore: Make image/avif browsersafe enhance: AVIF support Dec 5, 2022
@tamaina
Copy link
Contributor Author

tamaina commented Dec 6, 2022

/deploy sha=31ac457

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

Your preview environment pr-9281-syuilo has been deployed.

Preview environment endpoint is available here

@tamaina
Copy link
Contributor Author

tamaina commented Dec 6, 2022

503吐いてる

@syuilo
Copy link
Member

syuilo commented Dec 6, 2022

misskey-7b9f68b76f-jdv6rmisskey> yarn migrate && yarn start
misskey-7b9f68b76f-jdv6rmisskey
misskey-7b9f68b76f-jdv6rmisskeyUsage Error: The project in /misskey/package.json doesn't seem to have been installed - running an install there might help
misskey-7b9f68b76f-jdv6rmisskey

@tamaina
Copy link
Contributor Author

tamaina commented Dec 6, 2022

ちょっと今すぐにはよくわからない
(Dockerfileで各ワークスペースのnode_modulesをコピーしてないのが原因…?

@tamaina
Copy link
Contributor Author

tamaina commented Dec 6, 2022

#9281 (comment)#9291

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

/deploy sha=0037850

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

やっぱダメそう?

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

/deploy sha=cb3c032

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

/deploy sha=4c8587d

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

どう @syuilo

@syuilo
Copy link
Member

syuilo commented Dec 7, 2022

起動処理がまだ途中

@syuilo
Copy link
Member

syuilo commented Dec 7, 2022

misskey-565cf54667-tspzrmisskeyDONE * [core boot] All workers started
misskey-565cf54667-tspzrmisskeyDONE * [core boot] Now listening on port 3000 on https://misskey-pr-9281-syuilo.cloud.okteto.net/

@syuilo
Copy link
Member

syuilo commented Dec 7, 2022

misskey-565cf54667-tspzrmisskey[ioredis] Unhandled error event: Error: connect ETIMEDOUT
misskey-565cf54667-tspzrmisskey at Socket.<anonymous> (/misskey/node_modules/.store/ioredis-npm-4.28.5-74671f2fa3/node_modules/ioredis/built/redis/index.js:327:37)
misskey-565cf54667-tspzrmisskey at Object.onceWrapper (node:events:627:28)
misskey-565cf54667-tspzrmisskey at Socket.emit (node:events:513:28)
misskey-565cf54667-tspzrmisskey at Socket.emit (node:domain:489:12)
misskey-565cf54667-tspzrmisskey at Socket._onTimeout (node:net:562:8)
misskey-565cf54667-tspzrmisskey at listOnTimeout (node:internal/timers:564:17)
misskey-565cf54667-tspzrmisskey at process.processTimers (node:internal/timers:507:7)
misskey-565cf54667-tspzrmisskeyERR 1 [queue system] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue deliver] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue inbox] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue db] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue objectStorage] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue webhook] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue deliver] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue inbox] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue webhook] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue db] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue objectStorage] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [queue system] error undefined
misskey-565cf54667-tspzrmisskeyERR 1 [server] Error: bind EADDRNOTAVAIL 35.225.69.73:3000
misskey-565cf54667-tspzrmisskeyError: bind EADDRNOTAVAIL 35.225.69.73:3000
misskey-565cf54667-tspzrmisskey at listenOnPrimaryHandle (node:net:1553:18)
misskey-565cf54667-tspzrmisskey at rr (node:internal/cluster/child:159:12)
misskey-565cf54667-tspzrmisskey at Worker.<anonymous> (node:internal/cluster/child:109:7)
misskey-565cf54667-tspzrmisskey at process.onInternalMessage (node:internal/cluster/utils:49:5)
misskey-565cf54667-tspzrmisskey at process.emit (node:events:525:35)
misskey-565cf54667-tspzrmisskey at process.emit (node:domain:489:12)
misskey-565cf54667-tspzrmisskey at emit (node:internal/child_process:937:14)
misskey-565cf54667-tspzrmisskey at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
misskey-565cf54667-tspzrmisskey errno: -99,
misskey-565cf54667-tspzrmisskey code: 'EADDRNOTAVAIL',
misskey-565cf54667-tspzrmisskey syscall: 'bind',
misskey-565cf54667-tspzrmisskey address: '35.225.69.73',
misskey-565cf54667-tspzrmisskey port: 3000
misskey-565cf54667-tspzrmisskey}
misskey-565cf54667-tspzrmisskeyERR * [core boot] The server Listen failed due to the previous error.
misskey-565cf54667-tspzrmisskeyINFO * [core] The process is going to exit with code 1

@tamaina
Copy link
Contributor Author

tamaina commented Dec 7, 2022

うーんさっぱりわからん

@ikuradon
Copy link
Contributor

ikuradon commented Dec 8, 2022

Oktetoが動かないのでとりあえず手元クラスタで動かしてみたんですけど、多分これurlのドメイン部分を正引きしたアドレスでbindしようとしてますね…
url: https://google.comにしてみたとき

[Nest] 90  - 12/08/2022, 1:13:25 AM     LOG [InstanceLoader] CoreModule dependencies initialized +6ms
INFO *	[db sql]	DELETE FROM "attestation_challenge" WHERE "createdAt" < $1
ERR  1	[server]	Error: bind EADDRNOTAVAIL 2404:6800:4004:821::200e:3000
ERR  *	[core boot]	The server Listen failed due to the previous error.
INFO *	[core]	The process is going to exit with code 1
Error: bind EADDRNOTAVAIL 2404:6800:4004:821::200e:3000
    at listenOnPrimaryHandle (node:net:1553:18)
    at rr (node:internal/cluster/child:159:12)
    at Worker.<anonymous> (node:internal/cluster/child:109:7)
    at process.onInternalMessage (node:internal/cluster/utils:49:5)
    at process.emit (node:events:525:35)
    at process.emit (node:domain:489:12)
    at emit (node:internal/child_process:937:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -99,
  code: 'EADDRNOTAVAIL',
  syscall: 'bind',
  address: '2404:6800:4004:821::200e',
  port: 3000
}
INFO 1	[core]	The process is going to exit with code 0

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

/deploy sha=f1a82a6

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

0.0.0.0でも

tspzrmisskeyError: bind EADDRNOTAVAIL 35.225.69.73:3000
misskey-565cf54667-tspzrmisskey at listenOnPrimaryHandle (node:net:1553:18)
misskey-565cf54667-tspzrmisskey at rr (node:internal/cluster/child:159:12)
misskey-565cf54667-tspzrmisskey at Worker.<anonymous> (node:internal/cluster/child:109:7)
misskey-565cf54667-tspzrmisskey at process.onInternalMessage (node:internal/cluster/utils:49:5)
misskey-565cf54667-tspzrmisskey at process.emit (node:events:525:35)
misskey-565cf54667-tspzrmisskey at process.emit (node:domain:489:12)
misskey-565cf54667-tspzrmisskey at emit (node:internal/child_process:937:14)
misskey-565cf54667-tspzrmisskey at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
misskey-565cf54667-tspzrmisskey errno: -99,
misskey-565cf54667-tspzrmisskey code: 'EADDRNOTAVAIL',
misskey-565cf54667-tspzrmisskey syscall: 'bind',
misskey-565cf54667-tspzrmisskey address: '35.225.69.73',
misskey-565cf54667-tspzrmisskey port: 3000
misskey-565cf54667-tspzrmisskey}

が出る

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

いや適用前でデプロイされてただけかも

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

なんか今またデプロイ走ってる

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

Redisのエラーは相変わらず出てるけど

misskey-79cdc799bc-89bc6misskey[ioredis] Unhandled error event: Error: connect ETIMEDOUT
misskey-79cdc799bc-89bc6misskey at Socket.<anonymous> (/misskey/node_modules/.store/ioredis-npm-4.28.5-74671f2fa3/node_modules/ioredis/built/redis/index.js:327:37)
misskey-79cdc799bc-89bc6misskey at Object.onceWrapper (node:events:627:28)
misskey-79cdc799bc-89bc6misskey at Socket.emit (node:events:513:28)
misskey-79cdc799bc-89bc6misskey at Socket.emit (node:domain:489:12)
misskey-79cdc799bc-89bc6misskey at Socket._onTimeout (node:net:562:8)
misskey-79cdc799bc-89bc6misskey at listOnTimeout (node:internal/timers:564:17)

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

Redisエラー出てるわりには普通にストリーミング動いてる

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

無料だからしょうがないけどCPUが貧弱

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

連合するとあまたのインスタンスから照会リクエスト飛んできてCPU使い切って実質死ぬわね

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

無料だからしょうがないけどCPUが貧弱

JSの1行実行するのに10msくらいかかってそう

@tamaina
Copy link
Contributor Author

tamaina commented Dec 8, 2022

あっ…申し訳ない…

@tamaina
Copy link
Contributor Author

tamaina commented Dec 8, 2022

(OCI A1 4コアでも毎回のdeliverでCPUが100%に跳ね上がっている

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

これ有料プランにしたらCPUパワーも上がるのかね
ただ無料の次が月額$99で少し高い

@syuilo
Copy link
Member

syuilo commented Dec 8, 2022

https://www.okteto.com/pricing/ だと$99になってるけど管理画面で見ると$149となっていてどっちなのか分からない
(いずれにしても高い)

@tamaina
Copy link
Contributor Author

tamaina commented Dec 8, 2022

3万ぐらいの自宅サーバーで頑張ったほうが安上がり?同じようなソリューションがあるかは知らない

@CyberRex0
Copy link
Contributor

CyberRex0 commented Dec 8, 2022

JetBrainsのTeamCityで自家CD/CIできるかも
無料で使える
https://www.jetbrains.com/ja-jp/teamcity/
https://www.jetbrains.com/ja-jp/teamcity/features/vcs_interoperability.html
https://www.jetbrains.com/help/teamcity/integrating-teamcity-with-vcs-hosting-services.html

@syuilo syuilo merged commit e81c296 into misskey-dev:develop Dec 8, 2022
yu256 added a commit to yu256/akatsukey that referenced this pull request Mar 5, 2023
* chore: Make image/avif browsersafe

* server side

* change FileInfoService

* ✌️

* avifはMastodonでは絶望的 see misskey-dev#9283

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect AVIF as an image file
5 participants