Skip to content

Fix pre-existing CI failures: ty typecheck and openai cross-version tests#454

Open
fanzeyi wants to merge 1 commit into
databricks:mainfrom
fanzeyi:fix/ci-pre-existing-failures
Open

Fix pre-existing CI failures: ty typecheck and openai cross-version tests#454
fanzeyi wants to merge 1 commit into
databricks:mainfrom
fanzeyi:fix/ci-pre-existing-failures

Conversation

@fanzeyi

@fanzeyi fanzeyi commented Jul 16, 2026

Copy link
Copy Markdown
Member

Two pre-existing CI failures on main:

  1. typechecking for integrations/langchain (ty check): test_multi_server_mcp_client.py line 54 accessed .seconds on a union of float|timedelta. Add isinstance check to narrow the type so ty recognizes the timedelta attribute access.

  2. openai cross-version tests (v0.3.0, v0.4.0, v0.5.0): The mock_vs_client fixture patches databricks.ai_search.client .VectorSearchClient but older integrations import via the deprecated databricks.vector_search.client.VectorSearchClient shim. mock.patch only replaces the attribute on the specific module, so the old import path was not mocked and the real VectorSearchClient tried to authenticate. Now the fixture also patches the old path when the shim module is installed.

Both fixes are backward compatible.

…ests

Two pre-existing CI failures on main:

1. typechecking for integrations/langchain (ty check):
   test_multi_server_mcp_client.py line 54 accessed .seconds on
   a union of float|timedelta. Add isinstance check to narrow the
   type so ty recognizes the timedelta attribute access.

2. openai cross-version tests (v0.3.0, v0.4.0, v0.5.0):
   The mock_vs_client fixture patches databricks.ai_search.client
   .VectorSearchClient but older integrations import via the
   deprecated databricks.vector_search.client.VectorSearchClient
   shim. mock.patch only replaces the attribute on the specific
   module, so the old import path was not mocked and the real
   VectorSearchClient tried to authenticate. Now the fixture also
   patches the old path when the shim module is installed.

Both fixes are backward compatible.
@fanzeyi
fanzeyi force-pushed the fix/ci-pre-existing-failures branch from f24db7c to db93449 Compare July 16, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants