From 7a43e98b3642605b935a3aa95f496584d32bb57d Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Sep 2026 08:13:54 +0800 Subject: [PATCH 1/3] fix: replace psycopg2 with psycopg3 in run_integration_tests.sh --- scripts/ci/run_integration_tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ci/run_integration_tests.sh b/scripts/ci/run_integration_tests.sh index 192b538c4..58a8a5114 100755 --- a/scripts/ci/run_integration_tests.sh +++ b/scripts/ci/run_integration_tests.sh @@ -197,8 +197,8 @@ if [ "$USE_SHARED_PG" = "true" ]; then # 创建主数据库(xdist 模式下各 worker 会创建自己的数据库,主库作为 fallback) echo "创建主测试数据库: $CI_DB_NAME" PGPASSWORD="$SHARED_PG_PASSWORD" python3 -c " -import psycopg2 -conn = psycopg2.connect(host='$SHARED_PG_HOST', port=$SHARED_PG_PORT, user='$SHARED_PG_USER', password='$SHARED_PG_PASSWORD', dbname='postgres') +import psycopg +conn = psycopg.connect(host='$SHARED_PG_HOST', port=$SHARED_PG_PORT, user='$SHARED_PG_USER', password='$SHARED_PG_PASSWORD', dbname='postgres') conn.autocommit = True cur = conn.cursor() cur.execute(f'DROP DATABASE IF EXISTS \"$CI_DB_NAME\" WITH (FORCE)') @@ -304,8 +304,8 @@ if [ "$USE_SHARED_PG" = "true" ]; then # 清理所有以 CI_DB_NAME 开头的数据库(主库 + worker 库) PGPASSWORD="${SHARED_PG_PASSWORD}" python3 -c " -import psycopg2 -conn = psycopg2.connect(host='${SHARED_PG_HOST}', port=${SHARED_PG_PORT}, user='${SHARED_PG_USER}', password='${SHARED_PG_PASSWORD}', dbname='postgres') +import psycopg +conn = psycopg.connect(host='${SHARED_PG_HOST}', port=${SHARED_PG_PORT}, user='${SHARED_PG_USER}', password='${SHARED_PG_PASSWORD}', dbname='postgres') conn.autocommit = True cur = conn.cursor() -- 2.54.0 From e61cb3abdb2bd301b2e90b0d2110da06a3bd4896 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Sep 2026 08:14:26 +0800 Subject: [PATCH 2/3] fix: replace psycopg2 with psycopg3 in run_validate.sh --- scripts/ci/run_validate.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ci/run_validate.sh b/scripts/ci/run_validate.sh index c85c299a1..94fdfae93 100755 --- a/scripts/ci/run_validate.sh +++ b/scripts/ci/run_validate.sh @@ -409,8 +409,8 @@ except: echo "创建测试数据库: $CI_DB_NAME" PGPASSWORD="$SHARED_PG_PASSWORD" python3 -c " -import psycopg2 -conn = psycopg2.connect(host='$SHARED_PG_HOST', port=$SHARED_PG_PORT, user='$SHARED_PG_USER', password='$SHARED_PG_PASSWORD', dbname='postgres') +import psycopg +conn = psycopg.connect(host='$SHARED_PG_HOST', port=$SHARED_PG_PORT, user='$SHARED_PG_USER', password='$SHARED_PG_PASSWORD', dbname='postgres') conn.autocommit = True cur = conn.cursor() cur.execute(f'DROP DATABASE IF EXISTS \"$CI_DB_NAME\" WITH (FORCE)') @@ -431,8 +431,8 @@ conn.close() # 清理数据库 echo "清理测试数据库: $CI_DB_NAME" PGPASSWORD="$SHARED_PG_PASSWORD" python3 -c " -import psycopg2 -conn = psycopg2.connect(host='$SHARED_PG_HOST', port=$SHARED_PG_PORT, user='$SHARED_PG_USER', password='$SHARED_PG_PASSWORD', dbname='postgres') +import psycopg +conn = psycopg.connect(host='$SHARED_PG_HOST', port=$SHARED_PG_PORT, user='$SHARED_PG_USER', password='$SHARED_PG_PASSWORD', dbname='postgres') conn.autocommit = True cur = conn.cursor() cur.execute(f'DROP DATABASE IF EXISTS \"$CI_DB_NAME\" WITH (FORCE)') -- 2.54.0 From 1f48ae6bc805203079b65010a233879121df02f4 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Sep 2026 10:21:41 +0800 Subject: [PATCH 3/3] ci: trigger CI for psycopg2 fix verification --- scripts/ci/run_integration_tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci/run_integration_tests.sh b/scripts/ci/run_integration_tests.sh index 58a8a5114..b38ab6ce6 100755 --- a/scripts/ci/run_integration_tests.sh +++ b/scripts/ci/run_integration_tests.sh @@ -345,3 +345,4 @@ set -e echo "" echo "=== CI Integration Tests 全部通过 ✅ ===" +# CI trigger: 1788229300 \ No newline at end of file -- 2.54.0