Skip to content
Merged
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
65 changes: 0 additions & 65 deletions .github/workflows/ci-servers.yml

This file was deleted.

141 changes: 141 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: ci

on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
ci-check-server:
name: ci-check-server
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: "3.11"

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('server/requirements.lock') }}
restore-keys: |
${{ runner.os }}-pip-

Comment on lines +25 to +32
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update Cache Action Version for Python Dependencies
The step uses actions/cache@v3 to cache pip dependencies. Static analysis suggests that v3 is now outdated. Consider updating to a newer version (e.g. v4) to benefit from the latest fixes and performance improvements.

-        uses: actions/cache@v3
+        uses: actions/cache@v4
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('server/requirements.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('server/requirements.lock') }}
restore-keys: |
${{ runner.os }}-pip-
🧰 Tools
🪛 actionlint (1.7.4)

26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

- name: Install dependencies
run: pip install -r echo/server/requirements.lock

- name: Run mypy
uses: tsuyoshicho/action-mypy@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
workdir: echo/server

- name: Run ruff
uses: chartboost/ruff-action@v1
with:
src: echo/server

ci-check-frontend:
name: ci-check-frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./echo/frontend/
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22"

Comment on lines +59 to +63
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update Node.js Setup Action Version
The Node.js setup step currently uses actions/setup-node@v3. Static analysis indicates this runner is too old. An upgrade to a newer version (e.g. v4, if available) is recommended.

-        uses: actions/setup-node@v3
+        uses: actions/setup-node@v4
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
- name: Set up Node.js
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: "22"
🧰 Tools
🪛 actionlint (1.7.4)

60-60: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

Comment on lines +75 to +82
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Refresh PNPM Cache Action Version
Similarly, the cache step for pnpm store is also using actions/cache@v3. Please update to a newer version to avoid potential runtime issues.

-        uses: actions/cache@v3
+        uses: actions/cache@v4
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
🧰 Tools
🪛 actionlint (1.7.4)

75-75: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint and build
run: pnpm run build

ci-build-and-push-servers:
name: ci-build-servers
needs: [ci-check-server, ci-check-frontend]
runs-on: ubuntu-latest
strategy:
matrix:
image:
# Directus
- name: dbr-echo-directus
context: ./echo/directus
dockerfile: Dockerfile
tag: dbr-echo-directus
build_args: ""
# Shared image for server and worker
- name: dbr-echo-server
context: ./echo/server
dockerfile: Dockerfile
tag: dbr-echo-server
build_args: ""

steps:
- name: Checkout Code
uses: actions/checkout@v3

Comment on lines +110 to +112
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Upgrade Checkout Action in Build-and-Push Job
The checkout step in the "ci-build-and-push-servers" job is using actions/checkout@v3, which is flagged as outdated. Upgrade this to a newer version (e.g. v4) to ensure up-to-date functionality.

-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout Code
uses: actions/checkout@v3
- name: Checkout Code
uses: actions/checkout@v4
🧰 Tools
🪛 actionlint (1.7.4)

111-111: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.35.1)

[error] 112-112: trailing spaces

(trailing-spaces)

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
# This enables the creation of a builder instance with persistent cache
driver-opts: |
image=moby/buildkit:latest
network=host

Comment on lines +113 to +120
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Refresh Docker Buildx Setup Action Version & Clean Trailing Spaces
The action docker/setup-buildx-action@v2 is now considered too old. Update to the latest version (e.g. v3) and remove any trailing spaces (notably flagged on line 120) to adhere to YAML style guidelines.

-        uses: docker/setup-buildx-action@v2
+        uses: docker/setup-buildx-action@v3

Update Docker Buildx Action to v3 & Remove Trailing Spaces

Hey, fellow engineer—this CI workflow is still rocking the old docker/setup-buildx-action@v2. To keep our pipeline as sharp as our code, update it to v3 and clean up the trailing spaces (note the one flagged on line 120). Here’s the diff reminder:

-        uses: docker/setup-buildx-action@v2
+        uses: docker/setup-buildx-action@v3
  • Update the action version in .github/workflows/ci.yml.
  • Remove trailing whitespace on line 120.

