snapshot of https://github.com/livekit/livekit.git @ 08c5433449c106943231037d0b892895f6e92d3b (2026-09-15)
This commit is contained in:
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* @livekit/cs-devs
|
||||
36
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
36
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: File a bug report and help us improve LiveKit
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Server**
|
||||
- Version: [0.x.x]
|
||||
- Environment: [e.g. local dev, EKS]
|
||||
- any other information about your deployment setup
|
||||
|
||||
**Client**
|
||||
- SDK: [e.g. js, ios]
|
||||
- Version: [0.x.x]
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. two clients are connected to room
|
||||
2. 3rd client joins
|
||||
3. 3rd client does '...'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
BIN
.github/banner_dark.png
vendored
Normal file
BIN
.github/banner_dark.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
BIN
.github/banner_light.png
vendored
Normal file
BIN
.github/banner_light.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
50
.github/scripts/go-version.sh
vendored
Executable file
50
.github/scripts/go-version.sh
vendored
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2026 LiveKit, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#
|
||||
# Print the Go toolchain version pinned by a Dockerfile's golang builder image.
|
||||
#
|
||||
# usage: .github/scripts/go-version.sh [dockerfile] (default: Dockerfile)
|
||||
#
|
||||
# The pinned `golang:X.Y.Z-alpineA.B@sha256:...` builder image is the single source
|
||||
# of truth, and Renovate keeps it current via an approvable PR. Each workflow reads
|
||||
# the version out of the Dockerfile it builds against (setup-go cannot parse a
|
||||
# Dockerfile itself), so a job's Go runtime always matches the image it produces.
|
||||
#
|
||||
# Deliberately NOT derived from go.mod's `go` directive: that is the module
|
||||
# minimum, owned by the toolchain and by dependency requirements, and the go
|
||||
# command may rewrite it to a bare major.minor.
|
||||
set -euo pipefail
|
||||
|
||||
dockerfile="${1:-Dockerfile}"
|
||||
|
||||
if [ ! -f "$dockerfile" ]; then
|
||||
echo "$dockerfile: no such file" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version=$(sed -nE 's/^FROM[[:space:]]+golang:([0-9]+\.[0-9]+\.[0-9]+)[^[:space:]]*.*/\1/p' "$dockerfile" | sort -u)
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
echo "$dockerfile: no pinned 'FROM golang:X.Y.Z-...' base image found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(printf '%s\n' "$version" | wc -l)" -ne 1 ]; then
|
||||
echo "$dockerfile pins more than one Go version: $(echo $version)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$version"
|
||||
84
.github/workflows/buildtest.yaml
vendored
Normal file
84
.github/workflows/buildtest.yaml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
# Copyright 2023 LiveKit, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Test
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||
- uses: shogo82148/actions-setup-redis@2f3253b148c73d7a0682eae73e862b777a4fa74e # v1
|
||||
with:
|
||||
redis-version: "6.x"
|
||||
auto-start: true
|
||||
- run: redis-cli ping
|
||||
|
||||
# Test with the same Go toolchain the published image is built with
|
||||
- name: Resolve Go version
|
||||
id: go-version
|
||||
run: |
|
||||
# Assign first so a failed lookup trips `set -e`; inside echo its exit
|
||||
# status would be discarded and an empty version written.
|
||||
version=$(.github/scripts/go-version.sh Dockerfile)
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
|
||||
with:
|
||||
go-version: ${{ steps.go-version.outputs.version }}
|
||||
|
||||
- name: Replace mutexes
|
||||
run: |
|
||||
go get github.com/sasha-s/go-deadlock
|
||||
grep -rl sync.Mutex ./pkg | xargs sed -i 's/sync\.Mutex/deadlock\.Mutex/g'
|
||||
grep -rl sync.RWMutex ./pkg | xargs sed -i 's/sync\.RWMutex/deadlock\.RWMutex/g'
|
||||
grep -rl deadlock.Mutex ./pkg | xargs go tool goimports -w
|
||||
grep -rl deadlock.RWMutex ./pkg | xargs go tool goimports -w
|
||||
go mod tidy
|
||||
|
||||
# Run mage at the version go.mod pins, rather than the mage-action's
|
||||
# `version: latest`, so the binary matches the mage/mg library the magefile is
|
||||
# compiled against and Renovate owns the version like any other module.
|
||||
- name: Mage Build
|
||||
run: go run github.com/magefile/mage build
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
|
||||
with:
|
||||
version: v2.11.4
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
set -euo pipefail
|
||||
MallocNanoZone=0 go test -race -json -v ./... 2>&1 | tee /tmp/gotest.log | go tool gotestfmt
|
||||
|
||||
# Upload the original go test log as an artifact for later review.
|
||||
- name: Upload test log
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
if: always()
|
||||
with:
|
||||
name: test-log
|
||||
path: /tmp/gotest.log
|
||||
if-no-files-found: error
|
||||
87
.github/workflows/docker.yaml
vendored
Normal file
87
.github/workflows/docker.yaml
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
# Copyright 2023 LiveKit, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Release to Docker
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master # publish to 'master' tag
|
||||
tags:
|
||||
- 'v*.*.*' # publish on version tags, updates 'latest' tag
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: |
|
||||
livekit/livekit-server
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=semver,pattern=v{{version}}
|
||||
type=semver,pattern=v{{major}}.{{minor}}
|
||||
|
||||
# Generate with the same Go toolchain the published image is built with
|
||||
- name: Resolve Go version
|
||||
id: go-version
|
||||
run: |
|
||||
# Assign first so a failed lookup trips `set -e`; inside echo its exit
|
||||
# status would be discarded and an empty version written.
|
||||
version=$(.github/scripts/go-version.sh Dockerfile)
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
|
||||
with:
|
||||
go-version: ${{ steps.go-version.outputs.version }}
|
||||
|
||||
- name: Download Go modules
|
||||
run: go mod download
|
||||
|
||||
# Run mage at the version go.mod pins, rather than the mage-action's
|
||||
# `version: latest`, so the binary matches the mage/mg library the magefile is
|
||||
# compiled against and Renovate owns the version like any other module.
|
||||
- name: Generate code
|
||||
run: go run github.com/magefile/mage generate
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
56
.github/workflows/release.yaml
vendored
Normal file
56
.github/workflows/release.yaml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
# Copyright 2023 LiveKit, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
# only publish on version tags
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||
- name: Fetch all tags
|
||||
run: git fetch --force --tags
|
||||
|
||||
# Release with the same Go toolchain the published image is built with
|
||||
- name: Resolve Go version
|
||||
id: go-version
|
||||
run: |
|
||||
# Assign first so a failed lookup trips `set -e`; inside echo its exit
|
||||
# status would be discarded and an empty version written.
|
||||
version=$(.github/scripts/go-version.sh Dockerfile)
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
|
||||
with:
|
||||
go-version: ${{ steps.go-version.outputs.version }}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: '~> v2'
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
25
.github/workflows/slack-notifier.yaml
vendored
Normal file
25
.github/workflows/slack-notifier.yaml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: PR Slack Notifier
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [review_requested, reopened, closed]
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: pr-slack-${{ github.event.pull_request.number }}-${{ github.workflow }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
notify-devs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: livekit/slack-notifier-action@main
|
||||
with:
|
||||
config_json: ${{ secrets.SLACK_NOTIFY_CONFIG_JSON }}
|
||||
slack_token: ${{ secrets.SLACK_PR_NOTIFIER_TOKEN }}
|
||||
53
.github/workflows/test-server-docker.yaml
vendored
Normal file
53
.github/workflows/test-server-docker.yaml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# Copyright 2026 LiveKit, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Builds and publishes the SDK conformance test server (cmd/test-server) to
|
||||
# Docker Hub as livekit/test-server:latest on every push to master. The server
|
||||
# SDK repos boot this image in their CI to run region-failover tests.
|
||||
name: Release Test Server to Docker
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
|
||||
with:
|
||||
context: .
|
||||
file: cmd/test-server/Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
# Each build overrides the latest tag so SDK CI always boots the
|
||||
# current mock server.
|
||||
tags: livekit/test-server:latest
|
||||
Reference in New Issue
Block a user