From bc9fecaf2a04172a61c4a1ca86f5313de0b6031a Mon Sep 17 00:00:00 2001 From: Max Inden Date: Sat, 24 Feb 2024 17:56:56 +0100 Subject: [PATCH 01/25] feat: add github action Add GitHub action to be used by QUIC implementations to run the QUIC Interop Runner in their CI. --- .github/workflows/test_action.yml | 17 +++++++ action.yml | 83 +++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 .github/workflows/test_action.yml create mode 100644 action.yml diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml new file mode 100644 index 00000000..c92a1ad6 --- /dev/null +++ b/.github/workflows/test_action.yml @@ -0,0 +1,17 @@ +on: + pull_request: + push: + +jobs: + main: + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - id: foo + uses: ./ + with: + name: 'neqo' + image: 'ghcr.io/mozilla/neqo-qns:latest' + url: https://github.com/mozilla/neqo diff --git a/action.yml b/action.yml new file mode 100644 index 00000000..6c428952 --- /dev/null +++ b/action.yml @@ -0,0 +1,83 @@ +name: 'QUIC Interop Runner Action' +description: '' +author: 'mxinden' +branding: + icon: 'anchor' + color: 'blue' + +inputs: + name: + description: 'Name of the QUIC implementation' + required: true + image: + description: 'Docker image to be tested. Needs to reside either locally, or on some registry.' + required: true + url: + description: 'URL of the QUIC implementation' + required: true + role: + description: 'client/server/both' + required: false + default: 'both' + +runs: + using: "composite" + steps: + - name: Install dependencies + run: | + sudo add-apt-repository ppa:wireshark-dev/stable + sudo apt-get update + sudo apt-get install -y wireshark tshark + shell: bash + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Enable IPv6 support + run: sudo modprobe ip6table_filter + shell: bash + - name: Checkout quic-interop/quic-interop-runner repository + uses: actions/checkout@v2 + with: + repository: 'quic-interop/quic-interop-runner' + path: 'quic-interop-runner' + - name: Install Python packages + run: | + pwd + ls -la + cd quic-interop-runner + pip install -U pip + pip install -r requirements.txt + shell: bash + - run: docker image ls + shell: bash + - name: Run tests + id: test-run + run: | + cd quic-interop-runner + echo '{"neqo": {"image": "${{ inputs.image }}", "url": "${{ inputs.name }}", "role": "${{ inputs.role }}"}}' > implementations.json + cat implementations.json + python run.py --test handshake --log-dir output 2>&1 | tee github-comment + shell: bash + - uses: actions/upload-artifact@v4 + id: artifact-upload-step + if: always() + with: + name: output + path: quic-interop-runner/output + - name: Format GitHub comment + run: | + echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> tmp + echo '' >> tmp + echo '```' >> tmp + cat quic-interop-runner/github-comment >> tmp + echo '```' >> tmp + echo '' >> tmp + echo 'Download artifacts [here](${{ steps.artifact-upload-step.outputs.artifact-url }}).' >> tmp + mv tmp quic-interop-runner/github-comment + if: always() + shell: bash + - name: Comment PR + if: github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@v2 + with: + filePath: quic-interop-runner/github-comment From 9f7a74d495923b3ff82321cd14d8122516c11ce6 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Sat, 24 Feb 2024 18:42:38 +0100 Subject: [PATCH 02/25] Add pull_request_target https://github.com/thollander/actions-comment-pull-request?tab=readme-ov-file#permissions --- .github/workflows/test_action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index c92a1ad6..def30af2 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -1,5 +1,6 @@ on: pull_request: + pull_request_target: push: jobs: From 58e4d9a36732aceaefc82ca98ecab4f68bfb6770 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Sat, 24 Feb 2024 18:47:10 +0100 Subject: [PATCH 03/25] Revert "Add pull_request_target" This reverts commit 9f7a74d495923b3ff82321cd14d8122516c11ce6. --- .github/workflows/test_action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index def30af2..c92a1ad6 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -1,6 +1,5 @@ on: pull_request: - pull_request_target: push: jobs: From 03da3adaddccdfcfd8a7bc955964135e596cfb2d Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 26 Feb 2024 12:36:28 +0100 Subject: [PATCH 04/25] Split into unpriviledged and priviledged workflow --- .github/workflows/test_action.yml | 12 +++-- .github/workflows/test_action_comment.yml | 56 +++++++++++++++++++++++ action.yml | 54 ++++++++++++---------- 3 files changed, 94 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/test_action_comment.yml diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index c92a1ad6..1d401e74 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -1,17 +1,21 @@ +name: quic-interop-runner + on: pull_request: - push: + workflow_dispatch: jobs: main: - permissions: - pull-requests: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - id: foo + + # Build your Docker image. + + - name: Run QUIC Interop tests uses: ./ with: name: 'neqo' + # Replace with the name of the freshly-build local docker image. image: 'ghcr.io/mozilla/neqo-qns:latest' url: https://github.com/mozilla/neqo diff --git a/.github/workflows/test_action_comment.yml b/.github/workflows/test_action_comment.yml new file mode 100644 index 00000000..7d47c074 --- /dev/null +++ b/.github/workflows/test_action_comment.yml @@ -0,0 +1,56 @@ +# Post test results as pull request comment. +# +# This is done as a separate workflow as it requires write permissions. The +# tests itself might run off of a fork, i.e. an untrusted environment and should +# thus not be granted write permissions. + +name: Comment on the pull request + +on: + workflow_run: + workflows: ["quic-interop-runner"] + types: + - completed + +jobs: + upload: + permissions: + pull-requests: write + runs-on: ubuntu-latest + if: > + github.event.workflow_run.event == 'pull_request' + steps: + - name: Download comment-data + uses: dawidd6/action-download-artifact@v2.11.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + workflow: main.yml + run_id: ${{ github.event.workflow_run.id }} + name: comment-data + + - name: Format GitHub comment + run: | + pwd + ls -la + echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> comment + echo '' >> comment + echo '```' >> comment + cat summary >> comment + echo '```' >> comment + echo '' >> comment + echo 'Download artifacts [here](' >> comment + cat logs-url >> comment + echo ').' >> comment + if: always() + shell: bash + + - name: Read PR Number + id: pr-number + run: echo "::set-output name=number::$(cat pr-number)" + shell: bash + + - name: Comment PR + uses: thollander/actions-comment-pull-request@v2 + with: + filePath: comment + pr_number: ${{ steps.pr-number.outputs.number }} diff --git a/action.yml b/action.yml index 6c428952..fbe33a3c 100644 --- a/action.yml +++ b/action.yml @@ -1,9 +1,6 @@ name: 'QUIC Interop Runner Action' -description: '' +description: 'Run the QUIC Interop Runner tests.' author: 'mxinden' -branding: - icon: 'anchor' - color: 'blue' inputs: name: @@ -29,55 +26,64 @@ runs: sudo apt-get update sudo apt-get install -y wireshark tshark shell: bash + - uses: actions/setup-python@v4 with: python-version: 3.8 + - name: Enable IPv6 support run: sudo modprobe ip6table_filter shell: bash + - name: Checkout quic-interop/quic-interop-runner repository uses: actions/checkout@v2 with: repository: 'quic-interop/quic-interop-runner' path: 'quic-interop-runner' + - name: Install Python packages run: | - pwd - ls -la cd quic-interop-runner pip install -U pip pip install -r requirements.txt shell: bash + - run: docker image ls shell: bash + - name: Run tests id: test-run run: | cd quic-interop-runner echo '{"neqo": {"image": "${{ inputs.image }}", "url": "${{ inputs.name }}", "role": "${{ inputs.role }}"}}' > implementations.json - cat implementations.json - python run.py --test handshake --log-dir output 2>&1 | tee github-comment + python run.py --test handshake --log-dir logs 2>&1 | tee summary shell: bash + - uses: actions/upload-artifact@v4 id: artifact-upload-step if: always() with: - name: output - path: quic-interop-runner/output - - name: Format GitHub comment - run: | - echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> tmp - echo '' >> tmp - echo '```' >> tmp - cat quic-interop-runner/github-comment >> tmp - echo '```' >> tmp - echo '' >> tmp - echo 'Download artifacts [here](${{ steps.artifact-upload-step.outputs.artifact-url }}).' >> tmp - mv tmp quic-interop-runner/github-comment - if: always() + name: logs + path: quic-interop-runner/logs + + # This action might be running off of a fork and would thus not have write + # permissions on the origin repository. In order to allow a separate + # priviledged action to post a comment on a pull request, upload the + # necessary metadata. + - name: store comment-data shell: bash - - name: Comment PR if: github.event_name == 'pull_request' - uses: thollander/actions-comment-pull-request@v2 + env: + PULL_REQUEST_NUMBER: ${{ github.event.number }} + run: | + mkdir comment-data + mv quic-interop-runner/summary comment-data/summary + echo $PULL_REQUEST_NUMBER > comment-data/pr-number + echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' > comment-data/logs-url + + - name: Upload comment data + uses: actions/upload-artifact@v2 + if: github.event_name == 'pull_request' with: - filePath: quic-interop-runner/github-comment + name: comment-data + path: ./comment-data From ba32ba4b7224c6b633cdfe3ef90b3a99abbe2a98 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 26 Feb 2024 13:36:12 +0100 Subject: [PATCH 05/25] Trigger CI From 681836813d61d6a85ae4208032fd21157837c417 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 09:44:20 +0100 Subject: [PATCH 06/25] Use --must-include --- action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index fbe33a3c..dfe37b1c 100644 --- a/action.yml +++ b/action.yml @@ -24,7 +24,7 @@ runs: run: | sudo add-apt-repository ppa:wireshark-dev/stable sudo apt-get update - sudo apt-get install -y wireshark tshark + sudo apt-get install -y wireshark tshark jq shell: bash - uses: actions/setup-python@v4 @@ -55,8 +55,9 @@ runs: id: test-run run: | cd quic-interop-runner - echo '{"neqo": {"image": "${{ inputs.image }}", "url": "${{ inputs.name }}", "role": "${{ inputs.role }}"}}' > implementations.json - python run.py --test handshake --log-dir logs 2>&1 | tee summary + jq --arg key "${{ inputs.name }}" --argjson newEntry '{"neqo": {"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json + cat implementations.json + python run.py --must-include ${{ inputs.name }} --test handshake --log-dir logs 2>&1 | tee summary shell: bash - uses: actions/upload-artifact@v4 From 934d374a257869b42896e534fc3aa6e4c626119b Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 09:46:52 +0100 Subject: [PATCH 07/25] reference latest --- .github/workflows/test_action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index 1d401e74..2aec4c52 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -15,7 +15,7 @@ jobs: - name: Run QUIC Interop tests uses: ./ with: - name: 'neqo' + name: 'neqo-latest' # Replace with the name of the freshly-build local docker image. image: 'ghcr.io/mozilla/neqo-qns:latest' url: https://github.com/mozilla/neqo From 69fcd4284c7782b5a5e491f97b24651b949c9655 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 09:48:58 +0100 Subject: [PATCH 08/25] Remove wrapping object --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index dfe37b1c..c9a7f824 100644 --- a/action.yml +++ b/action.yml @@ -55,7 +55,7 @@ runs: id: test-run run: | cd quic-interop-runner - jq --arg key "${{ inputs.name }}" --argjson newEntry '{"neqo": {"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json + jq --arg key "${{ inputs.name }}" --argjson newEntry '{"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json cat implementations.json python run.py --must-include ${{ inputs.name }} --test handshake --log-dir logs 2>&1 | tee summary shell: bash From aa3a746e38fece1b56314139ee7b76898dbcacac Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 10:54:00 +0100 Subject: [PATCH 09/25] Add client, server and test argument option --- .github/workflows/test_action.yml | 3 +++ action.yml | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index 2aec4c52..604298e6 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -19,3 +19,6 @@ jobs: # Replace with the name of the freshly-build local docker image. image: 'ghcr.io/mozilla/neqo-qns:latest' url: https://github.com/mozilla/neqo + test: handshake + client: quic-go,ngtcp2,neqo,msquic + server: quic-go,ngtcp2,neqo,msquic diff --git a/action.yml b/action.yml index c9a7f824..ce637f07 100644 --- a/action.yml +++ b/action.yml @@ -16,6 +16,18 @@ inputs: description: 'client/server/both' required: false default: 'both' + client: + description: 'client implementations (comma-separated)' + required: false + default: '' + server: + description: 'server implementations (comma-separated)' + required: false + default: '' + test: + description: 'test cases (comma-separatated)' + required: false + default: '' runs: using: "composite" @@ -57,7 +69,17 @@ runs: cd quic-interop-runner jq --arg key "${{ inputs.name }}" --argjson newEntry '{"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json cat implementations.json - python run.py --must-include ${{ inputs.name }} --test handshake --log-dir logs 2>&1 | tee summary + ARGS="--log-dir logs --must-include ${{ inputs.name }}" + if [ -n "${{ inputs.client }}" ]; then + ARGS="$ARGS --client ${{ inputs.client }}" + fi + if [ -n "${{ inputs.server }}" ]; then + ARGS="$ARGS --server ${{ inputs.server }}" + fi + if [ -n "${{ inputs.test }}" ]; then + ARGS="$ARGS --test ${{ inputs.test }}" + fi + python run.py $ARGS 2>&1 | tee summary shell: bash - uses: actions/upload-artifact@v4 From 0f104266251e1e24cade64d4cce1f73ebd42574a Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 10:56:42 +0100 Subject: [PATCH 10/25] debug args --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index ce637f07..bb6e7106 100644 --- a/action.yml +++ b/action.yml @@ -79,6 +79,7 @@ runs: if [ -n "${{ inputs.test }}" ]; then ARGS="$ARGS --test ${{ inputs.test }}" fi + echo $ARGS python run.py $ARGS 2>&1 | tee summary shell: bash From 3a75b8fd9d3407e3684900c232f3b9ba05e2e4bd Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 11:05:55 +0100 Subject: [PATCH 11/25] Include itself --- .github/workflows/test_action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index 604298e6..c4be5d40 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -20,5 +20,5 @@ jobs: image: 'ghcr.io/mozilla/neqo-qns:latest' url: https://github.com/mozilla/neqo test: handshake - client: quic-go,ngtcp2,neqo,msquic - server: quic-go,ngtcp2,neqo,msquic + client: neqo-latest,quic-go,ngtcp2,neqo,msquic + server: neqo-latest,quic-go,ngtcp2,neqo,msquic From 96e38f802bff40af929517c3af04532ac700a249 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 11:12:26 +0100 Subject: [PATCH 12/25] Revert "debug args" This reverts commit 0f104266251e1e24cade64d4cce1f73ebd42574a. --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index bb6e7106..ce637f07 100644 --- a/action.yml +++ b/action.yml @@ -79,7 +79,6 @@ runs: if [ -n "${{ inputs.test }}" ]; then ARGS="$ARGS --test ${{ inputs.test }}" fi - echo $ARGS python run.py $ARGS 2>&1 | tee summary shell: bash From bb61dc3fe6d139cc9f2f0bfc52a27f14816133c4 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 1 Mar 2024 17:32:52 +0100 Subject: [PATCH 13/25] Update --- .github/workflows/test_action_comment.yml | 10 ++++------ action.yml | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_action_comment.yml b/.github/workflows/test_action_comment.yml index 7d47c074..73581b09 100644 --- a/.github/workflows/test_action_comment.yml +++ b/.github/workflows/test_action_comment.yml @@ -13,7 +13,7 @@ on: - completed jobs: - upload: + comment: permissions: pull-requests: write runs-on: ubuntu-latest @@ -21,12 +21,11 @@ jobs: github.event.workflow_run.event == 'pull_request' steps: - name: Download comment-data - uses: dawidd6/action-download-artifact@v2.11.0 + uses: actions/download-artifact@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - workflow: main.yml - run_id: ${{ github.event.workflow_run.id }} + run-id: ${{ github.event.workflow_run.id }} name: comment-data + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Format GitHub comment run: | @@ -41,7 +40,6 @@ jobs: echo 'Download artifacts [here](' >> comment cat logs-url >> comment echo ').' >> comment - if: always() shell: bash - name: Read PR Number diff --git a/action.yml b/action.yml index ce637f07..7bb3874e 100644 --- a/action.yml +++ b/action.yml @@ -105,7 +105,7 @@ runs: echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' > comment-data/logs-url - name: Upload comment data - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: github.event_name == 'pull_request' with: name: comment-data From af5942e59d555d6663fdb0ddaf5620c8b7d2ba6b Mon Sep 17 00:00:00 2001 From: Max Inden Date: Tue, 5 Mar 2024 16:22:18 +0100 Subject: [PATCH 14/25] rename workflows --- .github/workflows/test_action.yml | 2 +- .github/workflows/test_action_comment.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index c4be5d40..197f8a4b 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -1,4 +1,4 @@ -name: quic-interop-runner +name: test-action on: pull_request: diff --git a/.github/workflows/test_action_comment.yml b/.github/workflows/test_action_comment.yml index 73581b09..101030a3 100644 --- a/.github/workflows/test_action_comment.yml +++ b/.github/workflows/test_action_comment.yml @@ -4,11 +4,11 @@ # tests itself might run off of a fork, i.e. an untrusted environment and should # thus not be granted write permissions. -name: Comment on the pull request +name: test-action-comment on: workflow_run: - workflows: ["quic-interop-runner"] + workflows: ["test-action"] types: - completed From 163cca48faf1f8296c23806fe6c8db2dc9a77135 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Tue, 5 Mar 2024 16:22:29 +0100 Subject: [PATCH 15/25] restrict client and server set --- .github/workflows/test_action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index 197f8a4b..f43ad28c 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -20,5 +20,5 @@ jobs: image: 'ghcr.io/mozilla/neqo-qns:latest' url: https://github.com/mozilla/neqo test: handshake - client: neqo-latest,quic-go,ngtcp2,neqo,msquic - server: neqo-latest,quic-go,ngtcp2,neqo,msquic + client: neqo-latest,quic-go + server: quic-go,msquic From 336dd789b9ddfca55737d4eeabde1f84267fc346 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Tue, 5 Mar 2024 16:26:23 +0100 Subject: [PATCH 16/25] rename job --- .github/workflows/test_action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index f43ad28c..f87e5303 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: - main: + test-action: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 4828b85cd9de23f613258fc84dbd8793c376ef87 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Tue, 5 Mar 2024 16:39:21 +0100 Subject: [PATCH 17/25] Revert "restrict client and server set" This reverts commit 163cca48faf1f8296c23806fe6c8db2dc9a77135. --- .github/workflows/test_action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index f87e5303..00240bab 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -20,5 +20,5 @@ jobs: image: 'ghcr.io/mozilla/neqo-qns:latest' url: https://github.com/mozilla/neqo test: handshake - client: neqo-latest,quic-go - server: quic-go,msquic + client: neqo-latest,quic-go,ngtcp2,neqo,msquic + server: neqo-latest,quic-go,ngtcp2,neqo,msquic From e3c6e4cdf064e35d03ddf0c11cad6e68a6e84dda Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 11 Mar 2024 10:42:21 +0100 Subject: [PATCH 18/25] Only comment on failure --- .github/workflows/test_action_comment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_action_comment.yml b/.github/workflows/test_action_comment.yml index 101030a3..c22d5d6e 100644 --- a/.github/workflows/test_action_comment.yml +++ b/.github/workflows/test_action_comment.yml @@ -18,7 +18,8 @@ jobs: pull-requests: write runs-on: ubuntu-latest if: > - github.event.workflow_run.event == 'pull_request' + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'failure' steps: - name: Download comment-data uses: actions/download-artifact@v4 From ee0c7ed2cc1b4841ed96c32ff80d952da9d118c6 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 11 Mar 2024 10:42:38 +0100 Subject: [PATCH 19/25] Update comment in-place --- .github/workflows/test_action_comment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_action_comment.yml b/.github/workflows/test_action_comment.yml index c22d5d6e..547c9b56 100644 --- a/.github/workflows/test_action_comment.yml +++ b/.github/workflows/test_action_comment.yml @@ -53,3 +53,4 @@ jobs: with: filePath: comment pr_number: ${{ steps.pr-number.outputs.number }} + comment_tag: quic-network-simulator-comment From 92773335d6137b9aaf566e57be05de03b55d6e9a Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 11 Mar 2024 10:46:26 +0100 Subject: [PATCH 20/25] Remove debugging docker image ls --- action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/action.yml b/action.yml index 7bb3874e..420bbb85 100644 --- a/action.yml +++ b/action.yml @@ -60,9 +60,6 @@ runs: pip install -r requirements.txt shell: bash - - run: docker image ls - shell: bash - - name: Run tests id: test-run run: | From 5682ad0d983f94d2035dd00567f9ae1e1ccc1aa9 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 11 Mar 2024 10:47:21 +0100 Subject: [PATCH 21/25] Enable python pip caching --- action.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/action.yml b/action.yml index 420bbb85..3cd99042 100644 --- a/action.yml +++ b/action.yml @@ -32,6 +32,10 @@ inputs: runs: using: "composite" steps: + - name: Enable IPv6 support + run: sudo modprobe ip6table_filter + shell: bash + - name: Install dependencies run: | sudo add-apt-repository ppa:wireshark-dev/stable @@ -39,19 +43,11 @@ runs: sudo apt-get install -y wireshark tshark jq shell: bash - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.8 - - - name: Enable IPv6 support - run: sudo modprobe ip6table_filter - shell: bash - - - name: Checkout quic-interop/quic-interop-runner repository - uses: actions/checkout@v2 - with: - repository: 'quic-interop/quic-interop-runner' - path: 'quic-interop-runner' + cache: 'pip' + cache-dependency-path: 'quic-interop-runner/requirements.txt' - name: Install Python packages run: | From 6b1760e4bc5e1ee691db549d51cc3cb2d2f8fd92 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 11 Mar 2024 10:49:48 +0100 Subject: [PATCH 22/25] Re-introduce checkout --- action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/action.yml b/action.yml index 3cd99042..6e79b97c 100644 --- a/action.yml +++ b/action.yml @@ -32,6 +32,12 @@ inputs: runs: using: "composite" steps: + - name: Checkout quic-interop/quic-interop-runner repository + uses: actions/checkout@v4 + with: + repository: 'quic-interop/quic-interop-runner' + path: 'quic-interop-runner' + - name: Enable IPv6 support run: sudo modprobe ip6table_filter shell: bash From b7be2ceddfd62639c38af938ee1da2eb261bdd88 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 25 Mar 2024 10:14:39 +0100 Subject: [PATCH 23/25] Use --markdown --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 6e79b97c..3df27bdb 100644 --- a/action.yml +++ b/action.yml @@ -68,7 +68,7 @@ runs: cd quic-interop-runner jq --arg key "${{ inputs.name }}" --argjson newEntry '{"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json cat implementations.json - ARGS="--log-dir logs --must-include ${{ inputs.name }}" + ARGS="--log-dir logs --markdown --must-include ${{ inputs.name }}" if [ -n "${{ inputs.client }}" ]; then ARGS="$ARGS --client ${{ inputs.client }}" fi @@ -99,7 +99,7 @@ runs: PULL_REQUEST_NUMBER: ${{ github.event.number }} run: | mkdir comment-data - mv quic-interop-runner/summary comment-data/summary + cat quic-interop-runner/summary | awk '/^\|:--/{flag=1} flag' >> comment-data/summary echo $PULL_REQUEST_NUMBER > comment-data/pr-number echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' > comment-data/logs-url From b98691e6f85f6103dcde26473cdf769f2a6c8cff Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 25 Mar 2024 10:18:08 +0100 Subject: [PATCH 24/25] Don't access uninitialized field --- interop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interop.py b/interop.py index 8013c815..453c1560 100644 --- a/interop.py +++ b/interop.py @@ -235,7 +235,7 @@ def get_letters(result): results.append(colored(measurement.abbreviation(), "grey")) elif res.result == TestResult.FAILED: results.append(colored(measurement.abbreviation(), "red")) - row[server] += "\n".join(results) + row[server] = "\n".join(results) t.field_names = [""] + [column for column, _ in columns.items()] for client, results in rows.items(): row = [client] From 7635261cd03ff09fe305ea76457bfa7b60e69a55 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 25 Mar 2024 11:55:18 +0100 Subject: [PATCH 25/25] Use bugfix --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3df27bdb..34a1ce46 100644 --- a/action.yml +++ b/action.yml @@ -32,10 +32,12 @@ inputs: runs: using: "composite" steps: + # TODO: Update repository and ref - name: Checkout quic-interop/quic-interop-runner repository uses: actions/checkout@v4 with: - repository: 'quic-interop/quic-interop-runner' + repository: 'mxinden/quic-interop-runner' + ref: 'action' path: 'quic-interop-runner' - name: Enable IPv6 support