Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e50dc7d
consolidate tracer infra into tracing namespace
Apr 7, 2025
bf0e954
update e2e workflow and base port in studio be
Apr 7, 2025
4bbefc3
migrate to use internal mysql in k8
Apr 8, 2025
41a462e
update cleanup on e2e workflow
wanhakim Apr 9, 2025
6ada379
Test failed due to wrong button clicked
cheehook Apr 9, 2025
52a0b2d
move strategy out from additional parameter
cheehook Apr 9, 2025
49faab4
put initials in avatar and prevent blank page if keycloak fail
cheehook Apr 9, 2025
39c0447
update mui icon version
cheehook Apr 9, 2025
1330e10
increase default max output token
cheehook Apr 9, 2025
3ce1620
get uploaded file without waiting interval
cheehook Apr 9, 2025
ef924b9
uncomment login test and screenshot for application UI
cheehook Apr 10, 2025
fe1ec51
added video recording to catch test failure
cheehook Apr 10, 2025
86d77f6
increase timeout as default maxtoken increased.
cheehook Apr 10, 2025
b0ced94
get buttons coorsinate to confirm button id
cheehook Apr 10, 2025
78e2684
fix local registry playbook
wanhakim Apr 14, 2025
8360968
enable deployment package generation for agentqn
Apr 14, 2025
caefb62
Update setup-scripts/setup-genai-studio/studio-config.yaml
wanhakim Apr 15, 2025
1859080
Update setup-scripts/setup-genai-studio/readme.md
wanhakim Apr 15, 2025
6925fe3
add tracing namespace cleanup in e2e CI
wanhakim Apr 15, 2025
708623e
add local path installation on deploy mysqldb and tracing for fresh m…
wanhakim Apr 15, 2025
d2508c3
fix e2e workflow issue
wanhakim Apr 15, 2025
cf30370
update monitoring manifest to avoid clash with local node_exporter se…
Apr 16, 2025
afc7007
Fix vulnerabilities found by trivy scan
chinyixiang Apr 16, 2025
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
29 changes: 18 additions & 11 deletions .github/workflows/_e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,10 @@ jobs:

- name: Deploy GenAI Studio
run: |
if kubectl get namespace studio; then
kubectl delete -f manifests/studio-manifest.yaml || true
kubectl wait --for=delete pod --all --namespace=studio --timeout=300s
fi
if kubectl get namespace monitoring; then
kubectl delete -f manifests/monitoring-manifest.yaml || true
kubectl wait --for=delete pod --all --namespace=monitoring --timeout=300s
fi
sleep 5

