From 74967c1e56ee0f84418b3edcfa2179653857702f Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 17 Jun 2026 15:20:30 -0400 Subject: [PATCH] jrunner: treat SQL Server's 'no result set' DDL trace as benign MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_dest_sql executes DDL via jrunner query mode (executeQuery), which demands a ResultSet. CREATE SCHEMA/TABLE produce none, so the driver throws, jrunner logs the trace and exits 0, and _detect_silent_failure flags it as a failure unless the message is allowlisted. Only PG's wording was listed ("No results were returned by the query"); SQL Server says "The statement did not return a result set." — so pg->mssql wizard provisioning died on the first statement. Add the SQL Server phrasing to the benign list. Verified against the live SQL Server connection. Co-Authored-By: Claude Opus 4.8 --- pipekit/jrunner.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pipekit/jrunner.py b/pipekit/jrunner.py index 85c1cdf..5162eae 100644 --- a/pipekit/jrunner.py +++ b/pipekit/jrunner.py @@ -254,10 +254,13 @@ _EXCEPTION_HEADER_RE = re.compile( # jrunner runs query-mode SQL with `executeQuery`, which requires the # statement to produce a ResultSet. DDL/DML (CREATE, TRUNCATE, INSERT) -# still executes, but PG then throws "No results were returned by the -# query." The statement succeeded — ignore the trace. +# still executes, but the driver then complains there's no ResultSet. The +# statement succeeded — ignore the trace. Each dialect words it differently: +# PG: "No results were returned by the query" +# SQL Server:"The statement did not return a result set." _BENIGN_EXCEPTION_SUBSTRINGS = ( "No results were returned by the query", + "The statement did not return a result set", )