Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: merging development to main #120

Merged
merged 36 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
730b808
ci: workflow to push video worker to docker hub
aatmanvaidya Feb 28, 2024
07b609c
Merge pull request #96 from aatmanvaidya/worker-ci
duggalsu Feb 28, 2024
594fc6c
ci: workflow to push video worker to docker hub
aatmanvaidya Feb 28, 2024
579b7ea
Merge pull request #98 from tattle-made/hotfix
dennyabrain Feb 28, 2024
79659eb
Merge pull request #99 from dennyabrain/local-hotfix
duggalsu Feb 28, 2024
d0826b8
ci: workflow dockerfile location change
aatmanvaidya Feb 28, 2024
b7d9ab2
Merge pull request #101 from aatmanvaidya/vid-ci-4
duggalsu Feb 28, 2024
3f41df9
Merge pull request #103 from tattle-made/hotfix
dennyabrain Feb 28, 2024
c857181
Add github PR testing workflow
duggalsu Feb 28, 2024
026e92f
- Disabled image vec operator in config-server.yml
duggalsu Feb 28, 2024
282e7f6
- Added nose to requirements
duggalsu Feb 28, 2024
469d95e
- Skipped search and index api tests
duggalsu Feb 28, 2024
cd37c9d
- Modified pr workflow to use test.env
duggalsu Feb 28, 2024
cd953a4
- Enabled failing tests for testing PR workflow
duggalsu Feb 28, 2024
ceea228
- Added log outputs and failure condition
duggalsu Feb 28, 2024
d7e2aa4
- Disabled failure check
duggalsu Feb 28, 2024
7f2022e
- Added sut output and failure condition
duggalsu Feb 28, 2024
87ba7bb
- Skipped index api tests
duggalsu Feb 28, 2024
4e3d04e
- Added echo output
duggalsu Feb 28, 2024
6c22a62
- Modified failure condition
duggalsu Feb 28, 2024
e7df52c
- Enabled failing tests
duggalsu Feb 28, 2024
b7ace62
- Disabled failing tests
duggalsu Feb 28, 2024
cda6bbb
Merge pull request #104 from duggalsu/github_workflow_pr
dennyabrain Feb 29, 2024
4ae4219
Merge pull request #105 from tattle-made/hotfix
duggalsu Feb 29, 2024
eec380a
ci: audio worker staging github workflow
aatmanvaidya Mar 2, 2024
9e11c03
Merge pull request #110 from aatmanvaidya/audio-worker-github-workflow
duggalsu Mar 4, 2024
9de3594
Merge pull request #113 from tattle-made/hotfix
duggalsu Mar 4, 2024
a79620d
ci: audiovec worker staging dockerhub tag change
aatmanvaidya Mar 4, 2024
972b6a6
ci: Add automated semantic versioning
duggalsu Mar 4, 2024
4a12794
Merge pull request #117 from duggalsu/github_workflow_merge_dev
dennyabrain Mar 4, 2024
6cdeb25
Merge pull request #118 from tattle-made/hotfix
dennyabrain Mar 4, 2024
71c43c8
Merge pull request #116 from aatmanvaidya/audio-worker-ci-tag-change
duggalsu Mar 4, 2024
aa0d296
Merge pull request #119 from tattle-made/hotfix
duggalsu Mar 4, 2024
cea4e0e
0.1.0
invalid-email-address Mar 4, 2024
5959f74
refactor: merging development to main
aatmanvaidya Mar 5, 2024
bf7dede
test: fixing video es vec
aatmanvaidya Mar 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .ci/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
services:
sut:
build:
context: ./../src
dockerfile: Dockerfile.test
target: test
env_file: ./../src/test.env
command: bash -c "python -c 'import time';
while ! curl store:9200 | grep -q 'You Know, for Search'
&& ! curl queue:15672 | grep -q '<!DOCTYPE html>';
do python -c 'time.sleep(10)';
done;
nose2 tests"
links:
- store
- queue
depends_on:
store:
condition: service_started
queue:
condition: service_started

store:
container_name: es
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
volumes:
- ./.docker/es/data:/var/lib/elasticsearch/data
# ports:
# - "9300:9300"
# - "9200:9200"
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- http.cors.enabled=true
- http.cors.allow-origin=http://localhost:1358,http://127.0.0.1:1358
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials=true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK

queue:
image: rabbitmq:3.12.12-management
container_name: rabbitmq
hostname: rabbit
volumes:
- ./.docker/rabbitmq/data:/var/lib/rabbitmq
- ./.docker/rabbitmq/logs:/var/log/rabbitmq
environment:
RABBITMQ_ERLANG_COOKIE: "secret-cookie"
RABBITMQ_DEFAULT_USER: "admin"
RABBITMQ_DEFAULT_PASS: "Admin123"
# ports:
# - "5672:5672"
# - "15672:15672"
33 changes: 33 additions & 0 deletions .github/workflows/docker-push-audiovec-worker-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Audio Worker to Dockerhub for Staging

on: workflow_dispatch

jobs:
api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: development
- name: "Setup Node version"
uses: actions/setup-node@v4
with:
node-version: 20.9.0
- name: Declare some variables
id: vars
shell: bash
run: |
echo "setting variables"
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-audiovec
workdir: src/
dockerfile: worker/audiovec/Dockerfile.audio_worker
tags: worker-amd64-latest
platforms: linux/amd64
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ jobs:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/benchmark/vidvec/
dockerfile: Dockerfile.vid_vec_rep_resnet
tags: ${{ steps.vars.outputs.sha_short }}-amd64
workdir: src/
dockerfile: benchmark/vidvec/Dockerfile.vid_vec_rep_resnet
tags: benchmark-amd64-latest
platforms: linux/amd64
- uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/benchmark/vidvec/
dockerfile: Dockerfile.vid_vec_rep_resnet.graviton
tags: ${{ steps.vars.outputs.sha_short }}-arm64
workdir: src/
dockerfile: benchmark/vidvec/Dockerfile.vid_vec_rep_resnet.graviton
tags: benchmark-arm64-latest
platforms: linux/arm64

