mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-22 21:59:59 +00:00
Print logs in extensions test in another step to improve readability (#10483)
## Problem The containers' log output is mixed with the tests' output, so you must scroll up to find the error. ## Summary of changes Printing of containers' logs moved to a separate step.
This commit is contained in:
4
.github/workflows/build_and_test.yml
vendored
4
.github/workflows/build_and_test.yml
vendored
@@ -820,8 +820,8 @@ jobs:
|
|||||||
- name: Print logs and clean up
|
- name: Print logs and clean up
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
docker compose -f ./docker-compose/docker-compose.yml logs || 0
|
docker compose --profile test-extensions -f ./docker-compose/docker-compose.yml logs || true
|
||||||
docker compose -f ./docker-compose/docker-compose.yml down
|
docker compose --profile test-extensions -f ./docker-compose/docker-compose.yml down
|
||||||
|
|
||||||
promote-images-dev:
|
promote-images-dev:
|
||||||
needs: [ check-permissions, tag, vm-compute-node-image, neon-image ]
|
needs: [ check-permissions, tag, vm-compute-node-image, neon-image ]
|
||||||
|
|||||||
@@ -150,8 +150,8 @@ services:
|
|||||||
- REPOSITORY=${REPOSITORY:-neondatabase}
|
- REPOSITORY=${REPOSITORY:-neondatabase}
|
||||||
- COMPUTE_IMAGE=compute-node-v${PG_VERSION:-16}
|
- COMPUTE_IMAGE=compute-node-v${PG_VERSION:-16}
|
||||||
- TAG=${TAG:-latest}
|
- TAG=${TAG:-latest}
|
||||||
- http_proxy=$http_proxy
|
- http_proxy=${http_proxy:-}
|
||||||
- https_proxy=$https_proxy
|
- https_proxy=${https_proxy:-}
|
||||||
environment:
|
environment:
|
||||||
- PG_VERSION=${PG_VERSION:-16}
|
- PG_VERSION=${PG_VERSION:-16}
|
||||||
#- RUST_BACKTRACE=1
|
#- RUST_BACKTRACE=1
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ PSQL_OPTION="-h localhost -U cloud_admin -p 55433 -d postgres"
|
|||||||
cleanup() {
|
cleanup() {
|
||||||
echo "show container information"
|
echo "show container information"
|
||||||
docker ps
|
docker ps
|
||||||
docker compose --profile test-extensions -f $COMPOSE_FILE logs
|
|
||||||
echo "stop containers..."
|
echo "stop containers..."
|
||||||
docker compose --profile test-extensions -f $COMPOSE_FILE down
|
docker compose --profile test-extensions -f $COMPOSE_FILE down
|
||||||
}
|
}
|
||||||
@@ -41,7 +40,6 @@ for pg_version in ${TEST_VERSION_ONLY-14 15 16 17}; do
|
|||||||
cnt=`expr $cnt + 3`
|
cnt=`expr $cnt + 3`
|
||||||
if [ $cnt -gt 60 ]; then
|
if [ $cnt -gt 60 ]; then
|
||||||
echo "timeout before the compute is ready."
|
echo "timeout before the compute is ready."
|
||||||
cleanup
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if docker compose --profile test-extensions -f $COMPOSE_FILE logs "compute_is_ready" | grep -q "accepting connections"; then
|
if docker compose --profile test-extensions -f $COMPOSE_FILE logs "compute_is_ready" | grep -q "accepting connections"; then
|
||||||
@@ -63,11 +61,9 @@ for pg_version in ${TEST_VERSION_ONLY-14 15 16 17}; do
|
|||||||
docker cp $TMPDIR/data $COMPUTE_CONTAINER_NAME:/ext-src/pg_hint_plan-src/
|
docker cp $TMPDIR/data $COMPUTE_CONTAINER_NAME:/ext-src/pg_hint_plan-src/
|
||||||
rm -rf $TMPDIR
|
rm -rf $TMPDIR
|
||||||
# We are running tests now
|
# We are running tests now
|
||||||
if docker exec -e SKIP=timescaledb-src,rdkit-src,postgis-src,pgx_ulid-src,pgtap-src,pg_tiktoken-src,pg_jsonschema-src,pg_graphql-src,kq_imcx-src,wal2json_2_5-src \
|
if ! docker exec -e SKIP=timescaledb-src,rdkit-src,postgis-src,pgx_ulid-src,pgtap-src,pg_tiktoken-src,pg_jsonschema-src,pg_graphql-src,kq_imcx-src,wal2json_2_5-src \
|
||||||
$TEST_CONTAINER_NAME /run-tests.sh | tee testout.txt
|
$TEST_CONTAINER_NAME /run-tests.sh | tee testout.txt
|
||||||
then
|
then
|
||||||
cleanup
|
|
||||||
else
|
|
||||||
FAILED=$(tail -1 testout.txt)
|
FAILED=$(tail -1 testout.txt)
|
||||||
for d in $FAILED
|
for d in $FAILED
|
||||||
do
|
do
|
||||||
@@ -77,9 +73,7 @@ for pg_version in ${TEST_VERSION_ONLY-14 15 16 17}; do
|
|||||||
cat $d/regression.out $d/regression.diffs || true
|
cat $d/regression.out $d/regression.diffs || true
|
||||||
done
|
done
|
||||||
rm -rf $FAILED
|
rm -rf $FAILED
|
||||||
cleanup
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
cleanup
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user