Skip to content

Commit 1bac1fb

Browse files
authored
Merge branch 'main' into fix_upgradeSaaSLibraryPy
2 parents 0e8571c + 08b68ed commit 1bac1fb

119 files changed

Lines changed: 7088 additions & 1488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,35 @@ MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=
163163
AWS_ACCESS_KEY_ID=
164164
AWS_SECRET_ACCESS_KEY=
165165

166+
# --- Azure Blob Storage connector (Enterprise/SaaS) ------------------------
167+
# Enterprise/SaaS-only bucket connector, gated by IBM_AUTH_ENABLED (like the
168+
# AWS S3 / IBM COS connectors). Credentials are normally entered per-connection
169+
# in the UI; these env vars are OPTIONAL fallbacks / defaults for the config
170+
# dialog. Two auth modes are supported: a connection string, OR account name +
171+
# key (+ optional custom blob endpoint).
172+
#
173+
# Local dev / Azurite testing: set OPENRAG_DEV_AZURE_BLOB=true to enable the
174+
# connector without IBM_AUTH_ENABLED. NEVER use in production.
175+
# OPENRAG_DEV_AZURE_BLOB=false
176+
#
177+
# Connection-string mode (covers real Azure accounts and the Azurite emulator):
178+
# - Real account: copy from Azure Portal -> Storage account -> Access keys
179+
# - Azurite (local dev): AZURE_STORAGE_CONNECTION_STRING="UseDevelopmentStorage=true"
180+
# AZURE_STORAGE_CONNECTION_STRING=
181+
#
182+
# Account-key mode (set account name + key; endpoint optional):
183+
# - Azurite (host-side backend):
184+
# - AZURE_STORAGE_ACCOUNT_NAME=devstoreaccount1
185+
# - AZURE_STORAGE_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
186+
# - AZURE_STORAGE_ENDPOINT=http://127.0.0.1:10000/devstoreaccount1
187+
# - Azurite (in-compose backend):
188+
# - AZURE_STORAGE_ACCOUNT_NAME=devstoreaccount1
189+
# - AZURE_STORAGE_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
190+
# - AZURE_STORAGE_ENDPOINT=http://azurite:10000/devstoreaccount1
191+
# AZURE_STORAGE_ACCOUNT_NAME=
192+
# AZURE_STORAGE_ACCOUNT_KEY=
193+
# AZURE_STORAGE_ENDPOINT=
194+
166195
# OPTIONAL: dns routable from google (etc.) to handle continous ingest (something like ngrok works). This enables continous ingestion
167196
WEBHOOK_BASE_URL=
168197

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@v6
33+
uses: actions/checkout@v4
3434

3535
# Initializes the CodeQL tools for scanning.
3636
- name: Initialize CodeQL

.github/workflows/lint-frontend.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,33 @@ jobs:
4848
- name: TypeScript type check
4949
working-directory: frontend
5050
run: npm run typecheck
51+
52+
react-doctor:
53+
name: React Doctor
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
with:
58+
persist-credentials: false
59+
60+
- name: Set up Node.js
61+
uses: actions/setup-node@v4
62+
with:
63+
node-version: '20'
64+
cache: 'npm'
65+
cache-dependency-path: frontend/package-lock.json
66+
67+
- name: Install dependencies
68+
working-directory: frontend
69+
run: npm ci
70+
71+
- name: React Doctor score check
72+
working-directory: frontend
73+
run: |
74+
SCORE=$(npx -y react-doctor@0.5.8 --score --yes)
75+
echo "React Doctor score: $SCORE"
76+
if [ "$SCORE" -lt 40 ]; then
77+
echo "::error::React Doctor score $SCORE is below the minimum threshold of 40"
78+
npx -y react-doctor@0.5.8 --verbose --yes
79+
exit 1
80+
fi

.github/workflows/react-doctor.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# React Doctor — finds security, performance, correctness, accessibility,
2+
# bundle-size, and architecture issues in React codebases.
3+
#
4+
# Docs: https://www.react.doctor/ci
5+
# Source: https://github.com/millionco/react-doctor
6+
7+
name: React Doctor
8+
9+
on:
10+
# Scans the PR's changed files and posts a sticky summary comment listing only the new issues introduced relative to the merge base of the target branch.
11+
pull_request:
12+
types: [opened, synchronize, reopened, ready_for_review]
13+
# Scans `main` on every push to track the health-score trend and catch regressions that slipped past PR review.
14+
push:
15+
branches: ["main"]
16+
17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
issues: write
21+
statuses: write
22+
23+
# Cancels any in-flight scan for the same PR (or branch, on push) the moment a new commit arrives, so reviewers only ever see the latest run.
24+
concurrency:
25+
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
26+
cancel-in-progress: true
27+
28+
jobs:
29+
react-doctor:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- uses: millionco/react-doctor@v2
37+
with:
38+
directory: frontend
39+
version: "0.5.8"
40+
# Advisory by default: React Doctor reports findings on every PR — a
41+
# sticky summary comment, inline review comments, and a commit status
42+
# with the health score — but never fails the check, so it won't red-X
43+
# a teammate's PR on day one. When your team trusts the signal, graduate
44+
# the gate: uncomment the block below and set blocking to "error" (fail
45+
# on new error-severity findings) or "warning" (fail on any finding).
46+
# Full reference: https://www.react.doctor/ci
47+
# blocking: error # Gate level: "none" (advisory, the default) | "warning" | "error"
48+
# scope: full # On PRs, scan the whole project instead of just changed files
49+
# comment: false # Disable the sticky PR summary comment
50+
# review-comments: false # Disable inline review comments on changed lines
51+
# commit-status: false # Disable the commit status (score + counts, links to the run)
52+
# project: "web,admin" # In a monorepo, scan specific workspace project(s)

