chore: align Lance revision for strict FTS prewarm

This commit is contained in:
Jack Ye
2026-11-29 18:38:40 -08:00
committed by GitHub
parent 9e3af3625d
commit 9a79107651
6 changed files with 76 additions and 60 deletions
+16 -8
View File
@@ -24,8 +24,16 @@ BUCKET_WITHOUT_DOTS = "s3://my-bucket/path"
def assert_not_rejected_for_bucket_dots(connect):
try:
connect()
except ValueError as err:
assert "contains dots" not in str(err)
except (ValueError, RuntimeError) as err:
assert_not_bucket_dots_error(err)
def assert_not_bucket_dots_error(err):
message = str(err)
assert "contains dots" not in message
if isinstance(err, RuntimeError):
assert "Generic S3 error:" in message
assert "Failed to resolve region for bucket" in message
class TestS3BucketWithDotsSync:
@@ -66,20 +74,20 @@ class TestS3BucketWithDotsAsync:
uri, opts = BUCKET_WITH_DOTS_AND_REGION
try:
await lancedb.connect_async(uri, storage_options=opts)
except ValueError as err:
assert "contains dots" not in str(err)
except (ValueError, RuntimeError) as err:
assert_not_bucket_dots_error(err)
@pytest.mark.asyncio
async def test_bucket_with_dots_and_aws_region_is_not_rejected(self):
uri, opts = BUCKET_WITH_DOTS_AND_AWS_REGION
try:
await lancedb.connect_async(uri, storage_options=opts)
except ValueError as err:
assert "contains dots" not in str(err)
except (ValueError, RuntimeError) as err:
assert_not_bucket_dots_error(err)
@pytest.mark.asyncio
async def test_bucket_without_dots_is_not_rejected(self):
try:
await lancedb.connect_async(BUCKET_WITHOUT_DOTS)
except ValueError as err:
assert "contains dots" not in str(err)
except (ValueError, RuntimeError) as err:
assert_not_bucket_dots_error(err)