Skip to content
Merged
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
9 changes: 3 additions & 6 deletions .github/workflows/interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@ jobs:
run: nix develop --command just test max-age
shell: bash -leo pipefail {0}

- name: Datagram tracks
id: datagram-tracks
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just test datagram-tracks
shell: bash -leo pipefail {0}
# Datagram tracks awaits the JS lite-07 route wire in
# quest/m2/cluster-routing/routes/js.md; recorded as skipped below.

- name: Stream limits over WebSocket
id: stream-limits
Expand Down Expand Up @@ -225,7 +222,7 @@ jobs:
"Rust cache": "${{ steps.rust-cache.outcome }}",
"Playwright Chromium": "${{ steps.setup.outcome }}",
"Optional publisher retention": "${{ steps.max-age.outcome }}",
"Datagram tracks": "${{ steps.datagram-tracks.outcome }}",
"Datagram tracks": "skipped",
"Stream limits over WebSocket": "${{ steps.stream-limits.outcome }}",
"Relay fills": "${{ steps.relay-fill.outcome }}",
"Receive credit recovery": "${{ steps.receive-credit.outcome }}",
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,8 @@ jobs:
# `rs uring` is a separate feature compile (off the default set), and
# CI_STRICT fails it below the 6.12 kernel floor. The embedding tests for
# io_uring live there; uring.yml also runs it on affected release PRs.
# `test drain` stands up two relays and drains one under a live JS
# viewer: diff-independent, since a break can arrive through the relay,
# js/net, or the wire between them.
# `test drain` awaits the JS lite-07 route wire in
# quest/m2/cluster-routing/routes/js.md; keep its local recipe usable.
# `rs quic-sim` sweeps moq-quic's simulated workloads from a fresh seed; PRs run a fixed 64.
# `rs rung-disable` proves FFI simulcast disable and recovery on a shaped BBR3 uplink.
# `test resume-model` sweeps resume against its model from a fresh seed; PRs run a fixed 64.
Expand All @@ -356,7 +355,7 @@ jobs:
# `rs v4l2` streams moq-video's V4L2 capture from the kernel's vivid
# virtual camera, a module load no pull request job should make.
# `js worklet-matrix` loads `?worklet` output through the bundlers pinned in test/worklet.
recipe: ["gate", "gh test-integration", "rs doctest --workspace", "rs send-depth", "test drill-sensitivity", "rs uring", "test drain", "test json-properties", "test resume-model", "rs quic-sim", "rs rung-disable", "test drill impaired", "rs cli-export", "rs hls-conformance", "rs quic-stress", "rs audio-devices", "rs multicast", "rs render-sw", "test qmux", "rs v4l2", "js worklet-matrix"]
recipe: ["gate", "gh test-integration", "rs doctest --workspace", "rs send-depth", "test drill-sensitivity", "rs uring", "test json-properties", "test resume-model", "rs quic-sim", "rs rung-disable", "test drill impaired", "rs cli-export", "rs hls-conformance", "rs quic-stress", "rs audio-devices", "rs multicast", "rs render-sw", "test qmux", "rs v4l2", "js worklet-matrix"]
include:
# Miri interprets kio's and moq-net's in-memory unsafe; too slow for the merge gate.
- recipe: rs miri
Expand Down
4 changes: 2 additions & 2 deletions infra/nix/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ roots bucket rev name +paths:
set -euo pipefail
: "${AWS_ACCESS_KEY_ID:?not set}"
: "${AWS_SECRET_ACCESS_KEY:?not set}"
PATH="$(nix build --no-link --print-out-paths --inputs-from {{ quote(justfile_directory() / "../..") }} nixpkgs#rclone)/bin:$PATH"
PATH="$(nix build --no-link --print-out-paths --inputs-from {{ quote(justfile_directory() / "../..") }} nixpkgs#rclone^out)/bin:$PATH"
readlink -f {{ paths }} | rclone rcat "r2:{{ bucket }}/roots/{{ rev }}/{{ name }}"

