-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): split NU5 sync into two GitHub actions jobs (#4840)
* Split the NU5 job at block 1,740,000 * Fix the split regex * Fix the lightwalletd sync to tip regex
- Loading branch information
Showing
4 changed files
with
80 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -629,10 +629,67 @@ jobs: | |
'(estimated progress.*network_upgrade.*=.*Nu5)|(test result:.*finished in)' \ | ||
" | ||
# follow the logs of the test we just launched, up to block 1,740,000 (or the test finishing) | ||
# | ||
# We chose this height because it was about 5 hours into the NU5 sync, at the end of July 2022. | ||
# This is a temporary workaround until we improve sync speeds. | ||
logs-1740k: | ||
name: Log ${{ inputs.test_id }} test (1740k) | ||
needs: [ logs-canopy ] | ||
# If the previous job fails, we still want to show the logs. | ||
if: ${{ !cancelled() }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
persist-credentials: false | ||
fetch-depth: '2' | ||
|
||
- name: Inject slug/short variables | ||
uses: rlespinasse/github-slug-action@v4 | ||
with: | ||
short-length: 7 | ||
|
||
- name: Downcase network name for disks | ||
run: | | ||
NETWORK_CAPS=${{ inputs.network }} | ||
echo "NETWORK=${NETWORK_CAPS,,}" >> $GITHUB_ENV | ||
# Setup gcloud CLI | ||
- name: Authenticate to Google Cloud | ||
id: auth | ||
uses: google-github-actions/[email protected] | ||
with: | ||
workload_identity_provider: 'projects/143793276228/locations/global/workloadIdentityPools/github-actions/providers/github-oidc' | ||
service_account: '[email protected]' | ||
token_format: 'access_token' | ||
|
||
# Show recent logs, following until block 1,740,000 (or the test finishes) | ||
- name: Show logs for ${{ inputs.test_id }} test (1740k) | ||
run: | | ||
gcloud compute ssh \ | ||
${{ inputs.test_id }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }} \ | ||
--zone ${{ env.ZONE }} \ | ||
--quiet \ | ||
--ssh-flag="-o ServerAliveInterval=5" \ | ||
--command \ | ||
"\ | ||
docker logs \ | ||
--tail all \ | ||
--follow \ | ||
${{ inputs.test_id }} | \ | ||
tee --output-error=exit /dev/stderr | \ | ||
grep --max-count=1 --extended-regexp --color=always \ | ||
'(estimated progress.*current_height.*=.*174[0-9][0-9][0-9][0-9].*remaining_sync_blocks)|(test result:.*finished in)' \ | ||
" | ||
# follow the logs of the test we just launched, up to the last checkpoint (or the test finishing) | ||
logs-checkpoint: | ||
name: Log ${{ inputs.test_id }} test (checkpoint) | ||
needs: [ logs-canopy ] | ||
needs: [ logs-1740k ] | ||
# If the previous job fails, we still want to show the logs. | ||
if: ${{ !cancelled() }} | ||
runs-on: ubuntu-latest | ||
|
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
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
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