Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e78c981
add compute test file
bogdanfazakas Mar 20, 2025
4e42d6a
merge release v4.0
bogdanfazakas Mar 20, 2025
edfcc35
update compute commands
bogdanfazakas Mar 20, 2025
d96c841
update key
bogdanfazakas Mar 20, 2025
43875bd
merge fixes
bogdanfazakas Mar 21, 2025
238216c
small fixes
bogdanfazakas Mar 21, 2025
b99f35d
merge
bogdanfazakas Mar 21, 2025
261b489
add log
bogdanfazakas Mar 21, 2025
8ada08f
merge main
bogdanfazakas Mar 21, 2025
8035089
check ocean node issue
bogdanfazakas Mar 21, 2025
73424dc
try legacy peers
bogdanfazakas Mar 21, 2025
8bdc712
update node version
bogdanfazakas Mar 21, 2025
1c11caf
update get env test
bogdanfazakas Mar 21, 2025
55c7860
upgrade typescript-eslint
bogdanfazakas Mar 22, 2025
c6055b3
revert changes
bogdanfazakas Mar 23, 2025
569a1e6
update compute test
bogdanfazakas Mar 23, 2025
8770d2a
update check
bogdanfazakas Mar 24, 2025
f98519a
put back main
bogdanfazakas Mar 24, 2025
e7d4474
update regular expression pattern
bogdanfazakas Mar 24, 2025
757c3ff
final touch
bogdanfazakas Mar 24, 2025
10c91ee
cleanup
bogdanfazakas Mar 24, 2025
49e9e0a
merge main
bogdanfazakas Mar 24, 2025
1d8870f
merge main and fix conflicts
bogdanfazakas Apr 9, 2025
01b6c1a
add get results
bogdanfazakas Apr 15, 2025
98c1e0c
update wait job to finish test
bogdanfazakas Apr 15, 2025
f8c9320
update regex
bogdanfazakas Apr 15, 2025
25ca7ac
debug logs
bogdanfazakas Apr 16, 2025
65a55a3
debug logs
bogdanfazakas Apr 16, 2025
19f336b
update regex
bogdanfazakas Apr 16, 2025
341d235
update parse logic
bogdanfazakas Apr 16, 2025
33547eb
more enhacemnts
bogdanfazakas Apr 16, 2025
9c58977
use strip ansi
bogdanfazakas Apr 16, 2025
415d452
more regex
bogdanfazakas Apr 17, 2025
9059b1e
debug
bogdanfazakas Apr 17, 2025
ed940f4
cleanup
bogdanfazakas Apr 17, 2025
b46ba69
print ocean logs
bogdanfazakas Apr 17, 2025
9b7ecec
use node branch from barge
bogdanfazakas Apr 23, 2025
020c9bf
add more logs and details
bogdanfazakas Apr 23, 2025
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
124 changes: 69 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
node-version: "18"

- name: Install dependencies
run: npm install
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
node-version: "18"

- name: Install dependencies
run: npm install
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.19.0'
node-version: "18.19.0"

- name: Cache node_modules
uses: actions/cache@v3
Expand All @@ -69,8 +69,9 @@ jobs:
- name: Checkout Barge
uses: actions/checkout@v3
with:
repository: 'oceanprotocol/barge'
path: 'barge'
repository: "oceanprotocol/barge"
path: "barge"
ref: "feature/barge_with_node"

- name: Login to Docker Hub
if: ${{ env.DOCKERHUB_PASSWORD && env.DOCKERHUB_USERNAME }}
Expand All @@ -81,10 +82,11 @@ jobs:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Run Barge
- name: Run Barge (Ocean Node enabled)
working-directory: ${{ github.workspace }}/barge
run: |
bash -x start_ocean.sh --no-aquarius --no-provider --no-dashboard --with-c2d --with-typesense 2>&1 > start_ocean.log &
bash -x start_ocean.sh --no-aquarius --no-provider --no-dashboard --with-typesense 2>&1 > start_ocean.log &

- run: npm ci
- run: npm run build
- run: docker image ls
Expand All @@ -101,64 +103,76 @@ jobs:
docker image rm -f moby/buildkit:latest
rm -rf /usr/share/swift/

- name: Wait for contracts deployment and C2D cluster to be ready
- name: Wait for services with detailed logging
working-directory: ${{ github.workspace }}/barge
run: |
for i in $(seq 1 250); do
sleep 10
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" -a -f "$HOME/.ocean/ocean-c2d/ready" ] && break
done

- name: docker logs
run: docker logs ocean_ocean-contracts_1 && docker logs ocean_kindcluster_1 && docker logs ocean_computetodata_1 && docker logs ocean_typesense_1
if: ${{ failure() }}