Cheers and LGTM!

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
# This enables the creation of a builder instance with persistent cache
driver-opts: |
image=moby/buildkit:latest
network=host
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
with:
# This enables the creation of a builder instance with persistent cache
driver-opts: |
image=moby/buildkit:latest
network=host
🧰 Tools
🪛 actionlint (1.7.4)

114-114: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.35.1)

[error] 120-120: trailing spaces

(trailing-spaces)

- name: Log in to DigitalOcean Container Registry
uses: docker/login-action@v2
with:
registry: registry.digitalocean.com
username: ${{ secrets.DO_REGISTRY_USERNAME }}
password: ${{ secrets.DO_REGISTRY_TOKEN }}

Comment on lines +121 to +127
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Upgrade Docker Login Action and Clean Formatting
The login step uses docker/login-action@v2, which is outdated. Please update it to a newer version (e.g. v3). Also note that static analysis detected trailing spaces (line 127); cleaning up the formatting is advised.

-        uses: docker/login-action@v2
+        uses: docker/login-action@v3

Action Required: Upgrade Docker Login Action and Tidy Trailing Whitespace

Please update the CI workflow step in .github/workflows/ci.yml as follows:

  • Change the Docker login action from docker/login-action@v2 to docker/login-action@v3
  • Remove the trailing spaces at line 127 to clean up the formatting
-        uses: docker/login-action@v2
+        uses: docker/login-action@v3

LGTM—but these fixes are needed to keep your CI config cutting edge and squeaky clean.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Log in to DigitalOcean Container Registry
uses: docker/login-action@v2
with:
registry: registry.digitalocean.com
username: ${{ secrets.DO_REGISTRY_USERNAME }}
password: ${{ secrets.DO_REGISTRY_TOKEN }}
- name: Log in to DigitalOcean Container Registry
uses: docker/login-action@v3
with:
registry: registry.digitalocean.com
username: ${{ secrets.DO_REGISTRY_USERNAME }}
password: ${{ secrets.DO_REGISTRY_TOKEN }}
🧰 Tools
🪛 actionlint (1.7.4)

122-122: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.35.1)

[error] 127-127: trailing spaces

(trailing-spaces)

- name: Build (also push sometimes) ${{ matrix.image.name }}
uses: docker/build-push-action@v3
with:
context: ${{ matrix.image.context }}
file: ${{ matrix.image.context }}/${{ matrix.image.dockerfile }}
# Only push if the event is a push event to main.
push: ${{ github.event_name == 'push' }}
tags: registry.digitalocean.com/dbr-cr/${{ matrix.image.tag }}:${{ github.sha }}
build-args: ${{ matrix.image.build_args }}
# Enhanced cache settings
cache-from: |
type=gha,scope=${{ matrix.image.name }}
type=registry,ref=registry.digitalocean.com/dbr-cr/${{ matrix.image.tag }}:latest
cache-to: type=gha,scope=${{ matrix.image.name }},mode=max
Comment on lines +128 to +141
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Update Docker Build-Push Action Version
The build and push step employs docker/build-push-action@v3, which is flagged as outdated. Consider upgrading to a more recent version (e.g. v4) to leverage the latest improvements.

-        uses: docker/build-push-action@v3
+        uses: docker/build-push-action@v4

Action Required: Upgrade Docker Build-Push Action to v4
Hey, rockstar engineer—great work so far! A quick heads-up: we're still pulling in docker/build-push-action@v3 in our CI, and it's time to level up. Upgrading to v4 will ensure we leverage the latest performance improvements and bug fixes. Please update the step in .github/workflows/ci.yml as follows:

  • Location: .github/workflows/ci.yml (lines 128–141)
  • Diff snippet:
    -        uses: docker/build-push-action@v3
    +        uses: docker/build-push-action@v4

