From 0fe9ad94a0c627f3478754ab0de76e3dbef9c1eb Mon Sep 17 00:00:00 2001 From: Vikrant Puppala Date: Fri, 5 Jun 2026 08:38:57 +0000 Subject: [PATCH] test(e2e/mst): DESCRIBE QUERY now allowed in transactions The server's MSTCheckRule allowlist has broadened to include DESCRIBE QUERY (DescribeQueryCommand), mirroring the earlier SHOW COLUMNS change. It no longer throws inside an active transaction, so the prior test_describe_query_blocked assertion (DID NOT RAISE) was stale. Flip it to test_describe_query_not_blocked using _assert_not_blocked (verifies it succeeds and returns >0 rows) and move DESCRIBE QUERY from the Blocked to the Allowed list in the class docstring. Verified against a live DBSQL warehouse: the full TestMstBlockedSql class (9 tests) passes. Signed-off-by: Vikrant Puppala --- tests/e2e/test_transactions.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/e2e/test_transactions.py b/tests/e2e/test_transactions.py index fd4fd73ab..a634885ab 100644 --- a/tests/e2e/test_transactions.py +++ b/tests/e2e/test_transactions.py @@ -565,17 +565,19 @@ class TestMstBlockedSql: "Only SELECT / INSERT / MERGE / UPDATE / DELETE / DESCRIBE TABLE are supported." The server has since broadened the allowlist to include SHOW COLUMNS - (ShowDeltaTableColumnsCommand), observed on current DBSQL warehouses. + (ShowDeltaTableColumnsCommand) and DESCRIBE QUERY (DescribeQueryCommand), + observed on current DBSQL warehouses. Blocked (throw + abort txn): - SHOW TABLES, SHOW SCHEMAS, SHOW CATALOGS, SHOW FUNCTIONS - - DESCRIBE QUERY, DESCRIBE TABLE EXTENDED + - DESCRIBE TABLE EXTENDED - SELECT FROM information_schema - Thrift Get{Catalogs,Schemas,Tables,Columns} RPCs (see TestMstMetadata) Allowed: - DESCRIBE TABLE (basic form) - SHOW COLUMNS + - DESCRIBE QUERY """ def _assert_blocked_and_txn_aborted(self, mst_conn_params, fq_table, blocked_sql): @@ -652,10 +654,14 @@ def test_show_columns_not_blocked(self, mst_conn_params, mst_table): mst_conn_params, fq_table, f"SHOW COLUMNS IN {fq_table}" ) - def test_describe_query_blocked(self, mst_conn_params, mst_table): - """DESCRIBE QUERY is blocked in MST (DescribeQueryCommand).""" + def test_describe_query_not_blocked(self, mst_conn_params, mst_table): + """DESCRIBE QUERY succeeds in MST — now allowed by the server's MSTCheckRule allowlist. + + Previously blocked (DescribeQueryCommand), the server has since broadened + the allowlist to include it, mirroring the earlier SHOW COLUMNS change. + """ fq_table, _ = mst_table - self._assert_blocked_and_txn_aborted( + self._assert_not_blocked( mst_conn_params, fq_table, f"DESCRIBE QUERY SELECT * FROM {fq_table}",