Skip to content

Commit

Permalink
interop: upload job logs directly to s3 (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft authored Mar 4, 2021
1 parent 05bf568 commit d6c42f3
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 23 deletions.
31 changes: 22 additions & 9 deletions .github/interop/runner.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@ index b26b2f8..b7652af 100755
set -e

diff --git a/docker-compose.yml b/docker-compose.yml
index c203219..83896f5 100644
index 7541cae..12f9c70 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -40,6 +40,7 @@ services:
- SSLKEYLOGFILE=/logs/keys.log
- QLOGDIR=/logs/qlog/
- TESTCASE=$TESTCASE_SERVER
+ - TEST_TYPE=$TEST_TYPE
- VERSION=$VERSION
depends_on:
- sim
cap_add:
@@ -67,6 +68,7 @@ services:
@@ -68,6 +69,7 @@ services:
- SSLKEYLOGFILE=/logs/keys.log
- QLOGDIR=/logs/qlog/
- TESTCASE=$TESTCASE_CLIENT
+ - TEST_TYPE=$TEST_TYPE
- REQUESTS=$REQUESTS
- VERSION=$VERSION
depends_on:
- sim
@@ -79,6 +81,7 @@ services:
@@ -81,6 +83,7 @@ services:
ipv4_address: 193.167.0.100
ipv6_address: fd00:cafe:cafe:0::100
extra_hosts:
+ - "server:193.167.100.100"
- "server4:193.167.100.100"
- "server6:fd00:cafe:cafe:100::100"
- "server46:193.167.100.100"
@@ -124,6 +127,7 @@ services:
@@ -126,6 +129,7 @@ services:
ipv4_address: 193.167.0.90
ipv6_address: fd00:cafe:cafe:0::90
extra_hosts:
Expand All @@ -45,7 +45,7 @@ index c203219..83896f5 100644
- "server6:fd00:cafe:cafe:100::110"
- "server46:193.167.100.110"
diff --git a/implementations.json b/implementations.json
index f621800..06f3595 100644
index 708e1ae..b422723 100644
--- a/implementations.json
+++ b/implementations.json
@@ -1,4 +1,9 @@
Expand All @@ -59,7 +59,7 @@ index f621800..06f3595 100644
"image": "martenseemann/quic-go-interop:latest",
"url": "https://github.com/lucas-clemente/quic-go",
diff --git a/interop.py b/interop.py
index 6ad191c..982cb57 100644
index 4dea51d..1ae8f68 100644
--- a/interop.py
+++ b/interop.py
@@ -124,6 +124,7 @@ class InteropRunner:
Expand All @@ -86,8 +86,21 @@ index 6ad191c..982cb57 100644
"WWW=" + testcase.www_dir() + " "
"DOWNLOADS=" + testcase.download_dir() + " "
"SERVER_LOGS=" + server_log_dir.name + " "
@@ -474,12 +477,6 @@ class InteropRunner:
client,
self._implementations[client]["image"],
)
- if not (
- self._check_impl_is_compliant(server)
- and self._check_impl_is_compliant(client)
- ):
- logging.info("Not compliant, skipping")
- continue

# run the test cases
for testcase in self._tests:
diff --git a/testcases.py b/testcases.py
index 4854842..d7fb471 100644
index 1d81d25..4ec44da 100644
--- a/testcases.py
+++ b/testcases.py
@@ -90,6 +90,10 @@ class TestCase(abc.ABC):
Expand Down
43 changes: 30 additions & 13 deletions .github/workflows/interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
RUST_BACKTRACE: 1
# This kept breaking builds so we're pinning for now. We should do our best to keep
# up with the changes, though.
INTEROP_RUNNER_REF: 7221a219e9a0070bfd82b23bdfde3d1b56a7b6a5
INTEROP_RUNNER_REF: cd62367f7cf98d16854551fdd8ef6a48ad89d53d
NETWORK_SIMULATOR_REF: sha256:d36e1ffd9369e41e9fd5cb8d2af5fb69d4bfaf1b1983fc538a5a3bf7777af4ba
IPERF_ENDPOINT_REF: sha256:cb50cc8019d45d9cad5faecbe46a3c21dd5e871949819a5175423755a9045106
WIRESHARK_VERSION: 3.4.3
Expand Down Expand Up @@ -200,13 +200,13 @@ jobs:
pip3 install wheel
pip3 install --upgrade -r requirements.txt
- name: Run quic-interop-server
- name: Run quic-interop-runner
working-directory: quic-interop-runner
run: |
mkdir -p results
# enable IPv6 support
sudo modprobe ip6table_filter
python3 run.py --client ${{ matrix.client }} --server ${{ matrix.server }} --json results/result.json --debug --log-dir results/logs || true
mkdir -p results/logs
- name: Prepare artifacts
working-directory: quic-interop-runner
Expand All @@ -219,13 +219,38 @@ jobs:
mv $from $to
done
# remove files we don't do anything with to reduce the artifact size
find results -name '*.pcap' -exec rm {} \;
find results -name '*.qlog' -exec rm {} \;
# Add index files for easy browsing
find results -maxdepth 3 -type d -path "*/logs/*/*" | while read from; do
tree -H "." \
-h \
-L 3 \
-I 'index.html' \
-T "${{ matrix.client }} client / ${{ matrix.server }} server - $(basename $from)" \
--noreport \
--charset utf-8 \
-o $from/index.html \
$from
done
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1

- name: Upload to S3
id: s3
working-directory: quic-interop-runner
run: |
TARGET="${{ github.sha }}/interop/logs/latest"
aws s3 sync results/logs "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
- uses: actions/upload-artifact@v2
with:
name: interop-${{ matrix.client }}-client-${{ matrix.server }}-server
path: quic-interop-runner/results/
path: quic-interop-runner/results/result.json

generate-report:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -310,14 +335,6 @@ jobs:
- name: Upload to S3
id: s3
run: |
find results -maxdepth 3 -type d -wholename '*/logs/*' | while read from; do
mv $from web/logs/latest/$(basename $from)
done
find web -maxdepth 4 -type d -path "*/logs/latest/*/*" | while read from; do
tree -H "." -h -L 3 -T "$(basename $from)" --noreport --charset utf-8 -I "*.html" -o $from/index.html $from
done
cp .github/interop/*.html web/
cp .github/interop/*.js web/
TARGET="${{ github.sha }}/interop"
Expand Down
2 changes: 1 addition & 1 deletion scripts/interop/run
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ ! -d $INTEROP_DIR ]; then
git clone https://github.com/marten-seemann/quic-interop-runner $INTEROP_DIR
# make sure to keep this up to date with the interop workflow
cd $INTEROP_DIR
git checkout 7221a219e9a0070bfd82b23bdfde3d1b56a7b6a5
git checkout cd62367f7cf98d16854551fdd8ef6a48ad89d53d
git apply --3way ../../.github/interop/runner.patch
cd ../../
fi
Expand Down

0 comments on commit d6c42f3

Please sign in to comment.