Skip to content

Commit ce5b170

Browse files
[PECOBLR-2461] fix(tests/e2e): de-collide MST table names across concurrent CI jobs
`_unique_table_name` derived the table name purely from the test node id, so two CI runs racing on the same warehouse + catalog (e.g. PR + push to main landing within seconds, as happened in run 26410038645) would both target `peco.default.mst_pysql_<test_name>` and step on each other's CREATE / DROP / DML. This caused the three "flaky" failures we kept seeing in `test_transactions.py`: - test_multi_table_commit → TRANSACTION_ROLLBACK_REQUIRED_AFTER_ABORT - test_executemany_rollback_in_txn → TABLE_OR_VIEW_NOT_FOUND - test_write_conflict_single_table → TABLE_OR_VIEW_ALREADY_EXISTS The companion helper `_unique_table_name_raw` already appended a uuid4 suffix for exactly this reason; the fixture helper was an oversight from #775. Add the same suffix here, reserving room so the result still fits in the 80-char cap. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent 85b99d4 commit ce5b170

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/e2e/test_transactions.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,17 @@
3535

3636

3737
def _unique_table_name(request):
38-
"""Derive a unique Delta table name from the test node id."""
38+
"""Derive a unique Delta table name from the test node id.
39+
40+
The uuid suffix keeps tables unique across concurrent CI jobs that
41+
share the same warehouse/catalog — without it, two runs racing on
42+
the same test name collide on CREATE/DROP.
43+
"""
3944
node_id = request.node.name
4045
sanitized = re.sub(r"[^a-z0-9_]", "_", node_id.lower())
41-
return f"mst_pysql_{sanitized}"[:80]
46+
suffix = uuid.uuid4().hex[:8]
47+
# Reserve room for the 9-char "_{suffix}" tail so total stays <= 80.
48+
return f"mst_pysql_{sanitized}"[:71] + f"_{suffix}"
4249

4350

4451
def _unique_table_name_raw(suffix):

0 commit comments

Comments
 (0)