# - name: deploy to cluster
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-push-vidvec-worker-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/worker/vidvec/
dockerfile: Dockerfile.test_video_worker
tags: latest-amd64
workdir: src/
dockerfile: worker/vidvec/Dockerfile.video_worker
tags: worker-amd64-latest
platforms: linux/amd64
77 changes: 77 additions & 0 deletions .github/workflows/merge-dev-hotfix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Merge PR to development or hotfix

on:
pull_request:
types:
- closed
branches:
- development
- hotfix

jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
environment:
name: staging

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Declare some variables
id: vars
shell: bash
run: |
echo "setting variables"
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
echo "version=latest" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Publish vidvec amd64 benchmark to dockerhub
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/
dockerfile: benchmark/vidvec/Dockerfile.vid_vec_rep_resnet
tags: benchmark-amd64-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.version }}
platforms: linux/amd64

- name: Publish vidvec arm64 benchmark to dockerhub
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/
dockerfile: benchmark/vidvec/Dockerfile.vid_vec_rep_resnet.graviton
tags: benchmark-arm64-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.version }}
platforms: linux/arm64

# - name: Publish vidvec amd64 worker to dockerhub
# uses: elgohr/Publish-Docker-Github-Action@main
# with:
# username: tattletech
# password: ${{ secrets.DOCKER_PASSWORD }}
# name: tattletech/feluda-operator-vidvec
# workdir: src/
# dockerfile: worker/vidvec/Dockerfile.video_worker
# tags: worker-amd64-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.version }}
# platforms: linux/amd64

# - name: deploy to cluster
# uses: steebchen/[email protected]
# with: # defaults to latest kubectl binary version
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
# command: set image --record deployment/feluda-server feluda-server=tattletech/feluda-server:${{ steps.vars.outputs.sha_short }}
# - name: verify deployment
# uses: steebchen/[email protected]
# with:
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
# version: v1.21.0 # specify kubectl binary version explicitly
# command: rollout status deployment/feluda-server
98 changes: 98 additions & 0 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Merge PR to main

on:
pull_request:
types:
- closed
branches:
- main

jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
concurrency: release
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python version
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Dry Run to get next release version
id: next_version
run: |
pip install python-semantic-release
export NEXT_TAG_VERSION=$(semantic-release --noop version --print)
echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT

- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

# - name: Declare some variables
# id: vars
# shell: bash
# run: |
# echo "setting variables"
# echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Publish vidvec amd64 benchmark to dockerhub
if: steps.release.outcome == 'success'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/
dockerfile: benchmark/vidvec/Dockerfile.vid_vec_rep_resnet
tags: benchmark-amd64-${{ steps.next_version.outputs.new_tag_version }}
platforms: linux/amd64

- name: Publish vidvec arm64 benchmark to dockerhub
if: steps.release.outcome == 'success'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/
dockerfile: benchmark/vidvec/Dockerfile.vid_vec_rep_resnet.graviton
tags: benchmark-arm64-${{ steps.next_version.outputs.new_tag_version }}
platforms: linux/arm64

# - name: Publish vidvec amd64 worker to dockerhub
# if: steps.release.outcome == 'success'
# uses: elgohr/Publish-Docker-Github-Action@main
# with:
# username: tattletech
# password: ${{ secrets.DOCKER_PASSWORD }}
# name: tattletech/feluda-operator-vidvec
# workdir: src/
# dockerfile: worker/vidvec/Dockerfile.video_worker
# tags: worker-amd64-${{ steps.next_version.outputs.new_tag_version }}
# platforms: linux/amd64

# - name: deploy to cluster
# uses: steebchen/[email protected]
# with: # defaults to latest kubectl binary version
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
# command: set image --record deployment/feluda-server feluda-server=tattletech/feluda-server:${{ steps.vars.outputs.sha_short }}
# - name: verify deployment
# uses: steebchen/[email protected]
# with:
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
# version: v1.21.0 # specify kubectl binary version explicitly
# command: rollout status deployment/feluda-server
38 changes: 38 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run tests on PR

on:
pull_request:
branches:
- development
- hotfix
types:
- opened
- synchronize
- reopened
- ready_for_review

jobs:
test:
if: github.event.pull_request.draft == false
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build container for tests
run: docker compose -f ./.ci/docker-compose.yml -p ci build

- name: Launch containers to run tests
id: vars
run: |
docker compose -f ./.ci/docker-compose.yml -p ci up -d store queue sut
docker logs -f ci-sut-1
echo "sut_output=$(docker wait ci-sut-1)" >> $GITHUB_OUTPUT

- name: Check failure
run: |
if [ ${{ steps.vars.outputs.sut_output }} != 0 ]; then
echo ${{ steps.vars.outputs.sut_output }}
exit 1
fi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ celerybeat-schedule
.env
.env.local
*.env
!test.env

# virtualenv
.venv/
Expand Down Expand Up @@ -120,6 +121,7 @@ credentials.json
.DS_Store

# Docker logs
.ci/.docker/*
.docker/*
# src/core/operators/sample_data/
# sample_data/**
Expand Down
Loading
Loading