Commit Graph

46 Commits

Author SHA1 Message Date
Chocobozzz 14b3e8f445
Fix test after hooks 2022-07-13 11:34:48 +02:00
Chocobozzz b211106695 Support video views/viewers stats in server
* Add "currentTime" and "event" body params to view endpoint
 * Merge watching and view endpoints
 * Introduce WatchAction AP activity
 * Add tables to store viewer information of local videos
 * Add endpoints to fetch video views/viewers stats of local videos
 * Refactor views/viewers handlers
 * Support "views" and "viewers" counters for both VOD and live videos
2022-04-15 09:49:35 +02:00
Chocobozzz 57e4e1c1a9
Don't store remote rates of remote videos
In the future we'll stop to expose all available rates to improve users
privacy
2022-03-18 11:21:50 +01:00
Chocobozzz db1ccd05d3
Fix CI 2022-03-17 10:50:26 +01:00
Chocobozzz 95faf1eaff
Create another test suite for transcoding jobs 2022-02-28 16:02:08 +01:00
Chocobozzz f8360396ff
Stop using tsconfig register
Prefer to replace paths at compile time
2022-01-06 08:26:14 +01:00
Chocobozzz 21d68e6803
Add version to generate types packages 2021-12-28 10:27:06 +01:00
Chocobozzz 6627dbc957
Move types package in packages/ 2021-12-28 10:18:15 +01:00
Chocobozzz b969539c83
Fix types dist paths 2021-12-24 13:28:33 +01:00
Chocobozzz b8a4afa4c2
Optimize server eslint 2021-12-16 17:06:52 +01:00
Chocobozzz 9b3294a849 Fix some build scripts and lint 2021-12-16 10:08:43 +01:00
Chocobozzz 98846837eb
Stop killing peertube in ci script 2021-11-18 15:32:06 +01:00
Chocobozzz fd5fa94bbc
Remove unnecessary env 2021-11-02 10:30:50 +01: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 13e1337791
Speed up plugin transcoding tests 2021-07-22 08:55:14 +02:00
Chocobozzz 2b9f672b58
Improve plugin constant tests 2021-07-21 15:44:28 +02:00
Chocobozzz 29b7426c67
Speedup CI 2021-06-17 10:43:34 +02:00
Chocobozzz 8ebf2a5d5d
Refactor live manager 2021-06-17 08:47:03 +02:00
Chocobozzz 3d470a530c Faster ci using compiled ts files 2021-06-15 08:21:12 +02:00
Chocobozzz d15aebf511 Run misc tests in parallel 2021-05-07 15:42:23 +02:00
Chocobozzz c221d62a8b
Fix CI moderation tests 2021-03-09 15:45:37 +01:00
Chocobozzz 94d721efdc Fix stats tests 2021-02-19 16:29:00 +01:00
Chocobozzz 59fd824cf3 Fix tests timeout 2020-12-14 09:11:27 +01:00
Chocobozzz 34caef7fc0 Add joblog at the end of ci 2020-12-14 09:11:27 +01:00
Chocobozzz 17ae86e912 Display job log in ci 2020-12-14 09:11:27 +01:00
Chocobozzz 0d9c2cc0a2 Test with 3 parallel tests 2020-12-14 09:11:27 +01:00
Chocobozzz c8f3cfeba7 Fix tests 2020-11-09 15:33:04 +01:00
Chocobozzz af4ae64f6f Begin live tests 2020-11-09 15:33:04 +01:00
Chocobozzz f9e1ca7087 Execute external tests on schedule 2020-07-31 11:32:04 +02:00
Chocobozzz f9d2deae3a Correctly test ldap 2020-07-31 11:32:04 +02:00
Chocobozzz 12e8547f07 Test ldap 2020-07-31 11:32:04 +02:00
Chocobozzz f4659d73fb Don't run in parallel cli and plugin tests 2020-07-31 11:32:04 +02:00
Chocobozzz 7abb5c5da1 Use parallel to run tests in parallel 2020-07-31 11:32:04 +02:00
Chocobozzz b488ba1e26 Don't rely on youtube for tests
Use another import URL when possible, and disable import tests when we
want to do a youtube import test
2020-07-31 11:32:04 +02:00
Chocobozzz 07aea1a264
Use TS_NODE_FILES instead of --files
Because --files does not work
2020-06-18 17:14:02 +02:00
Chocobozzz c24aac6bc7
Fix tests 2020-06-18 13:39:13 +02:00
Chocobozzz 829b794a85 Add plugin ldap tests 2020-05-04 16:21:39 +02:00
Chocobozzz a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz 144c6559ed
Relax travis build 2020-01-28 11:37:09 +01:00
Chocobozzz 36619ac8f5
Reduce dev commands RAM usage 2020-01-22 10:18:57 +01:00
Chocobozzz 6848b9f4b2
Use a filtered proxy without variables 2020-01-22 09:36:03 +01:00
Chocobozzz c76130067c
Fix travis regex 2020-01-21 17:02:01 +01:00
Chocobozzz be7ca0c6b9
Use a proxy for youtube-dl to avoid travis errors 2020-01-21 16:46:59 +01:00
Chocobozzz a3705089fa
Remove husky 2020-01-21 14:28:28 +01:00
Chocobozzz 4c8ef0ec68
Add tsconfig-paths registration to mocha 2019-10-21 16:24:06 +02:00
Chocobozzz 2284f20207
Add gitlab ci support 2019-07-29 13:40:39 +02:00