Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/workflows/build-rtc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
archs: aarch64
- os: windows-latest
archs: AMD64
- os: windows-11-arm
archs: ARM64
Comment on lines +76 to +77

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Windows ARM64 wheel jobs select no builds

On Windows ARM64, CIBW_ARCHS=ARM64 combines with the cp39-* build selector, leaving cibuildwheel no eligible builds. Windows ARM64 builds start at CPython 3.11, so both wheel jobs fail and prevent publication.

Learn more

Both the RTC workflow and the release workflow add an ARM64 runner and pass ARM64 to cibuildwheel. The package's build selector only allows cp39-*, while cibuildwheel's native Windows ARM64 Python builds start at 3.11. As a result, selecting the ARM64 architecture leaves no build identifiers; the job cannot upload a wheel. The same selection occurs in the release build.

Example: An RTC tag starts the windows-11-arm job. It requests cp39-* on ARM64, finds no native CPython 3.9 ARM64 build, and never uploads rtc-release-windows-11-arm; the dependent test and publish jobs cannot complete.

Recommended fix: Extend the cibuildwheel build selector to include a supported Windows ARM64 version, such as cp311-win_arm64, while retaining the existing cp39-* builds. Verify the resulting wheel artifact and tests on the ARM64 runner in both workflows.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cibuildwheel has Python 3.9 releases for Windows ARM64 available to it via NuGet. As evidenced by the passing CI job.

- os: macos-latest
archs: x86_64 arm64
defaults:
Expand Down Expand Up @@ -166,6 +168,16 @@ jobs:
- os: windows-latest
python-version: "3.14"
artifact: rtc-release-windows-latest
# Windows ARM64 tests
- os: windows-11-arm
python-version: "3.11"
artifact: rtc-release-windows-11-arm
- os: windows-11-arm
python-version: "3.12"
artifact: rtc-release-windows-11-arm
- os: windows-11-arm
python-version: "3.14"
artifact: rtc-release-windows-11-arm
uses: ./.github/workflows/tests.yml
with:
os: ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ jobs:
archs: aarch64
- os: windows-latest
archs: AMD64
- os: windows-11-arm
archs: ARM64
- os: macos-latest
archs: x86_64 arm64
defaults:
Expand Down
5 changes: 4 additions & 1 deletion livekit-rtc/livekit/rtc/audio_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ def from_track(
)

def __del__(self) -> None:
FfiClient.instance.queue.unsubscribe(self._ffi_queue)
# _ffi_queue is unset if __init__ raised early or the instance was built via __new__
ffi_queue = getattr(self, "_ffi_queue", None)
if ffi_queue is not None:
FfiClient.instance.queue.unsubscribe(ffi_queue)

def _create_owned_stream(self) -> Any:
assert self._track is not None
Expand Down
5 changes: 1 addition & 4 deletions livekit-rtc/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ def get_platform_tag():
elif sys.platform == "linux":
return f"linux_{platform.machine()}"
elif sys.platform == "win32":
arch = platform.machine()
if arch == "AMD64":
arch = "amd64"
return f"win_{arch}"
return f"win_{platform.machine().lower()}"
else:
return f"{platform.system().lower()}_{platform.machine()}"

Expand Down
4 changes: 2 additions & 2 deletions tests/api/test_access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from livekit.protocol.agent_dispatch import RoomAgentDispatch

TEST_API_KEY = "myapikey"
TEST_API_SECRET = "thiskeyistotallyunsafe"
TEST_API_SECRET = "thiskeyistotallyunsafe-but-32-bytes-long"


def test_verify_token() -> None:
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_agent_config() -> None:
def test_verify_token_invalid() -> None:
token = AccessToken(TEST_API_KEY, TEST_API_SECRET).with_identity("test_identity").to_jwt()

token_verifier = TokenVerifier(TEST_API_KEY, "invalid_secret")
token_verifier = TokenVerifier(TEST_API_KEY, "invalid_secret-padded-to-32-bytes-long")
with pytest.raises(Exception):
token_verifier.verify(token)

Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from livekit.api import AccessToken, TokenVerifier, WebhookReceiver

TEST_API_KEY = "myapikey"
TEST_API_SECRET = "thiskeyistotallyunsafe"
TEST_API_SECRET = "thiskeyistotallyunsafe-but-32-bytes-long"
TEST_EVENT = """
{
"event": "room_started",
Expand Down
Loading