jrunner: treat SQL Server's 'no result set' DDL trace as benign
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 <noreply@anthropic.com>
This commit is contained in:
parent
356e5f7799
commit
74967c1e56
@ -254,10 +254,13 @@ _EXCEPTION_HEADER_RE = re.compile(
|
|||||||
|
|
||||||
# jrunner runs query-mode SQL with `executeQuery`, which requires the
|
# jrunner runs query-mode SQL with `executeQuery`, which requires the
|
||||||
# statement to produce a ResultSet. DDL/DML (CREATE, TRUNCATE, INSERT)
|
# statement to produce a ResultSet. DDL/DML (CREATE, TRUNCATE, INSERT)
|
||||||
# still executes, but PG then throws "No results were returned by the
|
# still executes, but the driver then complains there's no ResultSet. The
|
||||||
# query." The statement succeeded — ignore the trace.
|
# 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 = (
|
_BENIGN_EXCEPTION_SUBSTRINGS = (
|
||||||
"No results were returned by the query",
|
"No results were returned by the query",
|
||||||
|
"The statement did not return a result set",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user