.github/workflows/test-ci.yml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ env:
3535
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3636
LANGFLOW_URL_INGEST_FLOW_ID: ${{ vars.LANGFLOW_URL_INGEST_FLOW_ID || '72c3d17c-2dac-4a73-b48a-6518473d7830' }}
3737
# Single-node test cluster never reaches the multi-node readiness counts
38-
OPENSEARCH_NODE_COUNT_CHECK: "false"
38+
OPENSEARCH_NODE_COUNT_CHECK_ENABLED: "false"
3939

4040
jobs:
4141
changes:
@@ -53,25 +53,13 @@ jobs:
5353
with:
5454
filters: |
5555
e2e:
56-
- 'src/**'
57-
- 'frontend/**'
58-
- 'tests/**'
59-
- 'scripts/**'
60-
- 'flows/**'
61-
- 'docker-compose.yml'
62-
- 'Dockerfile*'
63-
- 'Makefile'
64-
- '.github/workflows/test-ci.yml'
56+
- '**'
57+
- '!docs/**'
58+
- '!**/*.md'
6559
integration:
66-
- 'src/**.py'
67-
- 'tests/**.py'
68-
- 'pyproject.toml'
69-
- 'uv.lock'
70-
- 'sdks/**'
71-
- 'flows/**'
72-
- 'Makefile'
73-
- 'scripts/**'
74-
- '.github/workflows/test-ci.yml'
60+
- '**'
61+
- '!docs/**'
62+
- '!**/*.md'
7563
7664
build-images:
7765
needs: changes
@@ -83,8 +71,6 @@ jobs:
8371

8472
- name: Cleanup Docker cache
8573
run: |
86-
docker system prune -af || true
87-
docker builder prune -af || true
8874
docker compose -f docker-compose.yml down -v --remove-orphans || true
8975
9076
- name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)
@@ -162,8 +148,6 @@ jobs:
162148

163149
- name: Cleanup Docker cache
164150
run: |
165-
docker system prune -af || true
166-
docker builder prune -af || true
167151
docker compose -f docker-compose.yml down -v --remove-orphans || true
168152
169153
- name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)
@@ -221,10 +205,19 @@ jobs:
221205
# Disable startup ingest noise unless a test enables it
222206
DISABLE_STARTUP_INGEST: "true"
223207
run: |
208+
chmod +x scripts/ci/run_integration_suite.sh
224209
OPENRAG_VERSION="${CI_IMAGE_TAG}" TEST_SUITE="${{ matrix.suite }}" make test-ci-suite
225210
echo "Keys directory after tests:"
226211
ls -la keys/ || echo "No keys directory"
227212
213+
- name: Upload service logs
214+
uses: actions/upload-artifact@v4
215+
if: failure()
216+
with:
217+
name: service-logs-${{ matrix.suite }}
218+
path: service-logs/
219+
retention-days: 7
220+
228221
e2e-run:
229222
needs: [changes, build-images]
230223
if: ${{ needs.changes.outputs.e2e == 'true' || github.event_name == 'workflow_dispatch' }}
@@ -233,8 +226,6 @@ jobs:
233226
steps:
234227
- name: Cleanup Docker cache
235228
run: |
236-
docker system prune -af || true
237-
docker builder prune -af || true
238229
docker compose -f docker-compose.yml down -v --remove-orphans || true
239230
240231
- name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)
@@ -268,7 +259,18 @@ jobs:
268259
- name: Install Playwright Browsers
269260
working-directory: frontend
270261
run: |
271-
npx playwright install --with-deps chromium
262+
for i in 1 2 3; do
263+
echo "Installing Playwright browsers (attempt $i)..."
264+
if npx playwright install --with-deps chromium; then
265+
break
266+
fi
267+
echo "Attempt $i failed. Retrying in 10 seconds..."
268+
sleep 10
269+
if [ $i -eq 3 ]; then
270+
echo "Failed to install Playwright browsers after 3 attempts."
271+
exit 1
272+
fi
273+
done
272274
273275
- name: Download OpenRAG image artifact
274276
uses: actions/download-artifact@v4

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ make clear-os-data # Clear OpenSearch data directory completely
262262
make factory-reset # Complete reset: containers, volumes, and data
263263
```
264264

265+
The reset also removes any legacy `opensearch-data` directory, so old OpenSearch index files do not linger after cleanup.
266+
265267
---
266268

267269
## Makefile Help System

Dockerfile.langflow

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ RUN microdnf install -y \
1212
&& microdnf clean all
1313

1414
# Install Langflow with targeted extras and CPU-only wheels for PyTorch/Docling
15+
# ibm-watsonx-ai and langchain-ibm are needed because they are not included in the pip installation of langflow when python version is 3.14
1516
RUN pip install --no-cache-dir \
1617
--extra-index-url https://download.pytorch.org/whl/cpu \
1718
torch==2.10.0 \
1819
torchvision==0.25.0 \
1920
"langflow-base[docling,openai,anthropic,google,ollama,opensearch,langfuse]==0.9.6" \
21+
"ibm-watsonx-ai>=1.3.1,<2.0.0" \
22+
"langchain-ibm~=1.1.0" \
2023
uv \
2124
&& pip uninstall -y clickhouse-connect \
2225
&& pip uninstall -y ragstack-ai-knowledge-store

0 commit comments

Comments
 (0)