Skip to content

Commit

Permalink
Update run based on PR #5367
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Oct 12, 2022
1 parent 2fb761e commit 33aa305
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/deploy-gcp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,9 @@ jobs:
# follow the logs of the test we just launched, up to block 1,810,000 or later
# (or the test finishing)
#
# We chose this height because it was about 20 hours into the NU5 sync, in October 2022.
# (These blocks seem to be larger than the previous ones.)
logs-1810k:
name: Log ${{ inputs.test_id }} test (1810k)
needs: [ logs-1790k ]
Expand Down Expand Up @@ -1007,23 +1010,27 @@ jobs:

# Show recent logs, following until block 1,810,000 (or the test finishes)
- name: Show logs for ${{ inputs.test_id }} test (1810k)
id: compute-ssh
uses: google-github-actions/ssh-compute@v0.1.2
with:
instance_name: ${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}
zone: ${{ env.ZONE }}
ssh_private_key: ${{ secrets.GCP_SSH_PRIVATE_KEY }}
command: |
sudo docker logs \
--tail all \
--follow \
${{ inputs.test_id }} | \
tee --output-error=exit /dev/stderr | \
grep --max-count=1 --extended-regexp --color=always \
-e 'estimated progress.*current_height.*=.*181[0-9][0-9][0-9][0-9].*remaining_sync_blocks' \
-e 'estimated progress.*current_height.*=.*1[8-9][1-9][0-9][0-9][0-9][0-9].*remaining_sync_blocks' \
-e 'estimated progress.*current_height.*=.*2[0-9][0-9][0-9][0-9][0-9][0-9].*remaining_sync_blocks' \
-e 'test result:.*finished in'
run: |
gcloud compute ssh \
github-service-account@${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \
--zone ${{ env.ZONE }} \
--quiet \
--ssh-flag="-o ServerAliveInterval=5" \
--ssh-flag="-o ConnectionAttempts=20" \
--ssh-flag="-o ConnectTimeout=5" \
--command \
"\
sudo docker logs \
--tail all \
--follow \
${{ inputs.test_id }} | \
tee --output-error=exit /dev/stderr | \
grep --max-count=1 --extended-regexp --color=always \
-e 'estimated progress.*current_height.*=.*181[0-9][0-9][0-9][0-9].*remaining_sync_blocks' \
-e 'estimated progress.*current_height.*=.*1[8-9][1-9][0-9][0-9][0-9][0-9].*remaining_sync_blocks' \
-e 'estimated progress.*current_height.*=.*2[0-9][0-9][0-9][0-9][0-9][0-9].*remaining_sync_blocks' \
-e 'test result:.*finished in' \
"
# follow the logs of the test we just launched, up to the last checkpoint (or the test finishing)
logs-checkpoint:
Expand Down

0 comments on commit 33aa305

Please sign in to comment.