From f208aef696243f6fac25f7a4058f553844ec9580 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 27 Aug 2026 09:57:24 -0700 Subject: [PATCH 1/7] chore: split sqlalchemy system tests into separate check --- .kokoro/presubmit/sqlalchemy_compliance.cfg | 7 +++++++ .kokoro/presubmit/system.cfg | 6 ++++++ .kokoro/system.sh | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 .kokoro/presubmit/sqlalchemy_compliance.cfg diff --git a/.kokoro/presubmit/sqlalchemy_compliance.cfg b/.kokoro/presubmit/sqlalchemy_compliance.cfg new file mode 100644 index 000000000000..891deec4aa4e --- /dev/null +++ b/.kokoro/presubmit/sqlalchemy_compliance.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run compliance nox session. +env_vars: { + key: "NOX_SESSION" + value: "compliance" +} diff --git a/.kokoro/presubmit/system.cfg b/.kokoro/presubmit/system.cfg index 789455bd6973..f01fa3c46e72 100644 --- a/.kokoro/presubmit/system.cfg +++ b/.kokoro/presubmit/system.cfg @@ -5,3 +5,9 @@ env_vars: { key: "NOX_SESSION" value: "system-3.12" } + +# Skip compliance tests in system job since they run in dedicated compliance job +env_vars: { + key: "RUN_COMPLIANCE_TESTS" + value: "false" +} diff --git a/.kokoro/system.sh b/.kokoro/system.sh index 91d96e7a1497..9e3af64ea6b0 100755 --- a/.kokoro/system.sh +++ b/.kokoro/system.sh @@ -263,6 +263,12 @@ for path in `find 'packages' \ files_to_check=("${package_path}") fi + # When running compliance tests, only test packages that have compliance suites + if [[ "${NOX_SESSION}" == "compliance"* && "${package_name}" != "sqlalchemy-"* ]]; then + printf "SKIP %-20s %-40s %s\n" "[not_applicable]" "${package_name}" "${commit_hash:-HEAD}" + continue + fi + set +e # Passing the array expanded as arguments to git diff. package_modified=$(git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- "${files_to_check[@]}" | wc -l) From 2649a9aec7867d2d7a27a1ad32dda8444297f385 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 27 Aug 2026 10:12:23 -0700 Subject: [PATCH 2/7] Update .kokoro/system.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .kokoro/system.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.kokoro/system.sh b/.kokoro/system.sh index 9e3af64ea6b0..2b06d445964a 100755 --- a/.kokoro/system.sh +++ b/.kokoro/system.sh @@ -264,7 +264,7 @@ for path in `find 'packages' \ fi # When running compliance tests, only test packages that have compliance suites - if [[ "${NOX_SESSION}" == "compliance"* && "${package_name}" != "sqlalchemy-"* ]]; then + if [[ "${NOX_SESSION:-}" == "compliance"* && "${package_name:-}" != "sqlalchemy-"* ]]; then printf "SKIP %-20s %-40s %s\n" "[not_applicable]" "${package_name}" "${commit_hash:-HEAD}" continue fi From e54cad5a4c906ffb4541668adc66655180ef0d0c Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 27 Aug 2026 10:41:24 -0700 Subject: [PATCH 3/7] applied minor fixes to relevant packages --- packages/sqlalchemy-bigquery/README.rst | 2 +- packages/sqlalchemy-spanner/README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sqlalchemy-bigquery/README.rst b/packages/sqlalchemy-bigquery/README.rst index 0c31785fa9fe..8e8586154eaa 100644 --- a/packages/sqlalchemy-bigquery/README.rst +++ b/packages/sqlalchemy-bigquery/README.rst @@ -3,7 +3,7 @@ SQLAlchemy Dialect for BigQuery |GA| |pypi| |versions| -`SQLALchemy Dialects`_ +`SQLAlchemy Dialects`_ - `Dialect Documentation`_ - `Product Documentation`_ diff --git a/packages/sqlalchemy-spanner/README.rst b/packages/sqlalchemy-spanner/README.rst index fc9e5b6c0f75..8847473419dc 100644 --- a/packages/sqlalchemy-spanner/README.rst +++ b/packages/sqlalchemy-spanner/README.rst @@ -4,7 +4,7 @@ Spanner dialect for SQLAlchemy Spanner dialect for SQLAlchemy represents an interface API designed to make it possible to control Cloud Spanner databases with SQLAlchemy API. The dialect is built on top of `the Spanner DB -API `__, +API `__, which is designed in accordance with `PEP-249 `__. From 8c596bd676ecd36d70aa8aad7d483b07c128ab88 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 28 Aug 2026 11:25:19 -0700 Subject: [PATCH 4/7] chore: trigger build From bccdfee492db5b9b34f34513b1f564657ae02317 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 28 Aug 2026 14:40:54 -0700 Subject: [PATCH 5/7] added compliance step to noxfile for sqlalchemy-spanner --- packages/sqlalchemy-spanner/noxfile.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/sqlalchemy-spanner/noxfile.py b/packages/sqlalchemy-spanner/noxfile.py index df709c96e50a..a652884fbbdc 100644 --- a/packages/sqlalchemy-spanner/noxfile.py +++ b/packages/sqlalchemy-spanner/noxfile.py @@ -524,6 +524,16 @@ def system(session, test_type): ) +@nox.session(python=SYSTEM_COMPLIANCE_MIGRATION_TEST_PYTHON_VERSIONS) +@nox.parametrize( + "test_type", + ["compliance_14", "compliance_20"], +) +def compliance(session, test_type): + """Run SQLAlchemy dialect compliance test suite.""" + system(session, test_type=test_type) + + @nox.session(python=DEFAULT_PYTHON_VERSION) def mypy(session): """Run the type checker.""" From ce9b926f80f48f594c520d728a11e66a308c15a6 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 28 Aug 2026 14:41:13 -0700 Subject: [PATCH 6/7] fix python version --- packages/sqlalchemy-spanner/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sqlalchemy-spanner/noxfile.py b/packages/sqlalchemy-spanner/noxfile.py index a652884fbbdc..93d9812d06b4 100644 --- a/packages/sqlalchemy-spanner/noxfile.py +++ b/packages/sqlalchemy-spanner/noxfile.py @@ -177,7 +177,7 @@ def lint_setup_py(session): session.run("python", "setup.py", "check", "--restructuredtext", "--strict") -@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[0]) +@nox.session(python=SYSTEM_COMPLIANCE_MIGRATION_TEST_PYTHON_VERSIONS[0]) def compliance_test_14(session): """Run SQLAlchemy dialect compliance test suite.""" config_file = f"test_compliance_14_{session.python}_{uuid.uuid4().hex[:6]}.cfg" From 15114d9bdd9d4322c55f947a23e8f0910580dd55 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 28 Aug 2026 14:41:30 -0700 Subject: [PATCH 7/7] fixed unintentional test skip --- packages/sqlalchemy-spanner/noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sqlalchemy-spanner/noxfile.py b/packages/sqlalchemy-spanner/noxfile.py index 93d9812d06b4..26a5a0f0e647 100644 --- a/packages/sqlalchemy-spanner/noxfile.py +++ b/packages/sqlalchemy-spanner/noxfile.py @@ -484,10 +484,10 @@ def system(session, test_type): "Credentials or emulator host must be set via environment variable" ) - if os.environ.get("RUN_COMPLIANCE_TESTS", "true") == "false" and not os.environ.get( + if os.environ.get("RUN_SYSTEM_TESTS", "true") == "false" and not os.environ.get( "SPANNER_EMULATOR_HOST", "" ): - session.skip("RUN_COMPLIANCE_TESTS is set to false, skipping") + session.skip("RUN_SYSTEM_TESTS is set to false, skipping") if test_type == "system" and session.python not in SYSTEM_TEST_PYTHON_VERSIONS: session.skip("Standard system tests configured to run exclusively on 3.12")