Skip to content

Commit 1d23af2

Browse files
authored
feat: expose storage options in LanceDB (lancedb#1204)
Exposes `storage_options` in LanceDB. This is provided for Python async, Node `lancedb`, and Node `vectordb` (and Rust of course). Python synchronous is omitted because it's not compatible with the PyArrow filesystems we use there currently. In the future, we will move the sync API to wrap the async one, and then it will get support for `storage_options`. 1. Fixes lancedb#1168 2. Closes lancedb#1165 3. Closes lancedb#1082 4. Closes lancedb#439 5. Closes lancedb#897 6. Closes lancedb#642 7. Closes lancedb#281 8. Closes lancedb#114 9. Closes lancedb#990 10. Deprecating `awsCredentials` and `awsRegion`. Users are encouraged to use `storageOptions` instead.
1 parent 25dea4e commit 1d23af2

31 files changed

+4025
-1159
lines changed

.github/workflows/node.yml

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107
AWS_ENDPOINT: http://localhost:4566
108108
# this one is for dynamodb
109109
DYNAMODB_ENDPOINT: http://localhost:4566
110+
ALLOW_HTTP: true
110111
steps:
111112
- uses: actions/checkout@v4
112113
with:

.github/workflows/nodejs.yml

+5
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ jobs:
8585
run: |
8686
npm ci
8787
npm run build
88+
- name: Setup localstack
89+
working-directory: .
90+
run: docker compose up --detach --wait
8891
- name: Test
92+
env:
93+
S3_TEST: "1"
8994
run: npm run test
9095
macos:
9196
timeout-minutes: 30

.github/workflows/python.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ jobs:
9999
workspaces: python
100100
- uses: ./.github/workflows/build_linux_wheel
101101
- uses: ./.github/workflows/run_tests
102+
with:
103+
integration: true
102104
# Make sure wheels are not included in the Rust cache
103105
- name: Delete wheels
104106
run: rm -rf target/wheels
@@ -190,4 +192,4 @@ jobs:
190192
pip install -e .[tests]
191193
pip install tantivy
192194
- name: Run tests
193-
run: pytest -m "not slow" -x -v --durations=30 python/tests
195+
run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/tests

.github/workflows/run_tests/action.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,27 @@ inputs:
55
python-minor-version:
66
required: true
77
description: "8 9 10 11 12"
8+
integration:
9+
required: false
10+
description: "Run integration tests"
11+
default: "false"
812
runs:
913
using: "composite"
1014
steps:
1115
- name: Install lancedb
1216
shell: bash
1317
run: |
1418
pip3 install $(ls target/wheels/lancedb-*.whl)[tests,dev]
15-
- name: pytest
19+
- name: Setup localstack for integration tests
20+
if: ${{ inputs.integration == 'true' }}
1621
shell: bash
22+
working-directory: .
23+
run: docker compose up --detach --wait
24+
- name: pytest (with integration)
25+
shell: bash
26+
if: ${{ inputs.integration == 'true' }}
1727
run: pytest -m "not slow" -x -v --durations=30 python/python/tests
28+
- name: pytest (no integration tests)
29+
shell: bash
30+
if: ${{ inputs.integration != 'true' }}
31+
run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/python/tests

.github/workflows/rust.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ jobs:
7676
sudo apt install -y protobuf-compiler libssl-dev
7777
- name: Build
7878
run: cargo build --all-features
79+
- name: Start S3 integration test environment
80+
working-directory: .
81+
run: docker compose up --detach --wait
7982
- name: Run tests
8083
run: cargo test --all-features
8184
- name: Run examples
@@ -105,7 +108,8 @@ jobs:
105108
- name: Build
106109
run: cargo build --all-features
107110
- name: Run tests
108-
run: cargo test --all-features
111+
# Run with everything except the integration tests.
112+
run: cargo test --features remote,fp16kernels
109113
windows:
110114
runs-on: windows-2022
111115
steps:

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ keywords = ["lancedb", "lance", "database", "vector", "search"]
1414
categories = ["database-implementations"]
1515

1616
[workspace.dependencies]
17-
lance = { "version" = "=0.10.9", "features" = ["dynamodb"] }
18-
lance-index = { "version" = "=0.10.9" }
19-
lance-linalg = { "version" = "=0.10.9" }
20-
lance-testing = { "version" = "=0.10.9" }
17+
lance = { "version" = "=0.10.10", "features" = ["dynamodb"] }
18+
lance-index = { "version" = "=0.10.10" }
19+
lance-linalg = { "version" = "=0.10.10" }
20+
lance-testing = { "version" = "=0.10.10" }
2121
# Note that this one does not include pyarrow
2222
arrow = { version = "50.0", optional = false }
2323
arrow-array = "50.0"

docker-compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
version: "3.9"
22
services:
33
localstack:
4-
image: localstack/localstack:0.14
4+
image: localstack/localstack:3.3
55
ports:
66
- 4566:4566
77
environment:
8-
- SERVICES=s3,dynamodb
8+
- SERVICES=s3,dynamodb,kms
99
- DEBUG=1
1010
- LS_LOG=trace
1111
- DOCKER_HOST=unix:///var/run/docker.sock
1212
- AWS_ACCESS_KEY_ID=ACCESSKEY
1313
- AWS_SECRET_ACCESS_KEY=SECRETKEY
1414
healthcheck:
15-
test: [ "CMD", "curl", "-f", "http://localhost:4566/health" ]
15+
test: [ "CMD", "curl", "-s", "http://localhost:4566/_localstack/health" ]
1616
interval: 5s
1717
retries: 3
1818
start_period: 10s

0 commit comments

Comments
 (0)