-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 4epochs kind test et al (#9358)
- Updated lock file paths to use /var/lock instead of home directories (~/). Avoids issues arising from different home directories across CI jobs and standardizes things - Try to fix 4epochs test running, enable it in both dockerized and non-dockerized workflows. Put 4epochs tests (along with transfer/smoke) behind a `network-all` label which controls when, namely, 4epochs tests is run. - Some testing script adjustments - Silence on AWS S3/minio uploads - Try to be very explicit about pushing a new image in deploy_spartan.sh
- Loading branch information
Showing
19 changed files
with
220 additions
and
72 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,71 @@ | ||
#!/bin/bash | ||
set -eu | ||
set -eux | ||
set -o pipefail | ||
|
||
TAG=$1 | ||
VALUES=$2 | ||
NAMESPACE=${3:-spartan} | ||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
if [ -z "$TAG" ]; then | ||
echo "Usage: $0 <tag> <values>" | ||
echo "Example: $0 latest 48-validators" | ||
echo "Usage: $0 <docker image tag> <values> (optional: <namespace>)" | ||
echo "Example: $0 latest 48-validators devnet" | ||
exit 1 | ||
fi | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
function cleanup() { | ||
set +x | ||
# kill everything in our process group except our process | ||
trap - SIGTERM && kill $(pgrep -g $$ | grep -v $$) $(jobs -p) &>/dev/null || true | ||
} | ||
trap cleanup SIGINT SIGTERM EXIT | ||
|
||
function show_status_until_pxe_ready() { | ||
set +x | ||
sleep 15 # let helm upgrade start | ||
kubectl get pods -n $NAMESPACE | ||
for i in {1..20} ; do | ||
# Show once a minute x 20 minutes | ||
kubectl get pods -n $NAMESPACE | ||
sleep 60 | ||
done | ||
} | ||
show_status_until_pxe_ready & | ||
|
||
helm upgrade --install spartan $SCRIPT_DIR/../aztec-network \ | ||
--namespace spartan \ | ||
--create-namespace \ | ||
--values $SCRIPT_DIR/../aztec-network/values/$VALUES.yaml \ | ||
--set images.aztec.image="aztecprotocol/aztec:$TAG" \ | ||
--set network.public=true \ | ||
--wait \ | ||
--wait-for-jobs=true \ | ||
--timeout=30m | ||
function log_stern() { | ||
set +x | ||
stern $NAMESPACE -n $NAMESPACE 2>&1 > "$SCRIPT_DIR/logs/$NAMESPACE-deploy.log" | ||
} | ||
log_stern & | ||
|
||
function upgrade() { | ||
# pull and resolve the image just to be absolutely sure k8s gets the latest image in the tag we want | ||
docker pull --platform linux/amd64 aztecprotocol/aztec:$TAG | ||
IMAGE=$(docker inspect --format='{{index .RepoDigests 0}}' aztecprotocol/aztec:$TAG) | ||
if ! [ -z "${PRINT_ONLY:-}" ] ; then | ||
helm template $NAMESPACE $SCRIPT_DIR/../aztec-network \ | ||
--namespace $NAMESPACE \ | ||
--create-namespace \ | ||
--values $SCRIPT_DIR/../aztec-network/values/$VALUES.yaml \ | ||
--set images.aztec.image="$IMAGE" \ | ||
--set network.public=true | ||
else | ||
helm upgrade --install $NAMESPACE $SCRIPT_DIR/../aztec-network \ | ||
--namespace $NAMESPACE \ | ||
--create-namespace \ | ||
--values $SCRIPT_DIR/../aztec-network/values/$VALUES.yaml \ | ||
--set images.aztec.image="$IMAGE" \ | ||
--set network.public=true \ | ||
--wait \ | ||
--wait-for-jobs=true \ | ||
--timeout=30m 2>&1 | ||
fi | ||
} | ||
|
||
# running the helm upgrade, but will try again if the setup l2 contracts job complains about being immutable | ||
if ! upgrade | tee "$SCRIPT_DIR/logs/$NAMESPACE-helm.log" ; then | ||
if grep 'cannot patch "'$NAMESPACE'-aztec-network-setup-l2-contracts"' "$SCRIPT_DIR/logs/$NAMESPACE-helm.log" ; then | ||
kubectl delete job $NAMESPACE-aztec-network-setup-l2-contracts -n $NAMESPACE | ||
upgrade | ||
fi | ||
fi |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
*.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
# Targets a running cluster and tests 5 slots worth of transfers against it. | ||
set -eu | ||
set -o pipefail | ||
|
||
# Test a deployed cluster | ||
|
||
NAMESPACE=${1:-spartan} | ||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
if [ -z "$NAMESPACE" ]; then | ||
echo "Usage: $0 (optional: <namespace>)" | ||
echo "Example: $0 devnet" | ||
exit 1 | ||
fi | ||
|
||
echo "Note: Repo should be bootstrapped with ./bootstrap.sh fast." | ||
|
||
# Fetch the service URLs based on the namespace for injection in the test-transfer.sh | ||
export BOOTNODE_URL=http://$(kubectl get svc -n $NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='$NAMESPACE-aztec-network-boot-node-lb-tcp')].status.loadBalancer.ingress[0].hostname}"):8080 | ||
export PXE_URL=http://$(kubectl get svc -n $NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='$NAMESPACE-aztec-network-pxe-lb')].status.loadBalancer.ingress[0].hostname}"):8080 | ||
export ETHEREUM_HOST=http://$(kubectl get svc -n $NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='$NAMESPACE-aztec-network-ethereum-lb')].status.loadBalancer.ingress[0].hostname}"):8545 | ||
|
||
echo "BOOTNODE_URL: $BOOTNODE_URL" | ||
echo "PXE_URL: $PXE_URL" | ||
echo "ETHEREUM_HOST: $ETHEREUM_HOST" | ||
|
||
# hack to ensure L2 contracts are considered deployed | ||
touch $SCRIPT_DIR/../../yarn-project/end-to-end/scripts/native-network/state/l2-contracts.env | ||
bash -x $SCRIPT_DIR/../../yarn-project/end-to-end/scripts/native-network/test-transfer.sh |
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
Oops, something went wrong.