Commit graph

77 commits

Author SHA1 Message Date
Chocobozzz ca90b8f651
Update github actions 2024-02-06 07:34:58 +01:00
Chocobozzz ee8f377515
Update codeql ci 2023-11-08 10:53:32 +01:00
Chocobozzz 678ae8abbd
Breaking: only support node 18
Node 16 is not supported anymore

See https://nodejs.org/fr/blog/announcements/nodejs16-eol
2023-10-11 13:59:24 +02:00
Yehuda Deutsch f7882ca3eb Switch from debian bullseye to bookworm 2023-08-17 15:18:21 +02:00
Chocobozzz a5bde7ad60
Fix benchmark script 2023-08-17 15:03:27 +02:00
Chocobozzz 3a4992633e
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge
conflicts, but it's a major step forward:

 * Server can be faster at startup because imports() are async and we can
   easily lazy import big modules
 * Angular doesn't seem to support ES import (with .js extension), so we
   had to correctly organize peertube into a monorepo:
    * Use yarn workspace feature
    * Use typescript reference projects for dependencies
    * Shared projects have been moved into "packages", each one is now a
      node module (with a dedicated package.json/tsconfig.json)
    * server/tools have been moved into apps/ and is now a dedicated app
      bundled and published on NPM so users don't have to build peertube
      cli tools manually
    * server/tests have been moved into packages/ so we don't compile
      them every time we want to run the server
 * Use isolatedModule option:
   * Had to move from const enum to const
     (https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
   * Had to explictely specify "type" imports when used in decorators
 * Prefer tsx (that uses esbuild under the hood) instead of ts-node to
   load typescript files (tests with mocha or scripts):
     * To reduce test complexity as esbuild doesn't support decorator
       metadata, we only test server files that do not import server
       models
     * We still build tests files into js files for a faster CI
 * Remove unmaintained peertube CLI import script
 * Removed some barrels to speed up execution (less imports)
2023-08-11 15:02:33 +02:00
Chocobozzz c37e305342
Fix CI tests 2023-06-29 10:19:05 +02:00
Chocobozzz 902b16af03
Breaking: remove node 14 support 2023-05-09 10:02:54 +02:00
Chocobozzz 21609258de Increase timeouts 2023-05-09 08:57:34 +02:00
Chocobozzz 3a0c2a77b1 Enable external plugins to test the PR 2023-05-09 08:57:34 +02:00
Chocobozzz ebd61437c1
Revert matrix for docker build 2023-03-27 09:00:16 +02:00
Chocobozzz 43fe59ae86
Fix docker ci matrix 2023-03-23 08:55:27 +01:00
Chocobozzz d6fcbe8d6d
Try to fix docker build timeout 2023-03-22 09:14:20 +01:00
Chocobozzz ca829e9a83
Deprecate node 14 2023-03-15 09:38:24 +01:00
Chocobozzz 0daaab0c0e
Try to fix github api rate limit 2022-12-29 10:24:06 +01:00
Chocobozzz a47bbfcc7f
Fix docker ci 2022-11-02 14:09:54 +01:00
Chocobozzz 3a58ab452d
Upgrade docker action dep 2022-10-31 09:24:31 +01:00
Chocobozzz 823cc35bb5
Revert "Use node 16 for tests"
This reverts commit 1f45f8b00d.
2022-10-28 17:26:26 +02:00
Chocobozzz 1f45f8b00d
Use node 16 for tests 2022-10-28 17:12:33 +02:00
Chocobozzz 9ab330b90d Use private ACL for private videos in s3 2022-10-24 14:48:24 +02:00
Chocobozzz 8c13fd744f
Update upluad artifacts 2022-10-11 14:36:19 +02:00
Chocobozzz 36305301cb
Set AKISMET_KEY as env 2022-09-28 08:25:46 +02:00
Chocobozzz 14b3e8f445
Fix test after hooks 2022-07-13 11:34:48 +02:00
Chocobozzz 388a31d241
Upgrade CI actions 2022-06-27 15:28:32 +02:00
Chocobozzz 95faf1eaff
Create another test suite for transcoding jobs 2022-02-28 16:02:08 +01:00
Chocobozzz 1087427616
Improve benchmark script CLI options 2022-02-28 15:19:44 +01:00
Chocobozzz 7853a425e4
Job name for docker builds 2022-01-03 14:42:53 +01:00
Chocobozzz 6627dbc957
Move types package in packages/ 2021-12-28 10:18:15 +01:00
Chocobozzz fafc7c3cbd
Update resolve tspaths and enabled CI for types 2021-12-28 08:37:05 +01:00
Chocobozzz 4ff75a3b2c
Deprecate node 12 2021-12-24 13:52:32 +01:00
Chocobozzz fe392059a8
Global server dep update 2021-12-24 13:38:00 +01:00
Chocobozzz b969539c83
Fix types dist paths 2021-12-24 13:28:33 +01:00
Chocobozzz e81193b04b
Use bullseye for production docker image 2021-12-13 15:46:12 +01:00
Chocobozzz 390366472d
Fix benchmark ci 2021-12-03 13:35:23 +01:00
Chocobozzz bdb4cc80c3
Move CI on develop 2021-12-03 10:24:33 +01:00
Chocobozzz 51e9e152f7
Build nightly using github action 2021-12-03 10:14:17 +01:00
Chocobozzz f3fbbf0140
Add docker github action 2021-12-03 10:14:17 +01:00
Chocobozzz b202d007cc
Bumped to version v4.0.0-rc.1 2021-12-03 10:14:17 +01:00
Chocobozzz 1255f22de4
Use node 14 for lighthouse 2021-11-25 15:43:10 +01:00
Chocobozzz 0c5639f4f3
More precise startup benchmark 2021-11-24 15:52:45 +01:00
Chocobozzz 1622e09523
Typo 2021-11-22 15:54:08 +01:00
Chocobozzz 82c2120614
Add startup time benchmark 2021-11-22 15:51:28 +01:00
Chocobozzz 0d22b7ad5f
Use postgres 10 for tests 2021-08-26 10:01:42 +02:00
Chocobozzz 1f6125be8b
Optimize torrent URL update 2021-08-18 09:14:51 +02:00
Jelle Besseling 0305db28c9
Add support for saving video files to object storage (#4290)
* Add support for saving video files to object storage

* Add support for custom url generation on s3 stored files

Uses two config keys to support url generation that doesn't directly go
to (compatible s3). Can be used to generate urls to any cache server or
CDN.

* Upload files to s3 concurrently and delete originals afterwards

* Only publish after move to object storage is complete

* Use base url instead of url template

* Fix mistyped config field

* Add rudenmentary way to download before transcode

* Implement Chocobozzz suggestions

https://github.com/Chocobozzz/PeerTube/pull/4290#issuecomment-891670478

The remarks in question:
    Try to use objectStorage prefix instead of s3 prefix for your function/variables/config names
    Prefer to use a tree for the config: s3.streaming_playlists_bucket -> object_storage.streaming_playlists.bucket
    Use uppercase for config: S3.STREAMING_PLAYLISTS_BUCKETINFO.bucket -> OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET (maybe BUCKET_NAME instead of BUCKET)
    I suggest to rename moveJobsRunning to pendingMovingJobs (or better, create a dedicated videoJobInfo table with a pendingMove & videoId columns so we could also use this table to track pending transcoding jobs)
    https://github.com/Chocobozzz/PeerTube/pull/4290/files#diff-3e26d41ca4bda1de8e1747af70ca2af642abcc1e9e0bfb94239ff2165acfbde5R19 uses a string instead of an integer
    I think we should store the origin object storage URL in fileUrl, without base_url injection. Instead, inject the base_url at "runtime" so admins can easily change this configuration without running a script to update DB URLs

* Import correct function

* Support multipart upload

* Remove import of node 15.0 module stream/promises

* Extend maximum upload job length

Using the same value as for redundancy downloading seems logical

* Use dynamic part size for really large uploads

Also adds very small part size for local testing

* Fix decreasePendingMove query

* Resolve various PR comments

* Move to object storage after optimize

* Make upload size configurable and increase default

* Prune webtorrent files that are stored in object storage

* Move files after transcoding jobs

* Fix federation

* Add video path manager

* Support move to external storage job in client

* Fix live object storage tests

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-08-17 08:26:20 +02:00
Chocobozzz 44364d06d7
Trigger test build for any branch 2021-07-20 15:27:18 +02:00
Chocobozzz dcc30997d1
Trigger a build for any branch 2021-07-20 15:27:17 +02:00
Chocobozzz 29b7426c67
Speedup CI 2021-06-17 10:43:34 +02:00
Chocobozzz bfe6e0d9f7
Add lighthouse to github action 2021-05-27 09:15:29 +02:00
Chocobozzz 4b91bc1525 Reduce pending job waiting 2021-05-07 15:42:23 +02:00