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

feature: attempt of caching with s3 #1268

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
68 changes: 34 additions & 34 deletions .github/workflows/chat-tests.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: chat test suite

on:
pull_request:
paths:
- 'chat/**'
- '.github/workflows/**'
jobs:
build-test:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v2
- name: Setting up
run: sed -i 's/chat\///' ./chat/.eslintrc.json
- name: Install dependencies
run: yarn --cwd chat
- name: Running lint
run: yarn --cwd chat build
eslint:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v2
- name: Setting up
run: sed -i 's/chat\///' ./chat/.eslintrc.json
- name: Install dependencies
run: yarn --cwd chat
- name: Running lint
run: yarn --cwd chat lint:CI
- name: Annotate Code Linting Results
uses: ataylorme/[email protected]
if: always()
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
report-json: './chat/eslint_report.json'
# name: chat test suite
#
# on:
# pull_request:
# paths:
# - 'chat/**'
# - '.github/workflows/**'
# jobs:
# build-test:
# runs-on: blacksmith-2vcpu-ubuntu-2204
# steps:
# - uses: actions/checkout@v2
# - name: Setting up
# run: sed -i 's/chat\///' ./chat/.eslintrc.json
# - name: Install dependencies
# run: yarn --cwd chat
# - name: Running lint
# run: yarn --cwd chat build
# eslint:
# runs-on: blacksmith-2vcpu-ubuntu-2204
# steps:
# - uses: actions/checkout@v2
# - name: Setting up
# run: sed -i 's/chat\///' ./chat/.eslintrc.json
# - name: Install dependencies
# run: yarn --cwd chat
# - name: Running lint
# run: yarn --cwd chat lint:CI
# - name: Annotate Code Linting Results
# uses: ataylorme/[email protected]
# if: always()
# with:
# repo-token: '${{ secrets.GITHUB_TOKEN }}'
# report-json: './chat/eslint_report.json'
110 changes: 58 additions & 52 deletions .github/workflows/push-server.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
# name: Create Docker Images
# on:
# workflow_call:
# secrets:
# DOCKER_USERNAME:
# required: true
# DOCKER_PASSWORD:
# required: true
# workflow_dispatch:
# push:
# branches:
# - 'main'
#
# jobs:
# build_server:
# name: Building Server Docker Image
# steps:
# - name: Checkout the repo
# uses: actions/checkout@v4
#
# - name: Setup buildx
# uses: docker/setup-buildx-action@v3
#
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# # list of Docker images to use as base name for tags
# images: |
# arguflow/search
# tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=pr
# type=sha
#
# - name: Build and push Docker image
# uses: docker/build-push-action@v5
# with:
# cache-from: type=gha
# cache-to: type=gha,mode=max
# context: server/
# file: ./server/Dockerfile.no-ocr
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
name: Create Docker Images
on:
pull_request:
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
workflow_dispatch:

jobs:
build_server:
name: Building Server Docker Image
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout the repo
uses: actions/checkout@v4

- name: Setup buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
arguflow/search
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=sha

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
cache-from: type=s3,region=us-east-2,bucket=docker-caching,access_key_id=${secrets.AWS_ACCESS_KEY_ID},secret_access_key=${secrets.AWS_SECRET_ACCESS_KEY}
cache-to: type=s3,region=us-east-2,bucket=docker-caching,mode=max,access_key_id=${secrets.AWS_ACCESS_KEY_ID},secret_access_key=${secrets.AWS_SECRET_ACCESS_KEY}
context: server/
file: ./server/Dockerfile.no-ocr
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
156 changes: 78 additions & 78 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
name: rust test suite

on:
pull_request:
paths:
- 'server/**'
- '.github/workflows/**'

jobs:
clippy_check_ingestion:
runs-on: blacksmith-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v1
- name: Caching Rust Dep
uses: useblacksmith/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup component add clippy
- uses: clechasseur/rs-clippy-check@v3
with:
args: --features runtime-env --bin ingestion-microservice --manifest-path server/Cargo.toml
- uses: useblacksmith/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.labels }}-rust-${{ matrix.rust }}-
clippy_check:
runs-on: blacksmith-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v1
- name: Caching Rust Dep
uses: useblacksmith/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup component add clippy
- uses: clechasseur/rs-clippy-check@v3
with:
args: --features runtime-env --manifest-path server/Cargo.toml
- uses: useblacksmith/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.labels }}-rust-${{ matrix.rust }}-
redoc:
runs-on: blacksmith-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v2
- name: Caching Rust Dep
uses: useblacksmith/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Installing Vaccum
run: npm install -g @quobix/vacuum
- name: Generating OpenAPI spec
run: cargo run --features runtime-env --manifest-path server/Cargo.toml --bin redoc_ci > openapi.json
- name: Vaccum lint
run: vacuum lint openapi.json -r '.github/workflows/rules.yaml' -d

# name: rust test suite
#
# on:
# pull_request:
# paths:
# - 'server/**'
# - '.github/workflows/**'
#
# jobs:
# clippy_check_ingestion:
# runs-on: blacksmith-8vcpu-ubuntu-2204
# steps:
# - uses: actions/checkout@v1
# - name: Caching Rust Dep
# uses: useblacksmith/cache@v5
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - run: rustup component add clippy
# - uses: clechasseur/rs-clippy-check@v3
# with:
# args: --features runtime-env --bin ingestion-microservice --manifest-path server/Cargo.toml
# - uses: useblacksmith/cache@v5
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: |
# ${{ runner.labels }}-rust-${{ matrix.rust }}-
# clippy_check:
# runs-on: blacksmith-8vcpu-ubuntu-2204
# steps:
# - uses: actions/checkout@v1
# - name: Caching Rust Dep
# uses: useblacksmith/cache@v5
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - run: rustup component add clippy
# - uses: clechasseur/rs-clippy-check@v3
# with:
# args: --features runtime-env --manifest-path server/Cargo.toml
# - uses: useblacksmith/cache@v5
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: |
# ${{ runner.labels }}-rust-${{ matrix.rust }}-
# redoc:
# runs-on: blacksmith-8vcpu-ubuntu-2204
# steps:
# - uses: actions/checkout@v2
# - name: Caching Rust Dep
# uses: useblacksmith/cache@v5
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - name: Installing Vaccum
# run: npm install -g @quobix/vacuum
# - name: Generating OpenAPI spec
# run: cargo run --features runtime-env --manifest-path server/Cargo.toml --bin redoc_ci > openapi.json
# - name: Vaccum lint
# run: vacuum lint openapi.json -r '.github/workflows/rules.yaml' -d
#
Loading
Loading