Thanks for staying ahead of the curve!

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Build (also push sometimes) ${{ matrix.image.name }}
uses: docker/build-push-action@v3
with:
context: ${{ matrix.image.context }}
file: ${{ matrix.image.context }}/${{ matrix.image.dockerfile }}
# Only push if the event is a push event to main.
push: ${{ github.event_name == 'push' }}
tags: registry.digitalocean.com/dbr-cr/${{ matrix.image.tag }}:${{ github.sha }}
build-args: ${{ matrix.image.build_args }}
# Enhanced cache settings
cache-from: |
type=gha,scope=${{ matrix.image.name }}
type=registry,ref=registry.digitalocean.com/dbr-cr/${{ matrix.image.tag }}:latest
cache-to: type=gha,scope=${{ matrix.image.name }},mode=max
- name: Build (also push sometimes) ${{ matrix.image.name }}
uses: docker/build-push-action@v4
with:
context: ${{ matrix.image.context }}
file: ${{ matrix.image.context }}/${{ matrix.image.dockerfile }}
# Only push if the event is a push event to main.
push: ${{ github.event_name == 'push' }}
tags: registry.digitalocean.com/dbr-cr/${{ matrix.image.tag }}:${{ github.sha }}
build-args: ${{ matrix.image.build_args }}
# Enhanced cache settings
cache-from: |
type=gha,scope=${{ matrix.image.name }}
type=registry,ref=registry.digitalocean.com/dbr-cr/${{ matrix.image.tag }}:latest
cache-to: type=gha,scope=${{ matrix.image.name }},mode=max
🧰 Tools
🪛 actionlint (1.7.4)

129-129: the runner of "docker/build-push-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.35.1)

[error] 141-141: no new line character at the end of file

(new-line-at-end-of-file)

4 changes: 2 additions & 2 deletions .github/workflows/dev-deploy-vercel-dashboard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: dev-deploy-dashboard-vercel
name: dev-deploy-vercel-dashboard
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DASHBOARD }}
Expand All @@ -8,7 +8,7 @@ on:
- main

jobs:
dev-deploy-dashboard-vercel:
dev-deploy-vercel-dashboard:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/prod-deploy-vercel-dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: dev-deploy-vercel-dashboard
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DASHBOARD }}
on:
push:
branches:
- main

jobs:
dev-deploy-vercel-dashboard:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 10
run_install: true
cwd: echo/frontend

- name: Install Vercel CLI
run: pnpm add --global vercel@latest
working-directory: echo/frontend

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=staging --token=${{ secrets.VERCEL_TOKEN }}
working-directory: echo/frontend

- name: Build Project Artifacts
run: vercel build --target=staging --token=${{ secrets.VERCEL_TOKEN }}
working-directory: echo/frontend

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --target=staging --token=${{ secrets.VERCEL_TOKEN }}
working-directory: echo/frontend
43 changes: 43 additions & 0 deletions .github/workflows/prod-deploy-vercel-portal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: dev-deploy-vercel-portal
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_PORTAL }}
on:
push:
branches:
- main

jobs:
dev-deploy-vercel-portal:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 10
run_install: true
cwd: echo/frontend

- name: Install Vercel CLI
run: pnpm add --global vercel@latest
working-directory: echo/frontend

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=staging --token=${{ secrets.VERCEL_TOKEN }}
working-directory: echo/frontend

- name: Build Project Artifacts
run: vercel build --target=staging --token=${{ secrets.VERCEL_TOKEN }}
working-directory: echo/frontend

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --target=staging --token=${{ secrets.VERCEL_TOKEN }}
working-directory: echo/frontend
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ Thanks to everyone in the community that has contributed to this project!

<a href="https://github.com/dembrane/echo/graphs/contributors">
<img src="https://contrib.rocks/image?repo=dembrane/echo" />
</a>
</a>

![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/Dembrane/echo?utm_source=oss&utm_medium=github&utm_campaign=Dembrane%2Fecho&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)
2 changes: 2 additions & 0 deletions echo/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Dembrane ECHO

![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/Dembrane/echo?utm_source=oss&utm_medium=github&utm_campaign=Dembrane%2Fecho&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)

## Architecture

Data Storage:
Expand Down
4 changes: 1 addition & 3 deletions echo/server/dembrane/api/participant.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from typing import List, Optional, Annotated
from logging import getLogger
from datetime import datetime
Expand All @@ -7,10 +6,9 @@
from pydantic import BaseModel
from sqlalchemy.orm import joinedload

from dembrane.s3 import save_to_s3_from_file_like
from dembrane.tasks import task_finish_conversation_hook, task_process_conversation_chunk
from dembrane.utils import generate_uuid
from dembrane.config import AUDIO_CHUNKS_DIR
from dembrane.s3 import save_to_s3_from_file_like
from dembrane.schemas import (
ProjectTagSchema,
ConversationChunkSchema,
Expand Down