Skip to content

Commit fe1b1a0

Browse files
authored
feat(2759): Add QSS sigchain syncing to Quiet (#2877)
* Add dotenvx * Pass on env variables to backend * First connection to QSS * Initial sigchain sync with qss * Ongoing sync (no admittance yet) * Don't add member role to server * Fixes for joining and syncing via qss * Cleanup * First round of tests * QSS endpoint can only be set via manual environment variable * add qss submodule * Update qss * Package json updates * Small fixes and reliable running of qss on e2e tests * Mostly working * Fix qss e2e test and make joining more reliable * Consolidate logic * Clean up qss auth connections and more consolidation * stashing * Post merge fixes/updates * Cleanup * Remove encryption and fix bug related to failing to connect to qss * Update package-lock.json * Update changelogs * Update test snapshots * Add QSS e2e test to github * Start qss docker on e2e tests * Update qss * Separate qss tests and only run on linux * Update variable check * Fix state manager unit test * Bump backwards compatibility version * Add qss unit tests and mild tweaks to QSS logic * Use windows-2025 runner in place of deprecated windows-2019 runner * Hopefully fix backwards compat test issue * Update add chain and add comments to QSS code * Update backwards compatibility test * Split out backwards compatibility test since its the most unstable * Cleanup * Take a screenshot * Fix * Don't write file * Update backwardsCompatibility.test.ts * Add submodule pull to bootstrap * Update qss * Use correct orbitdb version * Update package-lock.json * Handle team ID to name mapping in the qss logic * Fix bootstrap * Fixes post merge * Fix snapshots * Update e2e-mac.yml * Fix invite link test
1 parent d673464 commit fe1b1a0

68 files changed

Lines changed: 5542 additions & 1075 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-env/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ inputs:
44
bootstrap-packages:
55
description: 'Lerna bootstrap packages (comma separated without spaces)'
66
required: false
7+
install-docker:
8+
description: 'Install and setup docker/docker compose'
9+
required: false
10+
default: false
711
cachePrefix:
812
description: 'For correct caching'
913
required: false
@@ -22,6 +26,12 @@ runs:
2226
with:
2327
python-version: 3.12
2428

29+
- name: Set up Docker
30+
uses: docker/setup-docker-action@v4
31+
if: ${{ inputs.install-docker == true || inputs.install-docker == 'true' }}
32+
with:
33+
version: version=28.1.1
34+
2535
- name: Print python version
2636
run: which python3
2737
if: runner.os == 'macOS'

.github/workflows/e2e-crossplatform.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: ./.github/workflows/e2e-mac.yml
1717
linux:
1818
uses: ./.github/workflows/e2e-linux.yml
19-
# separated out from other linux tests since this fails the most
19+
linux-qss:
20+
uses: ./.github/workflows/e2e-qss-linux.yml
2021
linux-back-compat:
2122
uses: ./.github/workflows/e2e-back-compat-linux.yml
22-
# the windows runners are garbage and always fail on long running tests (sometimes don't even make it past setup)
2323
# windows:
2424
# uses: ./.github/workflows/e2e-win.yml
2525

.github/workflows/e2e-mac.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- name: "Setup environment"
1919
uses: ./.github/actions/setup-env
2020
with:
21+
install-docker: false
2122
cachePrefix: "e2e-crossplatform-mac"
2223
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests,helia,@quiet/node-common"
2324

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: E2E with QSS linux
2+
3+
on: [workflow_call]
4+
jobs:
5+
6+
linux:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-22.04]
12+
13+
timeout-minutes: 180
14+
15+
env:
16+
DISPLAY: ":99.0"
17+
TEST_MODE: true
18+
IS_CI: true
19+
20+
steps:
21+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
22+
with:
23+
submodules: 'recursive'
24+
25+
- name: Extract version
26+
id: extract_version
27+
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
28+
with:
29+
path: packages/mobile
30+
31+
- name: Check for major version
32+
id: major-ver
33+
run: |
34+
echo ${{ steps.extract_version.outputs.version }}
35+
if [[ "${{ steps.extract_version.outputs.version }}" =~ ^[[:digit:]]+\.0\.0(-alpha.[[:digit:]]+)?$ ]]; then
36+
echo "This is a major version"
37+
echo "match=true" >> $GITHUB_OUTPUT
38+
else
39+
echo "This is NOT a major version"
40+
echo "match=false" >> $GITHUB_OUTPUT
41+
fi
42+
43+
- name: Install WM
44+
run: sudo apt install fluxbox
45+
46+
- name: Install libfuse2
47+
run: sudo apt install libfuse2
48+
49+
- name: "Setup environment"
50+
uses: ./.github/actions/setup-env
51+
with:
52+
install-docker: true
53+
cachePrefix: "e2e-crossplatform-linux-qss"
54+
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests,helia,@quiet/node-common"
55+
56+
- name: Start QSS docker
57+
run: npm run start:qss
58+
59+
- name: Run X11
60+
run: |
61+
Xvfb :99 -screen 0 1920x1080x24 &
62+
sleep 3
63+
fluxbox &
64+
65+
- name: Build App Image
66+
working-directory: ./packages/desktop
67+
run: npm run distUbuntu && VERSION=$(jq -r ".version" package.json) && cd dist && FILE_NAME=$(ls | grep $VERSION) && echo "FILE_NAME=$(ls | grep $VERSION)" >> $GITHUB_ENV && cp $FILE_NAME ../../e2e-tests/Quiet && export FILE_NAME=$FILE_NAME
68+
69+
- name: Chmod
70+
working-directory: ./packages/e2e-tests/Quiet
71+
run: chmod +x $FILE_NAME
72+
73+
- name: Run multiple clients with QSS test
74+
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
75+
with:
76+
timeout_minutes: 25
77+
max_attempts: 3
78+
command: cd packages/e2e-tests && npm run test multipleClients.qss.test.ts
79+
80+
- name: Stop QSS docker
81+
if: always()
82+
run: npm run stop:qss

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
path = 3rd-party/orbitdb
1111
url = https://github.com/TryQuiet/orbitdb.git
1212
branch = main
13+
[submodule "3rd-party/qss"]
14+
path = 3rd-party/qss
15+
url = https://github.com/TryQuiet/quiet-storage-service.git
16+
branch = feat/2759-adding-qss-to-sigchain

3rd-party/qss

Submodule qss added at 68af51e

0 commit comments

Comments
 (0)