Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discard reconsiderblock failure on full sync CI #1563

Merged
merged 10 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/fullsync-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ jobs:
- name: Sync and Diff
run: ./sync_then_diff.sh

- name: Show Debug Log
- name: Show debug.log
run: cat $DATADIR/debug.log
if: ${{ failure() || success() }}

- name: Show log file
run: cat debug-tmp-$STOP_BLOCK.log
if: ${{ failure() || success() }}
13 changes: 7 additions & 6 deletions ci/parallel_sync/sync_then_diff.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

# TODO: Resolve shellcheck errors

export LC_ALL=C
set -Eeuo pipefail

Expand Down Expand Up @@ -35,14 +33,14 @@ setup_vars() {
create_log_file () {
echo "Output log to $TMP_LOG file"
{
$GREP "AccountChange:" $DEBUG_FILE | cut -d" " -f2-
$GREP "AccountChange:" "$DEBUG_FILE" | cut -d" " -f2-
$DEFI_CLI_CMD logaccountbalances
$DEFI_CLI_CMD spv_listanchors
$DEFI_CLI_CMD logstoredinterests
$DEFI_CLI_CMD listvaults '{"verbose": true}' '{"limit":1000000}'
$DEFI_CLI_CMD listtokens '{"limit":1000000}'
$DEFI_CLI_CMD getburninfo
} >> $TMP_LOG
} >> "$TMP_LOG"
}

# Start defid
Expand Down Expand Up @@ -75,6 +73,9 @@ main() {
CUR_BLOCK=$($DEFI_CLI_CMD getblockcount || echo $BLOCK)
if [ "$CUR_BLOCK" -eq "$BLOCK" ]; then
ATTEMPTS=$((ATTEMPTS + 1))

# Handle odd case where node get stuck on previously invalidated block
$DEFI_CLI_CMD reconsiderblock "$($DEFI_CLI_CMD getbestblockhash)" || true
else
ATTEMPTS=0
fi
Expand All @@ -89,10 +90,10 @@ main() {
$DEFI_CLI_CMD stop
# Download reference log file
echo "Downloading reference log file : $REF_LOG_PATH"
$FETCH $REF_LOG_PATH
$FETCH "$REF_LOG_PATH"

echo "diff $TMP_LOG $REF_LOG"
diff $TMP_LOG $REF_LOG
diff "$TMP_LOG" "$REF_LOG"
}

main "$@"
Expand Down