Skip to content

Commit

Permalink
[Compatibility] A few small tweaks (MystenLabs#10785)
Browse files Browse the repository at this point in the history
## Description 

* Fix `sed` commands
* Disable incremental build (which will be slow for our purposes)
* Add debug log level selector for `workflow_dispatch` 

## Test Plan 

Must merge before it can be tested, otherwise we don't have access to
the script changes on the vultr host.

Manually tested the new sed commands locally on the vultr host in ssh
session. Should be good.

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
williampsmith authored Apr 12, 2023
1 parent b79944d commit bba5ada
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/compatibility_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
schedule:
- cron: "0 9 * * *" # UTC timing is every day at 1am PST
workflow_dispatch:
inputs:
debug:
type: boolean
required: false
description: "Run with debug-level logging"
default: false

jobs:
genesis-sync-test:
Expand Down Expand Up @@ -53,11 +59,11 @@ jobs:
- name: Build sui-node
run: |
tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 30 ssh ubuntu@fullnode-compat-test-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && cargo build --release --bin sui-node"
tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 30 ssh ubuntu@fullnode-compat-test-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && CARGO_INCREMENTAL=0 cargo build --release --bin sui-node"
- name: Run sync script
run: |
tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 30 ssh ubuntu@fullnode-compat-test-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && CARGO_TERM_COLOR=always ./scripts/fullnode-sync.sh -p ./target/release/sui-node -n testnet"
tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 30 ssh ubuntu@fullnode-compat-test-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && CARGO_TERM_COLOR=always ./scripts/fullnode-sync.sh -p ./target/release/sui-node -n testnet ${{ github.event.inputs.debug && '-d' || '' }}"
notify:
name: Notify
Expand Down Expand Up @@ -121,7 +127,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "To debug failures: `tsh ssh ubuntu@simtest-01` and look in the `/home/ubuntu/compatibility_check_logs/{date}` folder for test results"
"text": "To debug failures: See run logs (rerun with `debug` enabled if necessary); `tsh ssh ubuntu@fullnode-compat-test-01` if needed"
}
}
]
Expand Down
9 changes: 5 additions & 4 deletions scripts/fullnode-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ fi
if [[ ! -f "${SUI_RUN_PATH}/fullnode.yaml" ]]; then
echo "Generating fullnode.yaml at ${SUI_RUN_PATH}/fullnode.yaml"
cp crates/sui-config/data/fullnode-template.yaml ${SUI_RUN_PATH}/fullnode.yaml
sed -i '' "s|genesis.blob|${SUI_RUN_PATH}/genesis.blob|g" ${SUI_RUN_PATH}/fullnode.yaml
sed -i '' "s|suidb|${SUI_RUN_PATH}/suidb|g" ${SUI_RUN_PATH}/fullnode.yaml
sed -i "s|genesis.blob|${SUI_RUN_PATH}/genesis.blob|g" ${SUI_RUN_PATH}/fullnode.yaml
sed -i "s|suidb|${SUI_RUN_PATH}/suidb|g" ${SUI_RUN_PATH}/fullnode.yaml

if [[ ! $NETWORK == "devnet" ]]; then
if [[ $NETWORK != "devnet" ]]; then
cat >> "$SUI_RUN_PATH/fullnode.yaml" <<- EOM
p2p-config:
Expand Down Expand Up @@ -107,4 +107,5 @@ fi
./scripts/monitor_synced.py $END_EPOCH_ARG --env $NETWORK

kill $SUI_NODE_PID
exit 0
exit 0

0 comments on commit bba5ada

Please sign in to comment.