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

[do not merge] debug: CI, multi-validator bug #195

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
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/smoke-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Smoke tests

on:
# debug CI for PR
pull_request:
branches:
- main
# Run every 6 hours
schedule:
- cron: '0 */6 * * *'
workflow_dispatch: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-smoke-tests
cancel-in-progress: true
cancel-in-progress: false # debuging

jobs:
smoke-test-1:
Expand Down
24 changes: 17 additions & 7 deletions charts/devnet/templates/chains/cosmos/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ spec:
app.kubernetes.io/name: {{ $chain.name }}-validator
app.kubernetes.io/version: {{ $.Chart.AppVersion }}
spec:
restartPolicy: Always
{{- include "imagePullSecrets" $chain | indent 6 }}
initContainers:
{{- if $toBuild }}
Expand Down Expand Up @@ -106,9 +107,21 @@ spec:
cp $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN /usr/bin
{{- end }}

curl http://$GENESIS_HOST.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/genesis -o /tmp/genesis.json
echo "Genesis file that we got....."
echo "check tmp genesis"
ls -lhG /tmp/genesis.json
echo "check chain dir"
ls -lhG $CHAIN_DIR

if [ -f $CHAIN_DIR/config/genesis.json ]; then
echo "Genesis file exists, exiting early"
exit 0
if cmp -s $CHAIN_DIR/config/genesis.json /tmp/genesis.json; then
echo "Genesis file exists, exiting early"
exit 0
else
echo "Genesis found does not match..., performing cleanup"
rm -rf $CHAIN_DIR/*
fi
fi

RECOVER=true
Expand All @@ -126,8 +139,8 @@ spec:
$CHAIN_BIN keys add $VAL_NAME --keyring-backend="test"
fi

curl http://$GENESIS_HOST.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/genesis -o $CHAIN_DIR/config/genesis.json
echo "Genesis file that we got....."
echo "Copy genesis.json to correct place"
cp /tmp/genesis.json $CHAIN_DIR/config/genesis.json
cat $CHAIN_DIR/config/genesis.json

echo "Setup config files"
Expand All @@ -142,9 +155,6 @@ spec:
GENESIS_NODE_P2P=$NODE_ID@$GENESIS_HOST.$NAMESPACE.svc.cluster.local:26656
echo "Node P2P: $GENESIS_NODE_P2P"
sed -i "s/persistent_peers = \"\"/persistent_peers = \"$GENESIS_NODE_P2P\"/g" $CHAIN_DIR/config/config.toml

echo "Printing the whole config.toml file"
cat $CHAIN_DIR/config/config.toml
resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }}
volumeMounts:
- mountPath: {{ $chain.home }}
Expand Down
8 changes: 6 additions & 2 deletions tests/smoke/ci/multi-validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ chains:
rpc: 26653
exposer: 38083
resources:
cpu: "0.3"
memory: 600M
limits:
cpu: "0.4"
memory: 1Gi
requests:
cpu: "0.2"
memory: 600M
faucet:
concurrency: 2
resources:
Expand Down