Compare commits

...
Author SHA1 Message Date
Robin 29abeff0f2 Maybe fix the release workflow 2024-04-22 12:04:03 -04:00
Robin 257211e8f9 Try disabling LiveKit web audio support
We think there's a chance this is causing some Edge users to not hear any audio.
2024-04-19 13:02:51 -04:00
fkwp d352fefcaa Merge pull request #2322 from element-hq/renovate/livekit-components-core-0.x
Update dependency @livekit/components-core to ^0.10.0
2024-04-18 17:45:00 +02:00
fkwp 8234211f03 Merge pull request #2324 from element-hq/renovate/livekit-client-2.x-lockfile
Update dependency livekit-client to v2.1.0
2024-04-18 17:44:12 +02:00
fkwp 6d0de07f07 Merge pull request #2321 from element-hq/renovate/actions-upload-artifact-digest
Update actions/upload-artifact digest to b06cde3
2024-04-18 17:43:03 +02:00
renovate[bot] 1ed1b7c60c Update dependency livekit-client to v2.1.0 2024-04-18 15:42:55 +00:00
renovate[bot] e8810882ef Update dependency @livekit/components-core to ^0.10.0 2024-04-18 15:42:22 +00:00
renovate[bot] 244387dc04 Update actions/upload-artifact digest to b06cde3 2024-04-18 15:42:00 +00:00
fkwp bfd3a61aef adapt to stricter repo permissions part 3 2024-04-17 15:29:57 +02:00
fkwp c5793b9e7c adapt to stricter repo permissions part 2 2024-04-17 15:27:05 +02:00
fkwp 4283716dcc adapto to stricter repo permissions 2024-04-17 15:18:49 +02:00
TimoandRobin 379050ff80 Add back posthog connection time tracking (#2316)
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
2024-04-16 17:21:37 +02:00
fkwp df4da4e4ec Merge pull request #2318 from element-hq/renovate/docker-setup-buildx-action-digest
Update docker/setup-buildx-action digest to a530e94
2024-04-16 16:27:06 +02:00
renovate[bot] 99d6ced566 Update docker/setup-buildx-action digest to a530e94 2024-04-16 14:25:51 +00:00
fkwp 46cfa65bc2 Merge pull request #2317 from element-hq/renovate/docker-build-push-action-digest
Update docker/build-push-action digest to 7e6f776
2024-04-16 16:25:26 +02:00
renovate[bot] 067c13ebf7 Update docker/build-push-action digest to 7e6f776 2024-04-16 14:21:31 +00:00
Timo 9f4a107865 Revert "Track connection time on posthog (#2313)" (#2315)
This reverts commit 5e2b652690.
2024-04-16 16:21:07 +02:00
Timo 5e2b652690 Track connection time on posthog (#2313) 2024-04-16 11:48:11 +02:00
Robin fc4ced7bb3 Merge pull request #2294 from robintown/timeout-experiment
Experiment with different timeouts
2024-04-15 10:50:38 -04:00
fkwp 1381640cdb inputs -> with 2024-04-15 14:47:07 +00:00
fkwp d56dcaf0eb misssing inputs section 2024-04-15 14:45:23 +00:00
fkwp 1d43bd26ed misssing inputs section 2024-04-15 14:44:49 +00:00
Robin 51cc406af7 Experiment with different timeouts
This lets you set the global variables peerConnectionTimeout and websocketTimeout to see what LiveKit does with different values.
2024-04-15 10:38:18 -04:00
fkwp 03d2818c1f added description 2024-04-15 08:57:30 +00:00
fkwp e1c71327c5 refactored to reuse the build workflow 2024-04-15 08:53:42 +00:00
fkwp 1baed1184a move vite_app_version to inputs 2024-04-15 08:26:06 +00:00
fkwp c6fc0bb798 Merge pull request #2311 from element-hq/renovate/docker-metadata-action-digest
Update docker/metadata-action digest to 1294d94
2024-04-15 09:24:42 +02:00
renovate[bot] d5ccfa2ac5 Update docker/metadata-action digest to 1294d94 2024-04-15 07:23:12 +00:00
fkwp 7793805f1b Merge pull request #2312 from element-hq/renovate/peter-evans-create-pull-request-6.x
Update peter-evans/create-pull-request action to v6.0.3
2024-04-15 09:22:37 +02:00
fkwp c67040afe7 lint2 2024-04-15 07:21:07 +00:00
fkwp 444297f3d9 lint 2024-04-15 07:19:46 +00:00
renovate[bot] afb43d049d Update peter-evans/create-pull-request action to v6.0.3 2024-04-13 20:31:15 +00:00
fkwp 93c2ae768e refactored netlify-pr and docker-pr by calling netlify and docker from pr-deploy 2024-04-12 22:19:20 +00:00
fkwp 2bbd882425 remove debug statements 2024-04-12 22:17:52 +00:00
fkwp e781dfa164 added artifact details 2024-04-12 22:05:21 +00:00
fkwp fc65c799d8 var typo 2024-04-12 22:02:11 +00:00
fkwp d9d218cb1f remove pr_number input 2024-04-12 21:59:57 +00:00
fkwp 9946888d63 add docker deploy 2024-04-12 21:57:18 +00:00
fkwp 202388bd79 set pr_number type to string 2024-04-12 21:45:52 +00:00
fkwp 1df5ee05c9 added types 2024-04-12 21:43:09 +00:00
fkwp ee2214c14d inputs -> with 2024-04-12 21:27:34 +00:00
fkwp a2066f300b add netlify deploy 2024-04-12 21:22:49 +00:00
fkwp a0938bad13 add netlify workflow_call 2024-04-12 21:22:35 +00:00
fkwp 9675df8434 add paths-ignore 2024-04-12 21:19:33 +00:00
fkwp b9a6ee70a8 safe guard 2024-04-12 21:01:45 +00:00
fkwp 5c399fbfb2 safe guard 2024-04-12 20:59:53 +00:00
fkwp a5231983e8 fix lint 2024-04-12 20:52:58 +00:00
fkwp 76d3117a1c indent 2024-04-12 20:45:28 +00:00
fkwp 6bcfe61a79 lint 2024-04-12 20:43:24 +00:00
fkwp 9fe7f62a63 lint 2024-04-12 20:39:22 +00:00
fkwp 7455104aaf use element-call.yaml 2024-04-12 20:39:05 +00:00
fkwp 96bf809e8a renamed build_resuable.yaml -> element-call.yaml 2024-04-12 20:36:34 +00:00
fkwp b5a7c55d70 initial 2024-04-12 20:34:08 +00:00
fkwp c578bcaf91 cleanup 2024-04-12 20:10:45 +00:00
fkwp 908ca2325a clenaup naming 2024-04-12 19:54:18 +00:00
fkwp a1659c1fe2 cleanup 2024-04-12 19:41:56 +00:00
fkwp 3d7ef061cd debug 2024-04-12 19:32:51 +00:00
fkwp a04500f102 lint 2024-04-12 19:24:13 +00:00
fkwp b8aaa6b079 matrix-org/pr-details-action 2024-04-12 19:21:59 +00:00
fkwp 89911c1747 get PR info 2024-04-12 18:58:12 +00:00
fkwp f7e63bd2f5 dont limit PR branches 2024-04-12 17:52:46 +00:00
fkwp 76bb72d3ea add debug info 2024-04-12 17:42:46 +00:00
fkwp fd8ee1542b revert pull_request_target to pull_request 2024-04-12 14:06:01 +00:00
fkwp ef395efaf8 test if pull_request_target will trigger on_workflow 2024-04-12 13:39:04 +00:00
fkwp 8da2f5c1c7 use run-id from current run 2024-04-11 21:26:03 +00:00
fkwp 0bfe12bcbc use run-id from calling workflow 2024-04-11 21:16:45 +00:00
fkwp 63023f542b download artifact from the triggering workflow 2024-04-11 20:35:24 +00:00
fkwp 74ddcee2af add github-token and run-id parameters to download artifact 2024-04-11 19:45:31 +00:00
fkwp 9cce4bc0ad also trigger in case of labeled 2024-04-11 19:38:29 +00:00
fkwp be44aa0157 apply Keeping your GitHub Actions and workflows secure practises 2024-04-11 19:32:59 +00:00
fkwp e74095be54 we dont need prdetails going forward (#2309)
* use pull_request event rather than workflow_run

* use default for enable-pull-request-comment and enable-commit-comment

* we dont need prdetails going forward
2024-04-11 13:47:59 +02:00
15 changed files with 280 additions and 194 deletions
+20 -29
View File
@@ -1,34 +1,25 @@
name: Build name: Build
on: on:
pull_request: {} pull_request:
types:
- synchronize
- opened
- labeled
paths-ignore:
- ".github/**"
- "docs/**"
push: push:
branches: [livekit, full-mesh] branches: [livekit, full-mesh]
paths-ignore:
- ".github/**"
- "docs/**"
jobs: jobs:
build: build_element_call:
name: Build uses: ./.github/workflows/element-call.yaml
runs-on: ubuntu-latest with:
steps: vite_app_version: ${{ github.event.release.tag_name || github.sha }}
- name: Checkout code secrets:
uses: actions/checkout@v4 SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
- name: Yarn cache SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
uses: actions/setup-node@v4 SENTRY_URL: ${{ secrets.SENTRY_URL }}
with: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
cache: "yarn"
- name: Install dependencies
run: "yarn install"
- name: Build
run: "yarn run build"
env:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VITE_APP_VERSION: ${{ github.sha }}
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build
path: dist
# We'll only use this in a triggered job, then we're done with it
retention-days: 1
-74
View File
@@ -1,74 +0,0 @@
name: Docker PR Preview
# Note pushing docker images is not possible from a public forked repo (see: Can't push to ghcr on a pull request, https://github.com/docker/build-push-action/issues/870)
# Hence, this workflow is limited to PRs from element-hq/element-call
on:
pull_request:
types:
- synchronize
- opened
- labeled
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# due to https://github.com/actions/runner/issues/2372
# and not wanting to workaround like https://stackoverflow.com/questions/73797254/environment-variables-in-github-actions/74217028#74217028
# we disable for now a gloabl env variable since env is not available in job.if
# DO_DOCKER_BUILD: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') }}
# NOT_FROM_FORK: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
jobs:
build_element_call:
if: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') && github.event.pull_request.head.repo.full_name == github.repository }}
uses: ./.github/workflows/build_resuable.yaml
secrets:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
build_docker:
if: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') && github.event.pull_request.head.repo.full_name == github.repository }}
needs: build_element_call
runs-on: ubuntu-latest
permissions:
contents: write # required to upload release asset
packages: write
steps:
- name: Check it out
uses: actions/checkout@v4
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
name: build-output
path: dist
- name: Log in to container registry
uses: docker/login-action@5f4866a30a54f16a52d2ecb4a3898e9e424939cf
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c314eea2b27e3cb3c7d7be0618510234d8f6178e
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=short,event=branch
type=raw,value=pr_${{ github.event.pull_request.number }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
- name: Build and push Docker image
uses: docker/build-push-action@f8bc7f46003ef0cf98b715743d86c2f1ccd01436
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+56
View File
@@ -0,0 +1,56 @@
name: Docker - Deploy
on:
workflow_call:
inputs:
docker_tags:
required: true
type: string
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build_and_deploy:
name: Build & publish docker
runs-on: ubuntu-latest
permissions:
contents: write # required to upload release asset
packages: write
steps:
- name: Check it out
uses: actions/checkout@v4
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
name: build-output
path: dist
- name: Log in to container registry
uses: docker/login-action@5f4866a30a54f16a52d2ecb4a3898e9e424939cf
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@1294d94f8ee362ab42b6da04c35f4cd03a0e6af7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ inputs.docker_tags}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@a530e948adbeb357dbca95a7f8845d385edf4438
- name: Build and push Docker image
uses: docker/build-push-action@7e6f77677b7892794c8852c6e3773c3e9bc3129a
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
@@ -1,6 +1,10 @@
name: Build resuable name: Element Call - Build
on: on:
workflow_call: workflow_call:
inputs:
vite_app_version:
required: true
type: string
secrets: secrets:
SENTRY_ORG: SENTRY_ORG:
required: true required: true
@@ -12,7 +16,7 @@ on:
required: true required: true
jobs: jobs:
build_resuable: build:
name: Build Element Call name: Build Element Call
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -31,7 +35,7 @@ jobs:
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }} SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VITE_APP_VERSION: ${{ github.sha }} VITE_APP_VERSION: ${{ inputs.vite_app_version }}
NODE_OPTIONS: "--max-old-space-size=4096" NODE_OPTIONS: "--max-old-space-size=4096"
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -1,21 +1,29 @@
name: Netlify PR Preview name: Netlify - Deploy
on: on:
pull_request: workflow_call:
types: inputs:
- synchronize pr_number:
- opened required: true
- labeled type: string
pr_head_full_name:
required: true
type: string
pr_head_ref:
required: true
type: string
deployment_ref:
required: true
type: string
secrets:
ELEMENT_BOT_TOKEN:
required: true
NETLIFY_AUTH_TOKEN:
required: true
NETLIFY_SITE_ID:
required: true
jobs: jobs:
build_element_call:
uses: ./.github/workflows/build_resuable.yaml
secrets:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
deploy: deploy:
needs: build_element_call
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
deployments: write deployments: write
@@ -28,20 +36,16 @@ jobs:
step: start step: start
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
env: Netlify env: Netlify
ref: ${{ github.ref || github.head_ref }} ref: ${{ inputs.deployment_ref }}
desc: | desc: |
Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Do you trust the author of this PR? Maybe this build will steal your keys or give you malware.
Exercise caution. Use test accounts. Exercise caution. Use test accounts.
- id: prdetails
uses: matrix-org/pr-details-action@v1.3
with:
owner: ${{ github.event.pull_request.head.repo.owner.login }}
branch: ${{ github.event.pull_request.head.ref }}
- name: 📥 Download artifact - name: 📥 Download artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
name: build-output name: build-output
path: webapp path: webapp
@@ -50,7 +54,7 @@ jobs:
run: curl -s https://raw.githubusercontent.com/element-hq/element-call/main/config/netlify_redirects > webapp/_redirects run: curl -s https://raw.githubusercontent.com/element-hq/element-call/main/config/netlify_redirects > webapp/_redirects
- name: Add config file - name: Add config file
run: curl -s "https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name }}/${{ github.event.pull_request.head.ref }}/config/element_io_preview.json" > webapp/config.json run: curl -s "https://raw.githubusercontent.com/${{ inputs.pr_head_full_name }}/${{ inputs.pr_head_ref }}/config/element_io_preview.json" > webapp/config.json
- name: ☁️ Deploy to Netlify - name: ☁️ Deploy to Netlify
id: netlify id: netlify
@@ -58,7 +62,7 @@ jobs:
with: with:
publish-dir: webapp publish-dir: webapp
deploy-message: "Deploy from GitHub Actions" deploy-message: "Deploy from GitHub Actions"
alias: pr${{ steps.prdetails.outputs.pr_id }} alias: pr${{ inputs.pr_number }}
env: env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
+48
View File
@@ -0,0 +1,48 @@
name: PR Preview Deployments
on:
workflow_run:
workflows: ["Build"]
types:
- completed
jobs:
prdetails:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
runs-on: ubuntu-latest
outputs:
pr_number: ${{ steps.prdetails.outputs.pr_id }}
pr_data_json: ${{ steps.prdetails.outputs.data }}
steps:
- id: prdetails
uses: matrix-org/pr-details-action@v1.3
continue-on-error: true
with:
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
branch: ${{ github.event.workflow_run.head_branch }}
netlify:
needs: prdetails
permissions:
deployments: write
uses: ./.github/workflows/netlify.yaml
with:
pr_number: ${{ needs.prdetails.outputs.pr_number }}
pr_head_full_name: ${{ github.event.workflow_run.head_repository.full_name }}
pr_head_ref: ${{ needs.prdetails.outputs.pr_data_json && fromJSON(needs.prdetails.outputs.pr_data_json).head.ref }}
deployment_ref: ${{ needs.prdetails.outputs.pr_data_json && fromJSON(needs.prdetails.outputs.pr_data_json).head.sha || github.ref || github.head_ref }}
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
docker:
if: ${{ needs.prdetails.outputs.pr_data_json && contains(fromJSON(needs.prdetails.outputs.pr_data_json).labels.*.name, 'docker build') }}
needs: prdetails
permissions:
contents: write
packages: write
uses: ./.github/workflows/docker.yaml
with:
docker_tags: |
type=sha,format=short,event=branch
type=raw,value=pr_${{ needs.prdetails.outputs.pr_number }}
+37 -53
View File
@@ -3,17 +3,32 @@ name: Build & publish images to the package registry for tags
on: on:
release: release:
types: [published] types: [published]
push: workflow_run:
workflows: ["Build"]
branches: [livekit] branches: [livekit]
types:
- completed
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}
jobs: jobs:
build: build_element_call:
name: Build & publish if: ${{ github.event_name == 'release' }}
uses: ./.github/workflows/element-call.yaml
with:
vite_app_version: ${{ github.event.release.tag_name || github.sha }}
secrets:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
publish_tarball:
name: Publish tarball
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
unix_time: ${{steps.current-time.outputs.unix_time}}
permissions: permissions:
contents: write # required to upload release asset contents: write # required to upload release asset
packages: write packages: write
@@ -21,64 +36,33 @@ jobs:
- name: Get current time - name: Get current time
id: current-time id: current-time
run: echo "unix_time=$(date +'%s')" >> $GITHUB_OUTPUT run: echo "unix_time=$(date +'%s')" >> $GITHUB_OUTPUT
- name: 📥 Download artifact
- name: Check it out uses: actions/download-artifact@v4
uses: actions/checkout@v4
- name: Log in to container registry
uses: docker/login-action@5f4866a30a54f16a52d2ecb4a3898e9e424939cf
with: with:
registry: ${{ env.REGISTRY }} github-token: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }} run-id: ${{ github.event.workflow_run.id }}
password: ${{ secrets.GITHUB_TOKEN }} name: build-output
path: dist
- name: Yarn cache
uses: actions/setup-node@v4
with:
cache: "yarn"
- name: Install dependencies
run: "yarn install"
- name: Build
run: "yarn run build"
env:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VITE_APP_VERSION: ${{ github.event.release.tag_name || github.sha }}
- name: Create Tarball - name: Create Tarball
env: env:
TARBALL_VERSION: ${{ github.event.release.tag_name || github.sha }} TARBALL_VERSION: ${{ github.event.release.tag_name || github.sha }}
run: | run: |
tar --numeric-owner --transform "s/dist/element-call-${TARBALL_VERSION}/" -cvzf element-call-${TARBALL_VERSION}.tar.gz dist tar --numeric-owner --transform "s/dist/element-call-${TARBALL_VERSION}/" -cvzf element-call-${TARBALL_VERSION}.tar.gz dist
- name: Upload - name: Upload
uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb uses: actions/upload-artifact@b06cde36fc32a3ee94080e87258567f73f921537
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
with: with:
path: "./element-call-*.tar.gz" path: "./element-call-*.tar.gz"
publish_docker:
- name: Extract metadata (tags, labels) for Docker needs: publish_tarball
id: meta permissions:
uses: docker/metadata-action@c314eea2b27e3cb3c7d7be0618510234d8f6178e contents: write
with: packages: write
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} uses: ./.github/workflows/docker.yaml
tags: | with:
type=sha,format=short,event=branch docker_tags: |
type=semver,pattern=v{{version}} type=sha,format=short,event=branch
type=raw,value=latest-ci,enable={{is_default_branch}} type=semver,pattern=v{{version}}
type=raw,value=latest-ci_${{steps.current-time.outputs.unix_time}},enable={{is_default_branch}} type=raw,value=latest-ci,enable={{is_default_branch}}
type=raw,value=latest-ci_${{needs.publish_tarball.outputs.unix_time}},enable={{is_default_branch}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
- name: Build and push Docker image
uses: docker/build-push-action@f8bc7f46003ef0cf98b715743d86c2f1ccd01436
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v6.0.2 uses: peter-evans/create-pull-request@v6.0.3
with: with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }} token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/localazy-download branch: actions/localazy-download
@@ -3,6 +3,8 @@ on:
push: push:
branches: branches:
- livekit - livekit
paths-ignore:
- ".github/**"
jobs: jobs:
upload: upload:
+1 -1
View File
@@ -19,7 +19,7 @@
}, },
"dependencies": { "dependencies": {
"@juggle/resize-observer": "^3.3.1", "@juggle/resize-observer": "^3.3.1",
"@livekit/components-core": "^0.9.0", "@livekit/components-core": "^0.10.0",
"@livekit/components-react": "^2.0.0", "@livekit/components-react": "^2.0.0",
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz", "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
"@opentelemetry/api": "^1.4.0", "@opentelemetry/api": "^1.4.0",
+2
View File
@@ -31,6 +31,7 @@ import {
UndecryptableToDeviceEventTracker, UndecryptableToDeviceEventTracker,
QualitySurveyEventTracker, QualitySurveyEventTracker,
CallDisconnectedEventTracker, CallDisconnectedEventTracker,
CallConnectDurationTracker,
} from "./PosthogEvents"; } from "./PosthogEvents";
import { Config } from "../config/Config"; import { Config } from "../config/Config";
import { getUrlParams } from "../UrlParams"; import { getUrlParams } from "../UrlParams";
@@ -444,4 +445,5 @@ export class PosthogAnalytics {
public eventUndecryptableToDevice = new UndecryptableToDeviceEventTracker(); public eventUndecryptableToDevice = new UndecryptableToDeviceEventTracker();
public eventQualitySurvey = new QualitySurveyEventTracker(); public eventQualitySurvey = new QualitySurveyEventTracker();
public eventCallDisconnected = new CallDisconnectedEventTracker(); public eventCallDisconnected = new CallDisconnectedEventTracker();
public eventCallConnectDuration = new CallConnectDurationTracker();
} }
+36
View File
@@ -15,6 +15,7 @@ limitations under the License.
*/ */
import { DisconnectReason } from "livekit-client"; import { DisconnectReason } from "livekit-client";
import { logger } from "matrix-js-sdk/src/logger";
import { import {
IPosthogEvent, IPosthogEvent,
@@ -201,3 +202,38 @@ export class CallDisconnectedEventTracker {
}); });
} }
} }
interface CallConnectDuration extends IPosthogEvent {
eventName: "CallConnectDuration";
totalDuration: number;
websocketDuration: number;
peerConnectionDuration: number;
}
export class CallConnectDurationTracker {
private connectStart = 0;
private websocketConnected = 0;
public cacheConnectStart(): void {
this.connectStart = Date.now();
}
public cacheWsConnect(): void {
this.websocketConnected = Date.now();
}
public track(options = { log: false }): void {
const now = Date.now();
const totalDuration = now - this.connectStart;
const websocketDuration = this.websocketConnected - this.connectStart;
const peerConnectionDuration = now - this.websocketConnected;
PosthogAnalytics.instance.trackEvent<CallConnectDuration>({
eventName: "CallConnectDuration",
totalDuration,
websocketDuration,
peerConnectionDuration,
});
if (options.log)
logger.log(
`Time to connect:\ntotal: ${totalDuration}ms\npeerConnection: ${websocketDuration}ms\nwebsocket: ${peerConnectionDuration}ms`,
);
}
}
+1
View File
@@ -59,4 +59,5 @@ export const defaultLiveKitOptions: RoomOptions = {
stopLocalTrackOnUnpublish: true, stopLocalTrackOnUnpublish: true,
reconnectPolicy: new DefaultReconnectPolicy(), reconnectPolicy: new DefaultReconnectPolicy(),
disconnectOnPageLeave: true, disconnectOnPageLeave: true,
webAudioMix: false,
}; };
+23 -1
View File
@@ -27,6 +27,14 @@ import { logger } from "matrix-js-sdk/src/logger";
import * as Sentry from "@sentry/react"; import * as Sentry from "@sentry/react";
import { SFUConfig, sfuConfigEquals } from "./openIDSFU"; import { SFUConfig, sfuConfigEquals } from "./openIDSFU";
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
declare global {
interface Window {
peerConnectionTimeout?: number;
websocketTimeout?: number;
}
}
/* /*
* Additional values for states that a call can be in, beyond what livekit * Additional values for states that a call can be in, beyond what livekit
@@ -124,7 +132,21 @@ async function connectAndPublish(
micTrack: LocalTrack | undefined, micTrack: LocalTrack | undefined,
screenshareTracks: MediaStreamTrack[], screenshareTracks: MediaStreamTrack[],
): Promise<void> { ): Promise<void> {
await livekitRoom!.connect(sfuConfig!.url, sfuConfig!.jwt); const tracker = PosthogAnalytics.instance.eventCallConnectDuration;
// Track call connect duration
tracker.cacheConnectStart();
livekitRoom.once(RoomEvent.SignalConnected, tracker.cacheWsConnect);
await livekitRoom!.connect(sfuConfig!.url, sfuConfig!.jwt, {
// Due to stability issues on Firefox we are testing the effect of different
// timeouts, and allow these values to be set through the console
peerConnectionTimeout: window.peerConnectionTimeout ?? 45000,
websocketTimeout: window.websocketTimeout ?? 45000,
});
// remove listener in case the connect promise rejects before `SignalConnected` is emitted.
livekitRoom.off(RoomEvent.SignalConnected, tracker.cacheWsConnect);
tracker.track({ log: true });
if (micTrack) { if (micTrack) {
logger.info(`Publishing precreated mic track`); logger.info(`Publishing precreated mic track`);
+19 -9
View File
@@ -1718,7 +1718,7 @@
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60" resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"
integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA== integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==
"@livekit/components-core@0.9.3", "@livekit/components-core@^0.9.0": "@livekit/components-core@0.9.3":
version "0.9.3" version "0.9.3"
resolved "https://registry.yarnpkg.com/@livekit/components-core/-/components-core-0.9.3.tgz#327980a784a9e62cff100915f6f952714f499860" resolved "https://registry.yarnpkg.com/@livekit/components-core/-/components-core-0.9.3.tgz#327980a784a9e62cff100915f6f952714f499860"
integrity sha512-RUhKw/eg2frnOHq6Xurfg4HqawmdpC/o8Dkp+J6PgnieA6mSQOOez7mUdPNqsAybnLujjJvVJ735sZJRqTb1Sg== integrity sha512-RUhKw/eg2frnOHq6Xurfg4HqawmdpC/o8Dkp+J6PgnieA6mSQOOez7mUdPNqsAybnLujjJvVJ735sZJRqTb1Sg==
@@ -1728,6 +1728,16 @@
loglevel "1.9.1" loglevel "1.9.1"
rxjs "7.8.1" rxjs "7.8.1"
"@livekit/components-core@^0.10.0":
version "0.10.0"
resolved "https://registry.yarnpkg.com/@livekit/components-core/-/components-core-0.10.0.tgz#dfd1ccf72518d89bba2d9d10fadbbf2dd47ed321"
integrity sha512-TSsIG2BRLABT5FP+5sueZgkByGYyFhv3UTb8fneWchvQRBHtiU9s4FF8SIoAw9z3znhwp1tKaJyuIyKp7k0Juw==
dependencies:
"@floating-ui/dom" "1.6.3"
email-regex "5.0.0"
loglevel "1.9.1"
rxjs "7.8.1"
"@livekit/components-react@^2.0.0": "@livekit/components-react@^2.0.0":
version "2.0.6" version "2.0.6"
resolved "https://registry.yarnpkg.com/@livekit/components-react/-/components-react-2.0.6.tgz#c4ff790180f86f6a3cfc341fe5c0b93bac8bf92b" resolved "https://registry.yarnpkg.com/@livekit/components-react/-/components-react-2.0.6.tgz#c4ff790180f86f6a3cfc341fe5c0b93bac8bf92b"
@@ -1738,10 +1748,10 @@
clsx "2.1.0" clsx "2.1.0"
usehooks-ts "2.16.0" usehooks-ts "2.16.0"
"@livekit/protocol@1.10.4": "@livekit/protocol@1.13.0":
version "1.10.4" version "1.13.0"
resolved "https://registry.yarnpkg.com/@livekit/protocol/-/protocol-1.10.4.tgz#98951ba72933b071aac32d9b167f4ad5827f86de" resolved "https://registry.yarnpkg.com/@livekit/protocol/-/protocol-1.13.0.tgz#8fed7b6658a0a51af908f9fe0133e4be12016788"
integrity sha512-7Occ6l5VqjsKsUjpLeVJXJkip4ce22iG9QR/haOkrDXYwGSY+TwCA4ubbJ81aQBt2z0kHVZuaQWdzJSDLI+Kag== integrity sha512-M3U36VgRfb0VutWG6pnozXusL+mkYstbCctTLUyCIyye36Ztv1wA9zYpyYvz7VnsgmCn+g/g0eB2rnAkTVwcnA==
dependencies: dependencies:
"@bufbuild/protobuf" "^1.7.2" "@bufbuild/protobuf" "^1.7.2"
@@ -6154,11 +6164,11 @@ lines-and-columns@^1.1.6:
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
livekit-client@^2.0.2: livekit-client@^2.0.2:
version "2.0.10" version "2.1.0"
resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-2.0.10.tgz#5ea243a76a05320500ea7b0fb8c5f32d0d9108af" resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-2.1.0.tgz#3c4f2754eb38933a6d232fe35717bfe3a378bdcf"
integrity sha512-V+EyTEd3kM1Vl9/TsE3nc7PEnJI2t21ZV0/nkqhGThszym1SJzmc61hKjmCJBnR199pskUxSjrwzMl9HrPQ85A== integrity sha512-nJwfRKw1Pafd2napk66l30dlBjsv1VZ+na3mzNezcAFAYT2lQ4Gch57TdbMBDYo+QfrZ98s+kuZzsFhBwM5rqw==
dependencies: dependencies:
"@livekit/protocol" "1.10.4" "@livekit/protocol" "1.13.0"
events "^3.3.0" events "^3.3.0"
loglevel "^1.8.0" loglevel "^1.8.0"
sdp-transform "^2.14.1" sdp-transform "^2.14.1"