Skip to content

Commit af79c9a

Browse files
committed
Update validation workflow
1 parent fc4cef2 commit af79c9a

1 file changed

Lines changed: 30 additions & 11 deletions

File tree

.github/workflows/sandbox-validation.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,23 @@ jobs:
9292
./run.sh -c ${{ matrix.version }}
9393
9494
sleep 60 # Wait for containers to initialize
95+
timeout-minutes: 30
96+
97+
- name: Test database operations
98+
run: |
99+
echo "Waiting for database readiness (up to 60s)..."
100+
for i in {1..12}; do
101+
if docker exec -u gpadmin cbdb-cdw bash -l -c "pg_isready -h localhost -p 5432 -U gpadmin" >/dev/null 2>&1; then
102+
echo "Database is ready."
103+
break
104+
fi
105+
if [ "$i" -eq 12 ]; then
106+
echo "Database did not become ready in time."
107+
exit 1
108+
fi
109+
sleep 5
110+
done
95111
96-
# Test basic database operations
97112
echo "Testing database version..."
98113
docker exec -u gpadmin cbdb-cdw bash -l -c "psql -c 'SELECT version()'"
99114
@@ -104,7 +119,6 @@ jobs:
104119
docker exec -u gpadmin cbdb-cdw bash -l -c "psql -c 'SELECT * FROM pg_available_extensions'"
105120
106121
echo "✅ Single node test (${{ matrix.version }}) completed successfully"
107-
timeout-minutes: 30
108122
109123
- name: Check container logs on failure
110124
if: failure()
@@ -150,16 +164,21 @@ jobs:
150164
sleep 120 # Wait for containers to initialize
151165
timeout-minutes: 30
152166

153-
- name: Test SSH connectivity between nodes
154-
run: |
155-
echo "Testing SSH connectivity from coordinator to all nodes..."
156-
docker exec -u gpadmin cbdb-cdw bash -l -c "ssh -o StrictHostKeyChecking=no sdw1 'hostname'"
157-
docker exec -u gpadmin cbdb-cdw bash -l -c "ssh -o StrictHostKeyChecking=no sdw2 'hostname'"
158-
docker exec -u gpadmin cbdb-cdw bash -l -c "ssh -o StrictHostKeyChecking=no scdw 'hostname'"
159-
echo "✅ SSH connectivity test passed"
160-
161167
- name: Test database operations
162168
run: |
169+
echo "Waiting for database readiness (up to 60s)..."
170+
for i in {1..12}; do
171+
if docker exec -u gpadmin cbdb-cdw bash -l -c "pg_isready -h localhost -p 5432 -U gpadmin" >/dev/null 2>&1; then
172+
echo "Database is ready."
173+
break
174+
fi
175+
if [ "$i" -eq 12 ]; then
176+
echo "Database did not become ready in time."
177+
exit 1
178+
fi
179+
sleep 5
180+
done
181+
163182
echo "Testing database version..."
164183
docker exec -u gpadmin cbdb-cdw bash -l -c "psql -c 'SELECT version()'"
165184
@@ -170,7 +189,7 @@ jobs:
170189
docker exec -u gpadmin cbdb-cdw bash -l -c "psql -c 'SELECT * FROM pg_available_extensions'"
171190
172191
echo "✅ Multi-node test (${{ matrix.version }}) completed successfully"
173-
192+
174193
- name: Check all container logs on failure
175194
if: failure()
176195
run: |

0 commit comments

Comments
 (0)