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
1 change: 1 addition & 0 deletions .github/workflows/manual-docker-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
# timeout: '10m0s'

- name: Cleanup
if: always()
Expand Down
3 changes: 2 additions & 1 deletion app-backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git
WORKDIR /home/user/GenAIComps
RUN pip install --no-cache-dir --upgrade pip==24.3.1 setuptools==78.1.1 && \
pip install --no-cache-dir -r /home/user/GenAIComps/requirements.txt && \
pip install --no-cache-dir --upgrade mcp==1.10.0 pillow==11.3.0
pip install --no-cache-dir --upgrade mcp==1.23.0 pillow==11.3.0 \
langchain-core==0.3.80 urllib3==2.6.0 starlette==0.49.1

COPY ./templates/microservices/* /home/user/templates/microservices/
COPY ./megaservice.py /home/user/megaservice.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ spec:
storageClassName: local-path
resources:
requests:
storage: 1Gi
storage: 30Gi
---
apiVersion: v1
kind: Service
Expand Down
4 changes: 4 additions & 0 deletions studio-backend/app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from app.compat import ensure_urllib3_getheaders

# Ensure urllib3 2.x exposes HTTPResponse.getheaders for kubernetes client compatibility.
ensure_urllib3_getheaders()
22 changes: 22 additions & 0 deletions studio-backend/app/compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Compatibility shims for third-party libraries.

Currently used to keep kubernetes-python working with urllib3 2.x, which
removed HTTPResponse.getheaders(). Older kubernetes versions still call
getheaders when building ApiException objects. This shim reintroduces a
minimal getheaders that mirrors the previous behavior.
"""
from urllib3.response import HTTPResponse


def ensure_urllib3_getheaders() -> None:
"""Add HTTPResponse.getheaders if urllib3 2.x removed it.

Returns the header items as a list of (key, value) tuples, matching the
old http.client.HTTPResponse API used by kubernetes-python.
"""
if not hasattr(HTTPResponse, "getheaders"):
def _getheaders(self): # type: ignore[override]
return list(self.headers.items())

HTTPResponse.getheaders = _getheaders # type: ignore[attr-defined]
6 changes: 6 additions & 0 deletions studio-backend/app/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

from app.compat import ensure_urllib3_getheaders

# Restore HTTPResponse.getheaders expected by kubernetes-python when running with urllib3 2.x.
ensure_urllib3_getheaders()

from kubernetes import config

# Load the kubeconfig file
Expand Down
5 changes: 3 additions & 2 deletions studio-backend/app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
fastapi==0.115.4
fastapi==0.121.0
uvicorn==0.30.6
kubernetes==30.1.0
requests==2.32.3
urllib3==2.6.0
pydantic==1.10.18
starlette==0.41.2
starlette==0.49.1
websockets==10.3
clickhouse-driver==0.2.9
paramiko==3.5.1
2 changes: 2 additions & 0 deletions studio-backend/app/routers/sandbox_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ async def deploy_sandbox(request: PipelineFlow):
try:
response = deploy_manifest_in_namespace(core_v1_api, apps_v1_api, json.loads(workflow_info.export_to_json()))
except Exception as e:
import traceback
traceback.print_exc()
raise HTTPException(status_code=500, detail=str(e))

return response
Expand Down
5 changes: 3 additions & 2 deletions studio-backend/tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pytest==8.3.3
fastapi==0.115.0
fastapi==0.121.0
httpx==0.27.2
kubernetes==30.1.0
pydantic==1.10.18
pydantic==1.10.18
urllib3==2.6.0
68 changes: 47 additions & 21 deletions studio-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:20-alpine
# Build stage
FROM node:20-alpine AS builder

# Accept proxy build arguments
ARG http_proxy
Expand All @@ -10,37 +11,62 @@ ENV http_proxy=${http_proxy}
ENV https_proxy=${https_proxy}
ENV no_proxy=${no_proxy}

# Install necessary packages
# Install build dependencies
RUN apk update && apk upgrade && \
apk add --no-cache gcompat python3 make g++ git \
# Needed for pdfjs-dist
build-base cairo-dev pango-dev \
# Install Chromium
chromium && \
# Install PNPM globally
build-base cairo-dev pango-dev && \
npm install -g pnpm@9

# Debug step to verify git installation
RUN git --version
ENV NODE_OPTIONS=--max-old-space-size=8192

WORKDIR /usr/src

# Copy package files first for better layer caching
COPY package.json pnpm-workspace.yaml turbo.json ./
COPY packages/server/package.json ./packages/server/
COPY packages/ui/package.json ./packages/ui/

# Install dependencies
RUN pnpm install

# Copy source code
COPY . .

# Build the app and clean up
RUN pnpm build && \
# Prune to production dependencies only
pnpm prune --prod && \
rm -rf node_modules/.cache && \
rm -rf packages/*/node_modules/.cache

