fix(http3): always qlog on send_buffer() #1023
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: QUIC Network Simulator | |
on: | |
push: | |
branches: ["main"] | |
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] | |
pull_request: | |
branches: ["main"] | |
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] | |
merge_group: | |
schedule: | |
# Run at 1 AM each day, so there is a `main`-branch baseline in the cache. | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
permissions: read-all | |
env: | |
LATEST: neqo-latest | |
DELIM: ' vs. ' | |
jobs: | |
docker-image: | |
name: Build Docker image | |
runs-on: ubuntu-latest | |
outputs: | |
imageID: ${{ steps.docker_build_and_push.outputs.imageID }} | |
permissions: | |
packages: write | |
steps: | |
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 | |
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | |
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }}-qns | |
tags: | | |
# default | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=ref,event=pr | |
# set latest tag for default branch | |
type=raw,value=latest,enable={{is_default_branch}} | |
- uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | |
if: github.event_name != 'pull_request' | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
file: qns/Dockerfile | |
build-args: RUST_VERSION=stable | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: 'linux/amd64, linux/arm64' | |
- uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | |
id: docker_build_and_push | |
with: | |
tags: ${{ steps.meta.outputs.tags }} | |
file: qns/Dockerfile | |
build-args: RUST_VERSION=stable | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: 'linux/amd64' | |
outputs: type=docker,dest=/tmp/${{ env.LATEST }}.tar | |
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: '${{ env.LATEST }} Docker image' | |
path: /tmp/${{ env.LATEST }}.tar | |
implementations: | |
name: Determine interop pairs | |
needs: docker-image | |
runs-on: ubuntu-latest | |
outputs: | |
pairs: ${{ steps.config.outputs.pairs }} | |
implementations: ${{ steps.config.outputs.implementations }} | |
env: | |
URL: https://github.com/mozilla/neqo | |
ROLE: both | |
steps: | |
- id: config | |
run: | | |
# Add neqo-latest to implementations.json | |
curl https://raw.githubusercontent.com/quic-interop/quic-interop-runner/master/implementations.json | \ | |
jq --arg key "$LATEST" --argjson newEntry ' | |
{ | |
"image": "${{ needs.docker-image.outputs.imageID }}", | |
"url": "${{ env.URL }}", | |
"role": "${{ env.ROLE }}" | |
}' '.[$key] = $newEntry' > implementations.json | |
{ | |
echo "implementations<<EOF" | |
cat implementations.json | |
echo "EOF" | |
} >> "$GITHUB_OUTPUT" | |
# Determine valid interop pairs that contain $LATEST | |
jq < implementations.json "[ | |
[to_entries[] | select(.value.role==\"server\" or .value.role==\"both\").key] as \$servers | | |
[to_entries[] | select(.value.role==\"client\" or .value.role==\"both\").key] as \$clients | | |
\$clients[] as \$client | | |
\$servers[] as \$server | | |
\$client + \"$DELIM\" + \$server | | |
select(contains(\"$LATEST\")) | |
]" > pairs.json | |
{ | |
echo "pairs<<EOF" | |
cat pairs.json | |
echo "EOF" | |
} >> "$GITHUB_OUTPUT" | |
run-qns: | |
name: Run QNS | |
needs: implementations | |
strategy: | |
fail-fast: false | |
matrix: | |
pair: ${{ fromJson(needs.implementations.outputs.pairs) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6 | |
with: | |
name: '${{ env.LATEST }} Docker image' | |
path: /tmp | |
- run: docker load --input /tmp/${{ env.LATEST }}.tar | |
- id: depair | |
run: | | |
PAIR=$(echo ${{ matrix.pair }} | sed "s/$DELIM/%/g") | |
echo "client=$(echo "$PAIR" | cut -d% -f1)" >> "$GITHUB_OUTPUT" | |
echo "server=$(echo "$PAIR" | cut -d% -f2)" >> "$GITHUB_OUTPUT" | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
# TODO: Replace once https://github.com/quic-interop/quic-interop-runner/pull/356 is merged. | |
- uses: ./.github/actions/quic-interop-runner | |
with: | |
client: ${{ steps.depair.outputs.client }} | |
server: ${{ steps.depair.outputs.server }} | |
implementations: ${{ needs.implementations.outputs.implementations }} | |
report: | |
name: Report results | |
needs: run-qns | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download cached main-branch results | |
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: results-main | |
key: qns-${{ runner.os }}-${{ github.sha }} | |
restore-keys: qns-${{ runner.os }}- | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6 | |
with: | |
pattern: '*results' | |
path: results | |
- run: | | |
ls -l results-main || true | |
cat results-main/result.json || true | |
echo "[]" > result.json | |
for RUN in results/*; do | |
[ -e "$RUN/result.json" ] || continue | |
CLIENT=$(jq -r < "$RUN/result.json" '.clients[0]') | |
SERVER=$(jq -r < "$RUN/result.json" '.servers[0]') | |
jq < "$RUN/result.json" ' | |
. as $data | | |
{ | |
results: [.results[] | group_by(.result)[] | {(.[0].result): [.[] | .abbr]}] | | |
add | |
} | | |
. + {log_url: $data.log_url} | |
' > "$RUN/grouped.json" | |
for GROUP in $(jq -r < "$RUN/grouped.json" '.results | keys[]'); do | |
RESULT=$(jq < "$RUN/grouped.json" -r '.results.'"$GROUP"'[]' | fmt -w 1000) | |
LOG=$(jq -r < "$RUN/grouped.json" -r '.log_url') | |
[ -n "$RESULT" ] || continue | |
{ | |
echo -n "* [" | |
[ "$CLIENT" == "$LATEST" ] || echo -n "<ins>" | |
echo -n "$CLIENT" | |
[ "$CLIENT" == "$LATEST" ] || echo -n "</ins>" | |
echo -n "$DELIM" | |
[ "$SERVER" == "$LATEST" ] || echo -n "<ins>" | |
echo -n "$SERVER" | |
[ "$SERVER" == "$LATEST" ] || echo -n "</ins>" | |
echo -n "]($LOG): " | |
echo "**$RESULT**" | |
} >> "$GROUP.md" | |
done | |
jq < "$RUN/grouped.json" ". += { client: \"$CLIENT\", server: \"$SERVER\" }" > new.json && \ | |
jq < result.json --argjson new "$(cat new.json)" '. += [$new]' > result.json.tmp && \ | |
rm new.json && \ | |
mv result.json.tmp result.json | |
done | |
DIFFER='def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); (. | (post_recurse | arrays) |= sort)' | |
diff <(jq -S "$DIFFER" results-main/result.json) <(jq -S "$DIFFER" result.json) || true | |
diff -Baur results-main/result.json result.json || true | |
{ | |
echo "### Failed Interop Tests" | |
SHA=$(cat results-main/baseline-sha.txt || true) | |
if [ -n "$SHA" ]; then | |
{ | |
echo "Interop failures relative to $SHA." | |
echo | |
} >> results.md | |
fi | |
if [ -e failed.md ]; then | |
echo "[QUIC Interop Runner](https://github.com/quic-interop/quic-interop-runner), *client* vs. *server*" | |
cat failed.md | |
else | |
echo "None :tada:" | |
fi | |
echo "<details><summary>All results</summary>" | |
echo | |
for GROUP in succeeded unsupported; do | |
echo "### ${GROUP^} Interop Tests" | |
if [ -e "$GROUP.md" ]; then | |
echo "[QUIC Interop Runner](https://github.com/quic-interop/quic-interop-runner), *client* vs. *server*" | |
cat "$GROUP.md" | |
else | |
echo "None :question:" | |
fi | |
done | |
echo | |
echo "</details>" | |
} >> comment.md | |
- name: Remember main-branch push URL | |
if: github.ref == 'refs/heads/main' | |
run: echo "${{ github.sha }}" > baseline-sha.txt | |
- name: Cache main-branch results | |
if: github.ref == 'refs/heads/main' | |
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
result.json | |
baseline-sha.txt | |
key: qns-${{ runner.os }}-${{ github.sha }} | |
- uses: ./.github/actions/pr-comment-data-export | |
with: | |
name: qns | |
contents: comment.md |