From 8983370f8fbc8dabd4139590713847294f7ede05 Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 9 Sep 2024 14:00:01 +1000 Subject: [PATCH] add master workflow for cloud integration tests --- .github/workflows/cloud-integration-tests.yml | 8 ++-- .../master-cloud-integration-tests.yml | 39 +++++++++++++++++++ tests/cloud_test_logic/cloud_test_index.py | 2 +- 3 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/master-cloud-integration-tests.yml diff --git a/.github/workflows/cloud-integration-tests.yml b/.github/workflows/cloud-integration-tests.yml index 0012d95e..7e321946 100644 --- a/.github/workflows/cloud-integration-tests.yml +++ b/.github/workflows/cloud-integration-tests.yml @@ -25,10 +25,6 @@ on: description: 'Number of replicas to use for the cloud tests. Default is 0.' required: false default: 0 - pull_request: - branches: - - mainline - - 'releases/*' # allows other workflows to reuse these unit tests: workflow_call: @@ -66,7 +62,9 @@ jobs: MARQO_API_KEY: ${{ secrets.STAGING_CLOUD_MARQO_API_KEY }} MARQO_NUMBER_OF_SHARDS: ${{ github.event.inputs.number_of_shards }} MARQO_NUMBER_OF_REPLICAS: ${{ github.event.inputs.number_of_replicas }} - run: tox -e cloud_tests -- create-indexes=True use-unique-identifier=True delete-indexes=True + run: | + echo "Running with NUMBER_OF_SHARDS=${{ github.event.inputs.number_of_shards }} and NUMBER_OF_REPLICAS=${{ github.event.inputs.number_of_replicas }}" + tox -e cloud_tests -- create-indexes=True use-unique-identifier=True delete-indexes=True cleanup_indexes: name: Cleanup cloud indexes diff --git a/.github/workflows/master-cloud-integration-tests.yml b/.github/workflows/master-cloud-integration-tests.yml new file mode 100644 index 00000000..a9b0500c --- /dev/null +++ b/.github/workflows/master-cloud-integration-tests.yml @@ -0,0 +1,39 @@ +# This workflow kicks off cloud integration tests on pull request review +# from a person that has write access to the repo. +# It will then spin up indexes, run tox tests, and delete the indexes. +# There is also manual trigger to the workflow in which user can specify +# which job to run. Either delete_all_indexes or run_integration_tests. +# Keep in mind that delete_all_indexes will delete ALL indexes in the +# integration tests account that starts with the prefix "test_index". + +name: Cloud Integration Tests + +on: + workflow_dispatch: + pull_request: + branches: + - mainline + - 'releases/*' + # allows other workflows to reuse these unit tests: + workflow_call: + +permissions: + contents: read + +jobs: + run-0-replica-1-shard-test: + name: Cloud Integration Tests - 0 Replica, 1 Shard + uses: ./.github/workflows/cloud-integration-tests.yml + secrets: inherit + with: + NUMBER_OF_REPLICAS: 0 + NUMBER_OF_SHARDS: 1 + + run-1-replica-2-shard-test: + name: Cloud Integration Tests - 1 Replica, 2 Shards + uses: ./.github/workflows/cloud-integration-tests.yml + secrets: inherit + with: + NUMBER_OF_REPLICAS: 1 + NUMBER_OF_SHARDS: 2 + diff --git a/tests/cloud_test_logic/cloud_test_index.py b/tests/cloud_test_logic/cloud_test_index.py index 2166978c..72a5de95 100644 --- a/tests/cloud_test_logic/cloud_test_index.py +++ b/tests/cloud_test_logic/cloud_test_index.py @@ -69,7 +69,7 @@ def get_env_var_as_int(var_name): "treatUrlsAndPointersAsImages": True, "model": "open_clip/ViT-B-32/laion2b_s34b_b79k", - "inferenceType": "marqo.GPU", + "inferenceType": "marqo.CPU.small", "storageClass": "marqo.performance", "numberOfReplicas": NUMBER_OF_REPLICAS, "numberOfShards": NUMBER_OF_SHARDS,