# Production stage
FROM node:20-alpine

# Accept proxy build arguments
ARG http_proxy
ARG https_proxy
ARG no_proxy

ENV http_proxy=${http_proxy}
ENV https_proxy=${https_proxy}
ENV no_proxy=${no_proxy}

# Install only runtime dependencies with patched npm
RUN apk update && apk upgrade && \
apk add --no-cache gcompat chromium && \
npm install -g npm@latest pnpm@latest && \
rm -rf /var/cache/apk/*

ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV NODE_OPTIONS=--max-old-space-size=8192

WORKDIR /usr/src

# Copy app source
COPY . .

# Install dependencies and build the app
RUN pnpm config set store-dir .pnpm-store && \
pnpm install && \
pnpm update [email protected] && \
pnpm build && \
pnpm remove esbuild && \
rm -rf .pnpm-store && \
rm -rf /root/.local/share/pnpm && \
pnpm prune --prod
# Copy only necessary files from builder
COPY --from=builder /usr/src/package.json /usr/src/pnpm-workspace.yaml ./
COPY --from=builder /usr/src/packages ./packages
COPY --from=builder /usr/src/node_modules ./node_modules

EXPOSE 3000

Expand Down
60 changes: 36 additions & 24 deletions studio-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"name": "flowise",
"version": "2.1.4",
"version": "3.0.10",
"private": true,
"homepage": "https://flowiseai.com",
"workspaces": [
"packages/*",
"flowise",
"ui"
"packages/*"
],
"scripts": {
"build": "turbo run build",
"build-force": "pnpm clean && turbo run build --force",
"dev": "turbo run dev --parallel",
"dev": "turbo run dev --parallel --no-cache",
"start": "run-script-os",
"start:windows": "cd packages/server/bin && run start",
"start:default": "cd packages/server/bin && ./run start",
Expand All @@ -32,7 +30,6 @@
"@babel/preset-typescript": "7.18.6",
"@types/express": "^4.17.13",
"@typescript-eslint/typescript-estree": "^7.13.1",
"esbuild": ">=0.25.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^7.0.1",
Expand All @@ -42,14 +39,17 @@
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unused-imports": "^2.0.0",
"cross-spawn": "^7.0.6",
"glob": "^10.5.0",
"tar-fs": "^3.1.1",
"husky": "^8.0.1",
"kill-port": "^2.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"turbo": "latest",
"turbo": "^2.3.3",
"typescript": "^5.4.5"
},
"pnpm": {
Expand All @@ -58,8 +58,30 @@
"sqlite3"
],
"overrides": {
"set-value": "^3.0.3",
"form-data": "4.0.4"
"@modelcontextprotocol/sdk": ">=1.24.0",
"axios": "1.12.0",
"body-parser": "2.0.2",
"braces": "3.0.3",
"cross-spawn": "7.0.6",
"esbuild": "0.27.1",
"form-data": "4.0.4",
"glob": "10.5.0",
"glob-parent": "6.0.2",
"http-proxy-middleware": "3.0.3",
"json5": "2.2.3",
"nth-check": "2.1.1",
"path-to-regexp": "0.1.12",
"prismjs": "1.29.0",
"rollup": "4.45.0",
"semver": "7.7.1",
"set-value": "4.1.0",
"solid-js": "1.9.7",
"tar-fs": ">=3.1.1",
"unset-value": "2.0.1",
"webpack-dev-middleware": "7.4.2",
"ws": "8.18.3",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
"zod": "^3.25.0"
},
"peerDependencyRules": {
"ignoreMissing": [],
Expand All @@ -71,22 +93,12 @@
"pnpm": ">=9"
},
"resolutions": {
"@google/generative-ai": "^0.24.0",
"@grpc/grpc-js": "^1.10.10",
"@langchain/core": "0.3.61",
"@qdrant/openapi-typescript-fetch": "1.2.6",
"@google/generative-ai": "^0.15.0",
"openai": "4.57.3",
"@langchain/core": "0.2.18",
"axios": "1.8.2",
"nth-check": "2.0.1",
"pdfjs-dist": "4.2.67",
"prismjs": "1.27.0",
"semver": "7.5.2",
"ws": "8.17.1",
"esbuild": ">=0.25.0",
"cross-spawn": ">=7.0.5",
"solid-js": ">=1.9.4",
"tar-fs": ">=3.0.8",
"form-data": "4.0.4",
"zod": ">=3.23.0"
"openai": "4.96.0",
"protobufjs": "7.4.0"
},
"eslintIgnore": [
"**/dist",
Expand Down
Loading