Skip to content

Merge MSI PR (#573) into SP branch + fold SP cache onto shared infras…

8dcff3a
Select commit
Loading
Failed to load commit list.
Draft

FEAT: [WIP] Add ActiveDirectoryServicePrincipal support for bulk copy #576

Merge MSI PR (#573) into SP branch + fold SP cache onto shared infras…
8dcff3a
Select commit
Loading
Failed to load commit list.
Azure Pipelines / MSSQL-Python-PR-Validation cancelled May 15, 2026 in 38m 30s

Build #pr-validation-pipeline had test failures

Details

Tests

  • Failed: 18 (0.07%)
  • Passed: 24,987 (96.58%)
  • Other: 867 (3.35%)
  • Total: 25,872
Code coverage

  • 7082 of 27202 line covered (26.03%)

Annotations

Check failure on line 15 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

Build log #L15

Bash exited with code '1'.

Check failure on line 94 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

Build log #L94

Bash exited with code '1'.

Check failure on line 171 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

Build log #L171

The Operation will be canceled. The next steps may not contain expected logs.

Check failure on line 172 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

Build log #L172

The operation was canceled.

Check failure on line 1 in test_foreignkeys_specific_table

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

test_foreignkeys_specific_table

Failed: Test setup failed: Driver Error: Syntax error or access violation; DDBC Error: [Microsoft][SQL Server]The specified schema name "pytest_fk_schema" either does not exist or you do not have permission to use it.
Raw output
cursor = <mssql_python.cursor.Cursor object at 0x00000222CEC9D250>
db_connection = <mssql_python.connection.Connection object at 0x00000222CE8B11D0>

    def test_foreignkeys_setup(cursor, db_connection):
        """Create tables with foreign key relationships for testing"""
        try:
            # Create a test schema for isolation
            cursor.execute(
                "IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'pytest_fk_schema') EXEC('CREATE SCHEMA pytest_fk_schema')"
            )
    
            # Drop tables if they exist (in reverse order to avoid constraint conflicts)
            cursor.execute("DROP TABLE IF EXISTS pytest_fk_schema.orders")
            cursor.execute("DROP TABLE IF EXISTS pytest_fk_schema.customers")
    
            # Create parent table
>           cursor.execute("""
            CREATE TABLE pytest_fk_schema.customers (
                customer_id INT PRIMARY KEY,
                customer_name VARCHAR(100) NOT NULL
            )
            """)

tests\test_004_cursor.py:10739: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mssql_python\cursor.py:1512: in execute
    check_error(ddbc_sql_const.SQL_HANDLE_STMT.value, self.hstmt, ret)
mssql_python\helpers.py:38: in check_error
    raise_exception(error_info.sqlState, error_info.ddbcErrorMsg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

sqlstate = '42000'
ddbc_error = '[Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The specified schema name "pytest_fk_schema" either does not exist or you do not have permission to use it.'

    def raise_exception(sqlstate: str, ddbc_error: str) -> None:
        """
        Raise a custom exception based on the given SQLSTATE code.
        This function raises a custom exception based on the provided SQLSTATE code.
        If the code is not found in the mapping, a generic DatabaseError is raised.
    
        Args:
            sqlstate (str): The SQLSTATE code to map to a custom exception.
            ddbc_error (str): The DDBC error message.
    
        Raises:
            DatabaseError: If the SQLSTATE code is not found in the mapping.
        """
        exception_class = sqlstate_to_exception(sqlstate, ddbc_error)
        if exception_class:
            logger.error(f"Raising exception: {exception_class}")
>           raise exception_class
E           mssql_python.exceptions.ProgrammingError: Driver Error: Syntax error or access violation; DDBC Error: [Microsoft][SQL Server]The specified schema name "pytest_fk_schema" either does not exist or you do not have permission to use it.

mssql_python\exceptions.py:563: ProgrammingError

During handling of the above exception, another exception occurred:

cursor = <mssql_python.cursor.Cursor object at 0x00000222CEC9D250>
db_connection = <mssql_python.connection.Connection object at 0x00000222CE8B11D0>

    def test_foreignkeys_specific_table(cursor, db_connection):
        """Test getting foreign keys for a specific table"""
        try:
            # First set up our test tables
>           test_foreignkeys_setup(cursor, db_connection)

tests\test_004_cursor.py:10808: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cursor = <mssql_python.cursor.Cursor object at 0x00000222CEC9D250>
db_connection = <mssql_python.connection.Connection object at 0x00000222CE8B11D0>

    def test_foreignkeys_setup(cursor, db_connection):
        """Create tables with foreign key relationships for testing"""
        try:
            # Create a test schema for isolation
            cursor.execute(
                "IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'pytest_fk_schema') EXEC('CREATE SCHEMA pytest_fk_schema')"
            )
    
            # Drop tables if they exist (in reverse 
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_columns_specific_table

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

test_columns_specific_table

AssertionError: Should find exactly 9 columns in columns_test
assert 0 == 9
 +  where 0 = len([])
Raw output
cursor = <mssql_python.cursor.Cursor object at 0x00000222CEC9D250>
db_connection = <mssql_python.connection.Connection object at 0x00000222CE8B11D0>

    def test_columns_specific_table(cursor, db_connection):
        """Test columns returns information about a specific table"""
        try:
            # Get columns for the test table
            cols = cursor.columns(table="columns_test", schema="pytest_cols_schema").fetchall()
    
            # Verify we got results
>           assert len(cols) == 9, "Should find exactly 9 columns in columns_test"
E           AssertionError: Should find exactly 9 columns in columns_test
E           assert 0 == 9
E            +  where 0 = len([])

tests\test_004_cursor.py:12207: AssertionError

Check failure on line 1 in test_columns_special_chars

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

test_columns_special_chars

AssertionError: Should find exactly 9 columns in columns_special_test
assert 0 == 9
 +  where 0 = len([])
Raw output
cursor = <mssql_python.cursor.Cursor object at 0x00000222CEC9D250>
db_connection = <mssql_python.connection.Connection object at 0x00000222CE8B11D0>

    def test_columns_special_chars(cursor, db_connection):
        """Test columns with special characters and edge cases"""
        try:
            # Get columns for the special table
            cols = cursor.columns(table="columns_special_test", schema="pytest_cols_schema").fetchall()
    
            # Verify we got results
>           assert len(cols) == 9, "Should find exactly 9 columns in columns_special_test"
E           AssertionError: Should find exactly 9 columns in columns_special_test
E           assert 0 == 9
E            +  where 0 = len([])

tests\test_004_cursor.py:12254: AssertionError

Check failure on line 1 in test_columns_specific_column

See this annotation in the file changed.

@azure-pipelines azure-pipelines / MSSQL-Python-PR-Validation

test_columns_specific_column

AssertionError: Should find exactly 1 column named 'name'
assert 0 == 1
 +  where 0 = len([])
Raw output
cursor = <mssql_python.cursor.Cursor object at 0x00000222CEC9D250>
db_connection = <mssql_python.connection.Connection object at 0x00000222CE8B11D0>

    def test_columns_specific_column(cursor, db_connection):
        """Test columns with specific column filter"""
        try:
            # Get specific column
            cols = cursor.columns(
                table="columns_test", schema="pytest_cols_schema", column="name"
            ).fetchall()
    
            # Verify we got just one result
>           assert len(cols) == 1, "Should find exactly 1 column named 'name'"
E           AssertionError: Should find exactly 1 column named 'name'
E           assert 0 == 1
E            +  where 0 = len([])

tests\test_004_cursor.py:12299: AssertionError