# Restart the upload age of every object in a commit's recorded closures older than a week.
Expand All @@ -60,7 +60,7 @@ refresh bucket rev:
set -euo pipefail
: "${AWS_ACCESS_KEY_ID:?not set}"
: "${AWS_SECRET_ACCESS_KEY:?not set}"
PATH="$(nix build --no-link --print-out-paths --inputs-from ../.. nixpkgs#rclone)/bin:$PATH"
PATH="$(nix build --no-link --print-out-paths --inputs-from ../.. nixpkgs#rclone^out)/bin:$PATH"
remote="r2:{{ bucket }}/"
store="s3://{{ bucket }}?endpoint={{ endpoint }}&region=auto"
work=$(mktemp -d)
Expand Down
3 changes: 3 additions & 0 deletions js/qmux/bench/datagrams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ async function measure(backlog: number): Promise<number> {
},
{ config: { idleTimeout: null } },
);
incoming.enqueue(
Frame.encode({ type: "transport_parameters", params: Frame.RECOMMENDED_TRANSPORT_PARAMS }, "qmux-01"),
);
await session.ready;
session.datagrams.incomingHighWaterMark = backlog;
for (let index = 0; index < backlog; index++) incoming.enqueue(packet);
Expand Down
12 changes: 9 additions & 3 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ let
# Helper function to get crate info from Cargo.toml
crateInfo = cargoTomlPath: craneLib.crateNameFromCargoToml { cargoToml = cargoTomlPath; };

