Skip to content

Commit

Permalink
Remove aws sdk and set up minio in-place
Browse files Browse the repository at this point in the history
  • Loading branch information
blaginin committed Jan 9, 2025
1 parent 17e8486 commit 7d4050d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 394 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,25 @@ jobs:
rustup default stable
- name: Setup Minio - S3-compatible storage
working-directory: datafusion-cli
run:
echo "MINIO_CONTAINER=$(docker run -d -p 9000:9000 -e MINIO_ROOT_USER=TEST-DataFusionLogin -e MINIO_ROOT_PASSWORD=TEST-DataFusionPassword quay.io/minio/minio server /data)" >> $GITHUB_ENV
run: |
docker run -d --name minio-container \
-p 9000:9000 \
-e MINIO_ROOT_USER=TEST-DataFusionLogin -e MINIO_ROOT_PASSWORD=TEST-DataFusionPassword \
-v $(pwd)/../datafusion/core/tests/data:/source quay.io/minio/minio \
server /data
docker exec minio-container /bin/sh -c "\
mc ready local
mc alias set localminio http://localhost:9000 TEST-DataFusionLogin TEST-DataFusionPassword && \
mc mb localminio/data && \
mc cp -r /source/* localminio/data"
- name: Run tests (excluding doctests, but with integration tests)
working-directory: datafusion-cli
run: cargo test --profile ci --lib --tests --bins --all-features
- name: Verify Working Directory Clean
run: git diff --exit-code
- name: Minio Output
if: ${{ !cancelled() }}
run: docker logs $MINIO_CONTAINER
run: docker logs minio-container

linux-test-example:
name: cargo examples (amd64)
Expand Down
23 changes: 17 additions & 6 deletions datafusion-cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,26 @@ then provide the necessary configuration for that object store.

To test the S3 integration against [Minio](https://github.com/minio/minio)

First start up a container with Minio
First start up a container with Minio and load test files.

```
$ docker run -d -p 9000:9000 -e MINIO_ROOT_USER=TEST-DataFusionLogin -e MINIO_ROOT_PASSWORD=TEST-DataFusionPassword quay.io/minio/minio server /data
```shell
docker run -d \
--name datafusion-test-minio \
-p 9000:9000 \
-e MINIO_ROOT_USER=TEST-DataFusionLogin \
-e MINIO_ROOT_PASSWORD=TEST-DataFusionPassword \
-v $(pwd)/../datafusion/core/tests/data:/source \
quay.io/minio/minio server /data

docker exec datafusion-test-minio /bin/sh -c "\
mc alias set localminio http://localhost:9000 TEST-DataFusionLogin TEST-DataFusionPassword && \
mc mb localminio/data && \
mc cp -r /source/* localminio/data"
```

Setup environment

```
```shell
export TEST_STORAGE_INTEGRATION=1
export AWS_ACCESS_KEY_ID=TEST-DataFusionLogin
export AWS_SECRET_ACCESS_KEY=TEST-DataFusionPassword
Expand All @@ -67,6 +78,6 @@ Note that `AWS_ENDPOINT` is set without slash at the end.

Run tests

```
$ cargo test
```shell
cargo test
```
Loading

0 comments on commit 7d4050d

Please sign in to comment.