Skip to content

Commit

Permalink
fix: mev-commit-cli.sh start minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Apr 4, 2024
1 parent 0bff228 commit f5ad326
Show file tree
Hide file tree
Showing 12 changed files with 241 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mev-commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

# TODO(mrekucci): Re-enable /external/geth module when tests are passing.
- name: Run Test
run: go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | xargs go test
run: go list -f '{{.Dir}}/...' -m | grep -v '/external/geth' | xargs go test -short -race

foundry:
name: Foundry Checks and Reports
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/mev-commit-infra-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy and Test mev-commit infra
name: mev-commit-infra-test

on:
workflow_run:
Expand All @@ -8,6 +8,7 @@ on:

jobs:
deploy_and_test:
name: Deploy and Test mev-commit infra
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
Expand All @@ -26,41 +27,42 @@ jobs:

- name: Setup Docker Compose
run: |
sudo rm /usr/local/bin/docker-compose
sudo rm $(which docker-compose)
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Build and Start Services
run: cd p2p && set -x && ./mev-commit-cli.sh start mev-commit --datadog-key "${{ secrets.DATADOG_API_KEY }}"
run: ./mev-commit-cli.sh start minimal

- name: Check Service Endpoints
run: |
ips=("172.29.9.100" "172.29.9.101" "172.29.9.102") # Example IP addresses, adjust as needed
set -x
nodes=("bootnode" "bidder-1" "provider-1")
for ip in "${ips[@]}"; do
echo "Checking service at $ip"
for node in "${nodes[@]}"; do
echo "Checking $node service"
success=false
attempts=0
while [ $attempts -lt 3 ]; do
response=$(curl -s "$ip:13523/topology")
response=$(curl -s "$node:13523/topology")
buildersCount=$(echo "$response" | jq '.connected_peers.builders | length')
searchersCount=$(echo "$response" | jq '.connected_peers.searchers | length')
if [[ -n "$response" && "$buildersCount" -gt 0 || "$searchersCount" -gt 0 ]]; then
echo "Service at $ip is OK"
echo "Service $node is OK"
success=true
break
else
echo "Service check failed for $ip. Retrying in 30 seconds..."
echo "Service check failed for $node. Retrying in 30 seconds..."
attempts=$(( $attempts + 1 ))
sleep 30
fi
done
if [ "$success" == "false" ]; then
echo "Service check failed for $ip after 3 attempts, failing"
echo "Service check failed for $node after 3 attempts, failing"
exit 1
fi
done
- name: Stop Services
run: cd p2p && ./mev-commit-cli.sh stop mev-commit
run: ./mev-commit-cli.sh stop minimal
5 changes: 2 additions & 3 deletions contracts-abi/clients/BidderRegistry/BidderRegistry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions contracts-abi/clients/L1Gateway/L1Gateway.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions contracts-abi/clients/Oracle/Oracle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions contracts-abi/clients/ProviderRegistry/ProviderRegistry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions contracts-abi/clients/SettlementGateway/SettlementGateway.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f5ad326

Please sign in to comment.