Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Common library and Signalling Tester #473

Merged
merged 69 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
6c3f95f
First commit of a concept for testing signalling.
mcottontensor Nov 29, 2023
42221c3
Moved the testing connection to a module and added a bunch of comments
mcottontensor Nov 29, 2023
63b96b3
Added socket event expects and events.
mcottontensor Nov 30, 2023
4ce813a
Converted to a typescript project.
mcottontensor Nov 30, 2023
82214a2
Trying to move logger and messages out into their own lib
mcottontensor Dec 6, 2023
a631c88
Get NPM packages to build by NPM link common and exporting some packa…
lukehb Dec 11, 2023
1ff2839
Cleaning up
mcottontensor Dec 11, 2023
40703c7
Added transport and protocol pairing
mcottontensor Dec 14, 2023
b09a5e1
Fixing naming
mcottontensor Dec 14, 2023
86483d4
More naming fixing. cases
mcottontensor Dec 14, 2023
578816b
Created a tester context which handles phase validation etc.
mcottontensor Jan 10, 2024
13d6a89
Adding protobuf messages and building scripts etc. Not actually used …
mcottontensor Jan 10, 2024
5546e0f
Implementing the protobuf messages when we read them off the line.
mcottontensor Jan 11, 2024
331308e
Sending protobuf messages.
mcottontensor Jan 11, 2024
df3bcb9
very basic message validation. isnt going to work since required/opti…
mcottontensor Jan 17, 2024
077267a
Validation of proto messages sent and received.
mcottontensor Jan 18, 2024
484bab7
Better use of protobuf messages and its types within the code
mcottontensor Jan 19, 2024
bde44e9
Message handlers can now return errors.
mcottontensor Jan 19, 2024
96ec321
Ice candidate message broken into a submessage.
mcottontensor Jan 21, 2024
7203bce
Renaming socketEvents to events.
mcottontensor Jan 21, 2024
249196b
Moving the protobuf message descriptions into Common
mcottontensor Jan 21, 2024
edfec90
Fixing up some naming of proto messages.
mcottontensor Jan 22, 2024
6e4ce05
Adding signalling test github action.
mcottontensor Jan 22, 2024
726dbf3
Allowing signalling test action to be manually triggered
mcottontensor Jan 22, 2024
73fe703
Update run-signalling-tests.yml
mcottontensor Jan 22, 2024
16e4de6
Adding initial dockerfile. Still WIP
mcottontensor Jan 22, 2024
ed81448
Merge branch 'signalling_tester' of github.com:mcottontensor/PixelStr…
mcottontensor Jan 22, 2024
80413d3
Adding docker compose for testing
mcottontensor Jan 22, 2024
21fa9c4
Updating github action to use docker compose
mcottontensor Jan 22, 2024
de33245
Updating github action
mcottontensor Jan 22, 2024
daf8bde
Fixing action reference
mcottontensor Jan 22, 2024
e66ce63
Adding extra up flags
mcottontensor Jan 22, 2024
4bcdf8d
Adding extra up flags
mcottontensor Jan 22, 2024
9daa7a6
setup should now fail if there are errors in compiling
mcottontensor Jan 22, 2024
75df0ec
Merge branch 'signalling_tester' of github.com:mcottontensor/PixelStr…
mcottontensor Jan 22, 2024
79f7b47
Merge remote-tracking branch 'upstream/master' into signalling_tester
mcottontensor Jan 22, 2024
c370a78
Merge remote-tracking branch 'upstream/master' into signalling_tester
mcottontensor Jan 22, 2024
708f7e3
Fixing up setup script to not die during docker build.
mcottontensor Jan 23, 2024
838e3d3
Adding healthcheck to signalling service so the tests dont start befo…
mcottontensor Jan 23, 2024
67f78b3
Tweaking healthcheck. Adding comment about start interval
mcottontensor Jan 23, 2024
58e90a1
Fixing runner path
mcottontensor Jan 23, 2024
58ea511
Just an empty commit to test that the action trigger is working
mcottontensor Jan 23, 2024
80e9c0d
Adding extra paths to the signalling tester
mcottontensor Jan 23, 2024
c884a85
Just committing a broken test to confirm the action fails
mcottontensor Jan 23, 2024
ae9c22f
Removing the forced failure.
mcottontensor Jan 23, 2024
e369045
Merge branch 'signalling_tester' of github.com:mcottontensor/PixelStr…
mcottontensor Jan 23, 2024
52766b5
Sticking with node 18.17.0
mcottontensor Jan 23, 2024
83a7aaa
Merge branch 'signalling_tester' of github.com:mcottontensor/PixelStr…
mcottontensor Jan 23, 2024
de66372
Fixing up some unit tests.
mcottontensor Jan 23, 2024
7408a0f
Missed a spot
mcottontensor Jan 23, 2024
266e171
Updating more github actions.
mcottontensor Jan 23, 2024
a1bc7e2
I shouldn't have reverted that file.
mcottontensor Jan 23, 2024
3003081
Merge remote-tracking branch 'upstream/master' into signalling_tester
mcottontensor Jan 23, 2024
3cb6741
Adding a basic readme for the common lib
mcottontensor Jan 23, 2024
bfb58c2
Adding a small helper script to run signalling tests.
mcottontensor Jan 23, 2024
874ac40
Fixing reconnect test
mcottontensor Jan 24, 2024
18475a9
Merge branch 'signalling_tester' of github.com:mcottontensor/PixelStr…
mcottontensor Jan 24, 2024
656bad1
A bunch of changes relating to the current PR review. Targeting relea…
mcottontensor Jan 24, 2024
4cb3b1f
Merge branch 'master' into signalling_tester
mcottontensor Jan 24, 2024
63a2b06
Adding a protocol version field to the config message.
mcottontensor Jan 24, 2024
2a050b5
Adding a protocol version field to the endpointId message.
mcottontensor Jan 24, 2024
bfc2716
Error logs will now contain stack traces.
mcottontensor Jan 24, 2024
d36425a
Adding some helpful comments to the ITransport interface.
mcottontensor Jan 24, 2024
d17c7f8
Moving toward EventEmitter on the protocol classes so we can have mul…
mcottontensor Jan 25, 2024
af810c6
Adding small references to Common and SS_Test.
mcottontensor Jan 25, 2024
c8917d1
Removed webpack from common deps. Added lint script.
mcottontensor Jan 25, 2024
2b464e3
Just adding the package lock from common.
mcottontensor Jan 25, 2024
e4509e6
Updating all 5.4 references to 5.5 since this is all targeting UE5.5 …
mcottontensor Jan 25, 2024
2dc27d4
Merge branch 'UE5.5' into signalling_tester
mcottontensor Jan 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Relevant components:
- [ ] Signalling server
- [ ] Common library
- [ ] Frontend library
- [ ] Frontend UI library
- [ ] Matchmaker
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/create-gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,22 @@ jobs:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'