# moq-video embeds a vendored PTX kernel at compile time, so every package
# source that may pull it in must preserve PTX alongside Cargo's sources.
# moq-video embeds PTX and moq-webrtc embeds crypto validation data at compile
# time, so packages must preserve these alongside Cargo's sources.
filterCargoSources =
path: type: (final.lib.hasSuffix ".ptx" path) || (craneLib.filterCargoSources path type);
path: type:
(final.lib.hasSuffix ".ptx" path)
|| (
(final.lib.hasInfix "/rs/moq-webrtc/src/vendor/dimpl/crypto/validation/" path)
&& ((final.lib.hasSuffix ".der" path) || (final.lib.hasSuffix ".bin" path))
)
|| (craneLib.filterCargoSources path type);
cleanCargoSource = final.lib.cleanSourceWith {
src = ../.;
name = "source";
Expand Down
14 changes: 11 additions & 3 deletions quest/m2/cluster-routing/routes/js.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@ the cheapest one; fix it with the route-selection rework here.
asked how to handle the in-tree lanes running JS on lite-07-wip once the
Rust side moved to the route wire: ✅ **skip them until this quest lands**,
so the nightly report stays meaningful. Rejected: leave them red; hold
#8023 for this quest. Every skip names this quest (`grep -rn routes/js.md
test rs`): `JS_LITE07_SKIP` in `test/interop/interop.sh` and `socket.sh`
#8023 for this quest. Every skip names this quest (`rg routes/js.md
test rs .github sh/gh`): `JS_LITE07_SKIP` in `test/interop/interop.sh` and `socket.sh`
(native JS grant printing, claims, track replacement, sockets, the browser
route key proof, the lite-07 compress and drop legs, the compressed catalog's lite-07 reader, and
`--versions moq-lite-07-wip` with JS clients), `lite_tracks_interop` in
`test/justfile`, and the lite-07 legs of `max_age_relay_javascript` and
`relay_fill_javascript`.
`relay_fill_javascript`. Also restore `test drain` in the nightly matrix,
restore the `Datagram tracks` interop workflow step and its report outcome, reset
`datagram_tracks_javascript`'s ignore reason, remove its test-inventory entries,
and remove the default media `replacement`
route-wire quarantine (every replacement publisher pins lite-07 even for
older readers). Keep the separate Firefox audio-tone quarantine until
[moq-dev/moq#8058](https://github.com/moq-dev/moq/pull/8058) resolves it.
The local drain/datagram recipes and explicit `--cases replacement` remain
available to validate the port.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

## Required

Expand Down
1 change: 1 addition & 0 deletions rs/moq-relay/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,7 @@ mod tests {
/// and forking both the socket options and the disabled-listener contract.
#[tokio::test]
async fn serve_hosts_merged_routes_alongside_the_defaults() {
moq_tokio::crypto::install_default().unwrap();
let listen = Some("127.0.0.1:0".parse().unwrap());
let internal = Internal::new(Config { listen }, moq_net::stats::Registry::disabled())
.bind()
Expand Down
5 changes: 5 additions & 0 deletions rs/moq-tokio/src/abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
/// with nothing left able to reach it. Derefs to the handle, so an owner can still
/// await the task's output or abort it early.
#[derive(Debug)]
#[cfg(any(feature = "quic", all(feature = "watch", feature = "_certs")))]
pub(crate) struct AbortOnDrop<T = ()>(tokio::task::JoinHandle<T>);

#[cfg(any(feature = "quic", all(feature = "watch", feature = "_certs")))]
impl<T> AbortOnDrop<T> {
/// Take ownership of a spawned task.
pub(crate) fn new(handle: tokio::task::JoinHandle<T>) -> Self {
Self(handle)
}
}

#[cfg(any(feature = "quic", all(feature = "watch", feature = "_certs")))]
impl<T> std::ops::Deref for AbortOnDrop<T> {
type Target = tokio::task::JoinHandle<T>;

Expand All @@ -23,12 +26,14 @@ impl<T> std::ops::Deref for AbortOnDrop<T> {
}
}

#[cfg(any(feature = "quic", all(feature = "watch", feature = "_certs")))]
impl<T> std::ops::DerefMut for AbortOnDrop<T> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}

#[cfg(any(feature = "quic", all(feature = "watch", feature = "_certs")))]
impl<T> Drop for AbortOnDrop<T> {
fn drop(&mut self) {
self.0.abort();
Expand Down
1 change: 1 addition & 0 deletions rs/moq-tokio/src/listen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@ pub struct Forward {

impl Forward {
/// Whether any forwarding setting is present.
#[cfg(feature = "_transport")]
pub(crate) fn configured(&self) -> bool {
self.bind.is_some() || self.key.is_some() || self.peers.is_some()
}
Expand Down
1 change: 1 addition & 0 deletions rs/moq-tokio/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ impl Server {
// gets the released spellings folded in too.
config.validate()?;

#[cfg(any(feature = "quic", feature = "websocket", feature = "tcp", all(feature = "uds", unix)))]
let versions = config.versions();

// Build a QUIC backend when `--listen` is set, or when nothing else
Expand Down
2 changes: 1 addition & 1 deletion rs/moq-tokio/tests/integration/datagram_tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async fn run(relay: bool, js_publishes: bool) {
}

#[tokio::test]
#[ignore = "requires Bun; run by just test datagram-tracks in the interop workflow"]
#[ignore = "JS lite-07 route wire awaits quest/m2/cluster-routing/routes/js.md"]
async fn datagram_tracks_javascript() {
for relay in [false, true] {
for js_publishes in [false, true] {
Expand Down
2 changes: 2 additions & 0 deletions sh/gh/test-inventory.allow
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ ignore moq-ffi::media::read_tests::raw_media_catalog_warmup_reaches_the_subscrip

# Need another implementation to speak the route wire; the quest ports it.
ignore moq-net::test_interop::lite_tracks_interop /quest/m2/cluster-routing/routes/js.md
ignore moq-tokio::datagram_tracks::datagram_tracks_javascript /quest/m2/cluster-routing/routes/js.md
recipe test::datagram-tracks /quest/m2/cluster-routing/routes/js.md
13 changes: 8 additions & 5 deletions test/interop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,14 @@ at QUIC's 1 ms timer granularity, the 500 ms GOP, one frame to decode, the 50 ms
playback delay, and one page sample plus one driver poll. Publisher preparation
is not part of it.

Firefox's replacement case is quarantined from the default run after intermittent
audio-tone failures. Investigate the missing tone samples alongside
[the audio playout work](https://github.com/moq-dev/moq/pull/8058), then restore it.
Run it explicitly with `just test media --media-engines firefox --media-cases replacement`;
its content, sync, switch, and fallback assertions remain active.
The replacement case is quarantined from the default run on every engine until
[the JS route-layer port](../../quest/m2/cluster-routing/routes/js.md) lands,
because both publishers use lite-07. Firefox also has a separate quarantine for
intermittent audio-tone failures; investigate those alongside
[the audio playout work](https://github.com/moq-dev/moq/pull/8058) before restoring
Firefox's default case. Run replacement explicitly with
`just test media --media-cases replacement` (add `--media-engines firefox` for
Firefox); its content, sync, switch, and fallback assertions remain active.

The CLI integration suite's `instances` cases exercise the real QUIC relay with
lite-07, lite-06, and IETF draft 22. Held catalog snapshots and media
Expand Down
5 changes: 5 additions & 0 deletions test/interop/clients/js/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ if (!native && values.cases === undefined && playerEngine === "firefox") {
"QUARANTINE\treplacement\tintermittent audio tone; investigate with https://github.com/moq-dev/moq/pull/8058",
);
}
// Every replacement publisher pins lite-07, including the lite-06 and IETF reader legs.
// An explicit --cases replacement remains available while porting the route wire.
if (values.cases === undefined && selected.delete("replacement")) {
console.error("QUARANTINE\treplacement\tJS lite-07 route wire awaits quest/m2/cluster-routing/routes/js.md");
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}

// process.exit narrows `url` above, but not inside the function declarations below.
const relay: string = url;
Expand Down
Loading