Skip to content

Fix telemetry cleanup bug #423

Fix telemetry cleanup bug

Fix telemetry cleanup bug #423

Workflow file for this run

name: cuda_dind_os_CI
# runs GPU-enabled Integration Tests on DIND OS on AMD64 machine
on:
workflow_call:
workflow_dispatch:
inputs:
image_to_test:
required: false
default: marqo_docker_0
description: >
This is optional. If left as the default value "marqo_docker_0", the docker image built from this branch is tested.
Otherwise, the specified docker image is tested. For example "marqoai/marqo:test"
push:
branches:
- 'releases/1.5.x'
- 'releases/1.4.x'
paths-ignore:
- '**.md'
pull_request:
branches:
- 'releases/1.5.x'
- 'releases/1.4.x'
paths-ignore:
- '**.md'
permissions:
contents: read
jobs:
Start-Runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
with:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
# CUDA AMD64 instance
ec2-image-id: ${{ secrets.CUDA_EC2_IMAGE_ID }}
ec2-instance-type: g4dn.xlarge
subnet-id: ${{ secrets.CUDA_SUBNET_ID }}
security-group-id: ${{ secrets.CUDA_SECURITY_GROUP_ID }}
Test-Marqo:
name: Run CUDA Docker-in-Docker API Tests
needs: Start-Runner # required to start the main job when the runner is ready
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
environment: marqo-test-suite
steps:
- name: Checkout marqo repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: "pip"
- name: Install Dependencies
run: |
#pip install -r requirements.txt
pip install tox==3.26
pip install flake8
# TODO: linting here
- name: Checkout marqo-api-tests repo
uses: actions/checkout@v3
with:
repository: marqo-ai/marqo-api-tests
ref: 1.4.x
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Environment
run: |
# Set up conf file
echo 'export MARQO_API_TESTS_ROOT="${{ github.workspace }}"' >> $GITHUB_ENV
export MQ_API_TEST_BRANCH=$(echo "${GITHUB_REF}" | cut -d'/' -f3-)
echo "MQ_API_TEST_BRANCH=$MQ_API_TEST_BRANCH" >> $GITHUB_ENV
CUSTOM_TEST_IMG="${{ github.event.inputs.image_to_test }}"
export MQ_API_TEST_IMG=${CUSTOM_TEST_IMG:-"marqo_docker_0"}
echo "MQ_API_TEST_IMG=$MQ_API_TEST_IMG" >> $GITHUB_ENV
export MQ_PY_MARQO_BRANCH=git+https://github.com/marqo-ai/py-marqo.git
echo "MQ_PY_MARQO_BRANCH=$MQ_PY_MARQO_BRANCH" >> $GITHUB_ENV
echo "Marqo Branch: $MQ_API_TEST_BRANCH"
echo "API Test branch: 1.4.x"
echo "Py-marqo branch: 1.4.x"
- name: Run CUDA Integration Tests - dind_os
run: |
tox -e py3-cuda_dind_os
Stop-Runner:
name: Stop self-hosted EC2 runner
needs:
- Start-Runner # required to get output from the start-runner job
- Test-Marqo # required to wait when the main job is done
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}