- name: Install common library deps
working-directory: ./Common
run: npm ci

- name: Build common library
working-directory: ./Common
run: npm run build

- name: Install library deps
working-directory: ./Frontend/library
run: npm ci

- name: NPM link common lib into library
working-directory: ./Frontend/library
run: npm link ../../Common

- name: Build frontend lib
working-directory: ./Frontend/library
run: npm run build
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/publish-common-library-to-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish common lib
on:
push:
workflow_dispatch:
branches: ['UE5.5']
paths: ['Common/package.json']
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: Common
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.17.0'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 13 additions & 1 deletion .github/workflows/run-library-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,25 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '18.17.0'
registry-url: 'https://registry.npmjs.org'

- name: Install common library deps
working-directory: ./Common
run: npm ci

- name: Build common library
working-directory: ./Common
run: npm run build

- name: Install library deps
working-directory: ./Frontend/library
run: npm ci

- name: Link common library
working-directory: ./Frontend/library
run: npm link ../../Common

- name: Run frontend lib tests
working-directory: ./Frontend/library
run: npm run test
31 changes: 31 additions & 0 deletions .github/workflows/run-signalling-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run signalling tests

on:
workflow_dispatch:
push:
branches: ['UE5.5']
paths: ['Common/**', 'SignallingWebServer/**', 'SS_Test/**']
pull_request:
branches: ['UE5.5']
paths: ['Common/**', 'SignallingWebServer/**', 'SS_Test/**']

jobs:

build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./

permissions:
contents: write

steps:
- name: "Checkout source code"
uses: actions/checkout@v3

- name: "Docker compose"
uses: isbang/compose-action@v1.5.1
with:
compose-file: "SS_Test/docker-compose.yml"
up-flags: "--build --abort-on-container-exit --exit-code-from tester"
mcottontensor marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ node.zip
SignallingWebServer/Public/
SignallingWebServer/certificates
.vscode
coverage/
coverage/
common/types/*
7 changes: 7 additions & 0 deletions Common/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist
node_modules
types
package-lock.json
package.json
tsconfig.json
.eslintrc.js
8 changes: 8 additions & 0 deletions Common/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved.

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended']
};
4 changes: 4 additions & 0 deletions Common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
node_modules/
types/
.vscode
21 changes: 21 additions & 0 deletions Common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## lib-pixelstreamingcommon

The common library for the browser/client side of Pixel Streaming experiences. This library exposes common functionality for frontend applications of the pixel streaming ecosystem.

See [lib-pixelstreamingfrontend](/Frontend/library) for an example of how to implement this library.

Currently exposed.
### Logger
A small helper class for handling logging across the pixel streaming infrastructure.

### ITransport
An interface to a transport protocol that is in charge of sending and receiving signalling messages. Users can make use of supplied transport protocols or implement their own transport protocol via extending this interface. They can then pass the transport into the constructor of `SignallingProtocol` which is explained below.

### WebSocketTransport
An `ITransport` implementation that sends signalling messages over a websocket. This is currently the only transport in use by the official pixel streaming frontend.

### SignallingProtocol
This is the object where the user should send/receive messages. Currently there are specific functions for specific messages sent, but in the future this should change to be more generic. You can specify your own transport protocol by passing an implementation of `ITransport` to this class, allowing you to send and receive messages through any protocol you wish.

### Adding it to your project
`npm i @epicgames-ps/lib-pixelstreamingcommon-ue5.5`
Loading
Loading