Skip to content

Commit 4c51c75

Browse files
authored
chore: upload logs in kind-network-test (#9755)
1 parent 452a450 commit 4c51c75

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

.github/ensure-tester/action.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ runs:
4444
elif [[ $TYPE == 128core-* ]]; then
4545
SIZE=32xlarge
4646
fi
47-
echo "instance_type=m6a.$SIZE m6in.$SIZE r6a.$SIZE r6i.$SIZE r6in.$SIZE" >> $GITHUB_OUTPUT
47+
INSTANCE_TYPES="m6a.$SIZE m6in.$SIZE r6a.$SIZE r6i.$SIZE r6in.$SIZE"
48+
if [[ $TYPE == *high-memory* ]]; then
49+
INSTANCE_TYPES="r6a.$SIZE r6i.$SIZE r6in.$SIZE"
50+
fi
51+
echo "instance_type=$INSTANCE_TYPES" >> $GITHUB_OUTPUT
4852
4953
- name: Start Tester
5054
uses: ./.github/spot-runner-action

.github/workflows/ci.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ jobs:
690690
# note: proving disabled
691691
kind-network-test:
692692
needs: [build, configure]
693-
if: contains(github.event.pull_request.labels.*.name, 'network-all') || github.ref_name == 'master'
693+
if: contains(github.event.pull_request.labels.*.name, 'network-all') || (needs.configure.outputs.yarn-project == 'true' && github.ref_name == 'master')
694694
runs-on: ${{ needs.configure.outputs.username }}-x86
695695
strategy:
696696
fail-fast: false
@@ -699,24 +699,27 @@ jobs:
699699
- test: transfer.test.ts
700700
values: 16-validators
701701
runner_type: 16core-tester-x86
702+
timeout: 60
702703
# TODO(#9736)
703704
# - test: transfer.test.ts
704705
# values: 48-validators
705706
# runner_type: 32core-tester-x86
706707
- test: reorg.test.ts
707708
values: 16-validators
708-
runner_type: 16core-tester-x86
709+
runner_type: 16core-tester-x86-high-memory
710+
timeout: 90
709711
- test: 4epochs.test.ts
710712
values: 16-validators
711713
runner_type: 16core-tester-x86
714+
timeout: 60
712715
steps:
713716
- uses: actions/checkout@v4
714717
with: { ref: "${{ env.GIT_COMMIT }}" }
715718
- uses: ./.github/ci-setup-action
716719
with:
717720
concurrency_key: kind-network-${{ matrix.config.test }}
718721
- name: Setup and KIND Network Test
719-
timeout-minutes: 60
722+
timeout-minutes: ${{ matrix.config.timeout }}
720723
uses: ./.github/ensure-tester-with-images
721724
env:
722725
USERNAME: ${{ needs.configure.outputs.username }}
@@ -729,13 +732,21 @@ jobs:
729732
builder_images_to_copy: aztecprotocol/aztec:${{ env.GIT_COMMIT }} aztecprotocol/end-to-end:${{ env.GIT_COMMIT }}
730733
# command to produce the images in case they don't exist
731734
builder_command: scripts/earthly-ci ./yarn-project+export-e2e-test-images
732-
tester_ttl: 60
733-
# TODO(#9640): use 16-validators.yaml
735+
tester_ttl: ${{ matrix.config.timeout }}
734736
run: |
735737
cd yarn-project/end-to-end
736738
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin
737739
test=${{ matrix.config.test }}
738740
NAMESPACE="${test%.test.ts}" FRESH_INSTALL=true VALUES_FILE=${{ matrix.config.values }}.yaml ./scripts/network_test.sh ./src/spartan/$test
741+
- name: Copy Network Logs
742+
if: always() # Run on failure too
743+
run: copy_from_tester /home/ubuntu/run-${{ env.RUN_ID }}/yarn-project/end-to-end/scripts/network-test.log network-test.log
744+
- name: Upload Network Logs
745+
if: always() # Run on failure too
746+
uses: actions/upload-artifact@v4
747+
with:
748+
name: kind-network-test-${{ matrix.config.values }}-${{ matrix.config.test }}.log
749+
path: network-test.log
739750

740751
l1-contracts-test:
741752
needs: [build, configure]

yarn-project/end-to-end/scripts/network_test.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ if [ "$FRESH_INSTALL" = "true" ]; then
5151
kubectl delete namespace "$NAMESPACE" --ignore-not-found=true --wait=true --now --timeout=10m
5252
fi
5353

54+
function copy_stern_to_log() {
55+
stern spartan -n $NAMESPACE > $SCRIPT_DIR/network-test.log
56+
}
57+
5458
function show_status_until_pxe_ready() {
5559
set +x # don't spam with our commands
5660
sleep 15 # let helm upgrade start
@@ -99,6 +103,7 @@ handle_network_shaping() {
99103
return 0
100104
}
101105

106+
copy_stern_to_log &
102107
show_status_until_pxe_ready &
103108

104109
function cleanup() {
@@ -146,7 +151,6 @@ if ! handle_network_shaping; then
146151
fi
147152
fi
148153

149-
150154
docker run --rm --network=host \
151155
-v ~/.kube:/root/.kube \
152156
-e K8S=true \

0 commit comments

Comments
 (0)