From d4502add446d5ad1a92717b80d9dd0a41ee47a04 Mon Sep 17 00:00:00 2001 From: Weston Pace Date: Thu, 7 Mar 2024 12:00:04 -0800 Subject: [PATCH] Remove remote integration workflow (#1076) --- .github/workflows/remote-integration.yml | 37 ------------- rust/lancedb/tests/lancedb_cloud.rs | 67 ------------------------ 2 files changed, 104 deletions(-) delete mode 100644 .github/workflows/remote-integration.yml delete mode 100644 rust/lancedb/tests/lancedb_cloud.rs diff --git a/.github/workflows/remote-integration.yml b/.github/workflows/remote-integration.yml deleted file mode 100644 index 68862ebf..00000000 --- a/.github/workflows/remote-integration.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: LanceDb Cloud Integration Test - -on: - workflow_run: - workflows: [Rust] - types: - - completed - -env: - LANCEDB_PROJECT: ${{ secrets.LANCEDB_PROJECT }} - LANCEDB_API_KEY: ${{ secrets.LANCEDB_API_KEY }} - LANCEDB_REGION: ${{ secrets.LANCEDB_REGION }} - -jobs: - test: - timeout-minutes: 30 - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash - working-directory: rust - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - lfs: true - - uses: Swatinem/rust-cache@v2 - with: - workspaces: rust - - name: Install dependencies - run: | - sudo apt update - sudo apt install -y protobuf-compiler libssl-dev - - name: Build - run: cargo build --all-features - - name: Run Integration test - run: cargo test --tests -- --ignored diff --git a/rust/lancedb/tests/lancedb_cloud.rs b/rust/lancedb/tests/lancedb_cloud.rs deleted file mode 100644 index 84bd7158..00000000 --- a/rust/lancedb/tests/lancedb_cloud.rs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use std::sync::Arc; - -use arrow_array::RecordBatchIterator; - -#[tokio::test] -#[ignore] -async fn cloud_integration_test() { - let project = std::env::var("LANCEDB_PROJECT") - .expect("the LANCEDB_PROJECT env must be set to run the cloud integration test"); - let api_key = std::env::var("LANCEDB_API_KEY") - .expect("the LANCEDB_API_KEY env must be set to run the cloud integration test"); - let region = std::env::var("LANCEDB_REGION") - .expect("the LANCEDB_REGION env must be set to run the cloud integration test"); - let host_override = std::env::var("LANCEDB_HOST_OVERRIDE") - .map(Some) - .unwrap_or(None); - if host_override.is_none() { - println!("No LANCEDB_HOST_OVERRIDE has been set. Running integration test against LanceDb Cloud production instance"); - } - - let mut builder = lancedb::connect(&format!("db://{}", project)) - .api_key(&api_key) - .region(®ion); - if let Some(host_override) = &host_override { - builder = builder.host_override(host_override); - } - let db = builder.execute().await.unwrap(); - - let schema = Arc::new(arrow_schema::Schema::new(vec![ - arrow_schema::Field::new("id", arrow_schema::DataType::Int64, false), - arrow_schema::Field::new("name", arrow_schema::DataType::Utf8, false), - ])); - let initial_data = arrow::record_batch::RecordBatch::try_new( - schema.clone(), - vec![ - Arc::new(arrow_array::Int64Array::from(vec![1, 2, 3])), - Arc::new(arrow_array::StringArray::from(vec!["a", "b", "c"])), - ], - ); - let rbr = RecordBatchIterator::new(vec![initial_data], schema); - - let name = uuid::Uuid::new_v4().to_string(); - let tbl = db - .create_table(name.clone(), Box::new(rbr)) - .execute() - .await - .unwrap(); - - assert_eq!(tbl.name(), name); - - let table_names = db.table_names().execute().await.unwrap(); - assert!(table_names.contains(&name)); -}