- name: Checkout Ocean Node
uses: actions/checkout@v3
with:
repository: 'oceanprotocol/ocean-node'
path: 'ocean-node'
ref: 'main'
# Start log tail in background
tail -f start_ocean.log &
TAIL_PID=$!

# Wait for services with status reporting
for i in {1..50}; do
echo "=== Check attempt $i/50 ==="

# Check contract deployment
CONTRACTS_READY=$([ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && echo "yes" || echo "no")

# Check Node container status
NODE_CONTAINER=$(docker ps -q --filter "name=ocean_node")
NODE_RUNNING=$([ -n "$NODE_CONTAINER" ] && echo "yes" || echo "no")

# Check Node health endpoint
NODE_HEALTH=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8001/health || true)

echo "Contracts ready: $CONTRACTS_READY"
echo "Node container running: $NODE_RUNNING"
echo "Node health status: $NODE_HEALTH"

# If container exists but isn't healthy, show logs immediately
if [ "$NODE_RUNNING" = "yes" ] && [ "$NODE_HEALTH" != "200" ]; then
echo "Node container found but unhealthy. Current logs:"
docker logs ocean_node_1 --tail 50 || true
exit 1
fi

- name: Start Ocean Node
working-directory: ${{ github.workspace }}/ocean-node
run: |
npm ci
npm run build
npm run start &
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
IPFS_GATEWAY: http://172.15.0.16:8080/
ARWEAVE_GATEWAY: https://arweave.net/
P2P_ipV4BindTcpPort: 8000
HTTP_API_PORT: 8001
RPCS: '{ "8996": {"rpc": "http://127.0.0.1:8545", "chainId": 8996, "network": "development", "chunkSize": 100} }'
DB_URL: 'http://localhost:9200'
DB_TYPE: 'elasticsearch'
FEE_TOKENS: '{ "1": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48", "137": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1", "80001": "0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8", "56": "0xDCe07662CA8EbC241316a15B611c89711414Dd1a" }'
FEE_AMOUNT: '{ "amount": 1, "unit": "MB" }'
AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]'
AUTHORIZED_PUBLISHERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260","0x529043886F21D9bc1AE0feDb751e34265a246e47"]'
ALLOWED_ADMINS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]'
MAX_REQ_PER_MINUTE: 320
MAX_CONNECTIONS_PER_MINUTE: 500
DOCKER_COMPUTE_ENVIRONMENTS: '[{"socketPath":"/var/run/docker.sock","resources":[{"id":"disk","total":1000000000}],"storageExpiry":604800,"maxJobDuration":3600,"fees":{"1":[{"feeToken":"0x123","prices":[{"id":"cpu","price":1}]}]},"free":{"maxJobDuration":60,"maxJobs":3,"resources":[{"id":"cpu","max":1},{"id":"ram","max":1000000000},{"id":"disk","max":1000000000}]}}]'
- name: Check Ocean Node is running
run: |
for i in $(seq 1 30); do
if curl --output /dev/null --silent --head --fail "http://localhost:8001"; then
echo "Ocean Node is up"
# Exit condition
if [ "$CONTRACTS_READY" = "yes" ] && [ "$NODE_RUNNING" = "yes" ] && [ "$NODE_HEALTH" = "200" ]; then
echo "All services operational!"
kill $TAIL_PID
exit 0
fi

sleep 10
done
echo "Ocean Node did not start in time"

# Timeout handling
echo "!!! Service startup timed out !!!"
echo "=== Barge startup log ==="
cat start_ocean.log
echo "\n=== Node container logs ==="
docker logs ocean_node_1 --tail 1000 || echo "No node container found"
echo "\n=== Docker compose status ==="
docker compose -f docker-compose.yml ps
exit 1
- name: Run system tests

- name: Capture failure logs
if: ${{ failure() }}
run: |
echo "=== Full Docker Container List ==="
docker ps -a
echo "\n=== Barge Docker Compose Logs ==="
docker compose -f ${{ github.workspace }}/barge/docker-compose.yml logs --no-color --tail=1000
echo "\n=== Node Container Logs ==="
docker logs ocean_node_1 --tail 1000 2>&1 || echo "No node container logs available"
echo "\n=== Contracts Container Logs ==="
docker logs ocean_ocean-contracts_1 --tail 1000 2>&1 || echo "No contracts container logs available"
echo "\n=== C2D Container Logs ==="
docker logs ocean_computetodata_1 --tail 1000 2>&1 || echo "No C2D container logs available"

- name: Run system tests
run: npm run test:system
env:
INDEXING_RETRY_INTERVAL: 4000
INDEXING_MAX_RETRIES: 120
NODE_URL: 'http://127.0.0.1:8001'
NODE_URL: "http://127.0.0.1:8001"
AVOID_LOOP_RUN: true

Loading
Loading