sudo apt install ansible -y
sed -i 's/value: ${TAG}/value: latest/' manifests/studio-manifest.yaml
ansible-playbook genai-studio.yml -e "container_registry=${OPEA_IMAGE_REPO}opea" -e "container_tag=${{ inputs.tag }}" -e "mysql_host=$(hostname -I | awk '{print $1}')"
sed -i 's/value: "${TAG}"/value: latest/' manifests/studio-manifest.yaml
ansible-playbook genai-studio.yml -e "container_registry=${OPEA_IMAGE_REPO}opea" -e "container_tag=${{ inputs.tag }}" -e "mysql_host=mysql.mysql.svc.cluster.local"
sleep 5
kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=300s --field-selector=status.phase!=Succeeded
kubectl wait --for=condition=ready pod --all --namespace=monitoring --timeout=300s --field-selector=status.phase!=Succeeded
Expand Down Expand Up @@ -92,7 +84,22 @@ jobs:
- name: Cleanup sandbox namespaces
if: always()
run: |
if kubectl get namespace mysql; then
kubectl delete ns mysql || true
fi
if kubectl get namespace tracing; then
kubectl delete ns tracing || true
fi
for ns in $(kubectl get namespaces -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n' | grep '^sandbox-'); do
kubectl delete namespace $ns || true
done
if kubectl get namespace studio; then
kubectl delete -f manifests/studio-manifest.yaml || true
kubectl wait --for=delete pod --all --namespace=studio --timeout=300s
fi
if kubectl get namespace monitoring; then
kubectl delete -f manifests/monitoring-manifest.yaml || true
kubectl wait --for=delete pod --all --namespace=monitoring --timeout=300s
fi
working-directory: ${{ github.workspace }}/setup-scripts/setup-genai-studio/

7 changes: 1 addition & 6 deletions app-backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@ RUN pip install --no-cache-dir --upgrade pip==24.3.1 setuptools==75.3.0 && \
COPY ./templates/microservices/* /home/user/templates/microservices/
COPY ./megaservice.py /home/user/megaservice.py
COPY ./orchestrator.py /home/user/GenAIComps/comps/cores/mega/orchestrator.py
COPY ./opea_telemetry.py /home/user/GenAIComps/comps/cores/telemetry/opea_telemetry.py
COPY config/* /home/user/config/

ENV PYTHONPATH=/home/user/GenAIComps
ENV TELEMETRY_ENDPOINT="http://my-otel-collector-opentelemetry-collector.opentelemetry.svc.cluster.local:4318/v1/traces"
# ENV embedding_tei_langchain_0_port=9007 \
# llm_tgi_0_port=9008 \
# prepare_doc_redis_prep_0_port=9009 \
# reranking_tei_0_port=9010 \
# retriever_redis_0_port=9011

USER user

Expand Down
196 changes: 0 additions & 196 deletions app-backend/micro_service.py

This file was deleted.

14 changes: 12 additions & 2 deletions app-backend/opea_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@

logger = CustomLogger("OpeaComponent")

def get_k8s_namespace():
try:
with open("/var/run/secrets/kubernetes.io/serviceaccount/namespace", "r") as f:
return f.read().strip()
except Exception:
return "unknown-namespace"


def detach_ignore_err(self, token: object) -> None:
"""Resets Context to a previous value.
Expand All @@ -34,7 +41,11 @@ def detach_ignore_err(self, token: object) -> None:
# bypass the ValueError that ContextVar context was created in a different Context from StreamingResponse
ContextVarsRuntimeContext.detach = detach_ignore_err

resource = Resource.create({SERVICE_NAME: "opea"})
namespace_name = get_k8s_namespace()
resource = Resource.create({
SERVICE_NAME: "opea",
"k8s.namespace.name": namespace_name
})
traceProvider = TracerProvider(resource=resource)

ENABLE_OPEA_TELEMETRY = False
Expand All @@ -51,7 +62,6 @@ def detach_ignore_err(self, token: object) -> None:

tracer = trace.get_tracer(__name__)


def opea_telemetry(func):
if inspect.iscoroutinefunction(func):

Expand Down
7 changes: 4 additions & 3 deletions app-frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
# SPDX-License-Identifier: Apache-2.0

# Use node 20.11.1 as the base image
FROM node:20.11.1 AS vite-app
FROM node:latest AS vite-app

COPY react /usr/app/react
WORKDIR /usr/app/react

RUN npm install --legacy-peer-deps && npm run build

FROM nginx:alpine
FROM nginx:1.27.4-alpine-slim

# Install uuidgen in the nginx:alpine image
RUN apk add --no-cache util-linux
RUN apk add --no-cache util-linux \
&& apk upgrade --no-cache

COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html
COPY ./react/env.sh /docker-entrypoint.d/env.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Conversation = ({ title, enabledUiFeatures }: ConversationProps) => {
const selectedConversation = conversations.find(x => x.conversationId === selectedConversationId);
const scrollViewport = useRef<HTMLDivElement>(null);

const [tokenLimit, setTokenLimit] = useState<number>(50);
const [tokenLimit, setTokenLimit] = useState<number>(200);
const [temperature, setTemperature] = useState<number>(0.30);

const [messageTokenData, setMessageTokenData] = useState<{ [key: string]: { tokens: number; rate: number; time: number } }>({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default function DataSource({ opened, onClose }: Props) {

useEffect(() => {
let isFetching = false; // Flag to track if the function is in progress

getFileList();
const interval = setInterval(async () => {
if (!isFetching) {
isFetching = true;
Expand Down
Loading