Skip to content

Commit 1d4d6ad

Browse files
authored
Merge branch 'release-1.10.0' into cz/shell-exec
2 parents 1bb2bb9 + d68b312 commit 1d4d6ad

286 files changed

Lines changed: 66648 additions & 2125 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.

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,15 @@ jobs:
393393
--report-dir coverage/final
394394
395395
- name: Upload Merged Frontend Coverage to Codecov
396+
if: env.CODECOV_TOKEN != ''
397+
env:
398+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
396399
uses: codecov/codecov-action@v5
397400
with:
398-
token: ${{ secrets.CODECOV_TOKEN }}
401+
token: ${{ env.CODECOV_TOKEN }}
399402
files: coverage/combined/total-frontend-coverage.json
400403
flags: frontend
401-
fail_ci_if_error: true
404+
fail_ci_if_error: false
402405

403406
# https://github.com/langchain-ai/langchain/blob/master/.github/workflows/check_diffs.yml
404407
ci_success:
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: GP Backend Auto-update Strings
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "src/lfx/src/lfx/components/**"
7+
- "src/backend/base/langflow/initial_setup/starter_projects/**"
8+
9+
jobs:
10+
auto-commit:
11+
if: |
12+
github.actor != 'github-actions[bot]' &&
13+
github.event.pull_request.head.repo.full_name == github.repository
14+
runs-on: ubuntu-latest
15+
name: Auto-regenerate locales/en.json on PR branch
16+
permissions:
17+
contents: write
18+
19+
steps:
20+
- name: Checkout PR branch
21+
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ github.head_ref }}
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Bake i18n_key into template noteNodes
27+
run: python scripts/gp/bake_note_keys.py
28+
29+
- name: Setup uv
30+
uses: astral-sh/setup-uv@v6
31+
with:
32+
enable-cache: true
33+
cache-dependency-glob: "uv.lock"
34+
python-version: "3.12"
35+
36+
- name: Install workspace (lfx + langflow-base)
37+
run: uv sync --no-dev
38+
39+
- name: Generate en.json
40+
run: uv run python scripts/gp/extract_backend_strings.py
41+
42+
- name: Commit updated files to PR branch if changed
43+
run: |
44+
git config user.name "github-actions[bot]"
45+
git config user.email "github-actions[bot]@users.noreply.github.com"
46+
git add src/backend/base/langflow/initial_setup/starter_projects/
47+
git add src/backend/base/langflow/locales/en.json
48+
git diff --staged --quiet || git commit -m "chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]"
49+
git push

.github/workflows/gp-download.yml

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
GP_ADMIN_PASSWORD: ${{ secrets.GP_ADMIN_PASSWORD }}
5252
GP_INSTANCE: ${{ vars.GP_INSTANCE }}
5353
GP_BUNDLE: ${{ vars.GP_BUNDLE }}
54-
run: python download_translations.py --output ../../src/frontend/src/locales/
54+
run: python download.py --target frontend --output ../../src/frontend/src/locales/
5555

5656
- name: Close stale translation PRs
5757
uses: actions/github-script@v8
@@ -105,3 +105,104 @@ jobs:
105105
- name: Report GP download failure
106106
if: failure()
107107
run: echo "::warning::GP translation download failed — translations may be out of date. Check the 'Download translations from GP' step above for details."
108+
109+
download-backend:
110+
if: github.event_name == 'workflow_dispatch'
111+
runs-on: ubuntu-latest
112+
name: Download backend translations from Globalization Pipeline
113+
environment: GP-test
114+
permissions:
115+
contents: write
116+
pull-requests: write
117+
118+
steps:
119+
- name: Resolve latest release branch
120+
id: resolve-branch
121+
run: |
122+
BRANCH=$(git ls-remote --heads https://github.com/${{ github.repository }} 'refs/heads/release-*' \
123+
| awk '{print $2}' \
124+
| sed 's|refs/heads/||' \
125+
| grep -E '^release-[0-9]+\.[0-9]+\.[0-9]+$' \
126+
| sort -V \
127+
| tail -n 1)
128+
if [ -z "$BRANCH" ]; then
129+
echo "No release-* branch found in ${{ github.repository }}"
130+
exit 1
131+
fi
132+
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
133+
echo "Using release branch: $BRANCH"
134+
135+
- name: Checkout release branch
136+
uses: actions/checkout@v4
137+
with:
138+
ref: ${{ steps.resolve-branch.outputs.branch }}
139+
140+
- name: Set up Python
141+
uses: actions/setup-python@v5
142+
with:
143+
python-version: "3.12"
144+
145+
- name: Install dependencies
146+
run: pip install -r scripts/gp/requirements.txt
147+
148+
- name: Download backend translations from GP
149+
working-directory: scripts/gp
150+
env:
151+
GP_ADMIN_USER_ID: ${{ secrets.GP_ADMIN_USER_ID }}
152+
GP_ADMIN_PASSWORD: ${{ secrets.GP_ADMIN_PASSWORD }}
153+
GP_INSTANCE: ${{ vars.GP_INSTANCE }}
154+
GP_BACKEND_BUNDLE: ${{ vars.GP_BACKEND_BUNDLE }}
155+
run: python download.py --target backend
156+
157+
- name: Close stale backend translation PRs
158+
uses: actions/github-script@v8
159+
with:
160+
github-token: ${{ secrets.GITHUB_TOKEN }}
161+
script: |
162+
const { data: pulls } = await github.rest.pulls.list({
163+
owner: context.repo.owner,
164+
repo: context.repo.repo,
165+
state: 'open'
166+
});
167+
for (const pull of pulls) {
168+
if (pull.title === "chore: update backend translations from Globalization Pipeline") {
169+
await github.rest.pulls.update({
170+
owner: context.repo.owner,
171+
repo: context.repo.repo,
172+
pull_number: pull.number,
173+
state: 'closed'
174+
});
175+
}
176+
}
177+
178+
- name: Create Pull Request
179+
id: create-pr
180+
uses: peter-evans/create-pull-request@v8
181+
with:
182+
token: ${{ secrets.GITHUB_TOKEN }}
183+
branch-token: ${{ secrets.GITHUB_TOKEN }}
184+
base: ${{ steps.resolve-branch.outputs.branch }}
185+
commit-message: "chore: update backend translations from Globalization Pipeline [skip ci]"
186+
title: "chore: update backend translations from Globalization Pipeline"
187+
body: |
188+
Automated PR to update backend locale files from IBM Globalization Pipeline.
189+
190+
This PR was automatically created by the `gp-download` workflow.
191+
If no files changed, this PR will be empty and can be closed.
192+
branch: translations/update-backend-gp
193+
branch-suffix: timestamp
194+
delete-branch: true
195+
maintainer-can-modify: true
196+
add-paths: src/backend/base/langflow/locales/*.json
197+
198+
- name: Enable auto-merge
199+
if: steps.create-pr.outputs.pull-request-number != ''
200+
env:
201+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
202+
run: |
203+
gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} --auto --squash \
204+
--repo ${{ github.repository }}
205+
206+
- name: Report GP backend download failure
207+
if: failure()
208+
run: echo "::warning::GP backend translation download failed — backend translations may be out of date. Check the 'Download backend translations from GP' step above for details."

.github/workflows/gp-upload.yml

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ on:
66
- "release-*"
77
paths:
88
- "src/frontend/src/locales/en.json"
9+
- "src/backend/base/langflow/locales/en.json"
910
workflow_dispatch:
1011

1112
jobs:
12-
upload:
13+
upload-frontend:
1314
runs-on: ubuntu-latest
14-
name: Upload English strings to Globalization Pipeline
15+
name: Upload frontend strings to GP
1516
environment: GP-test
17+
if: >-
18+
github.event_name == 'workflow_dispatch' ||
19+
contains(toJSON(github.event.commits.*.modified), 'src/frontend/src/locales/en.json')
1620
1721
steps:
1822
- name: Checkout repository
@@ -53,4 +57,55 @@ jobs:
5357
GP_ADMIN_PASSWORD: ${{ secrets.GP_ADMIN_PASSWORD }}
5458
GP_INSTANCE: ${{ vars.GP_INSTANCE }}
5559
GP_BUNDLE: ${{ vars.GP_BUNDLE }}
56-
run: python upload_strings.py --source ../../src/frontend/src/locales/en.json
60+
run: python upload.py --target frontend --source ../../src/frontend/src/locales/en.json
61+
62+
upload-backend:
63+
runs-on: ubuntu-latest
64+
name: Upload backend strings to GP
65+
environment: GP-test
66+
if: >-
67+
github.actor != 'github-actions[bot]' && (
68+
github.event_name == 'workflow_dispatch' ||
69+
contains(toJSON(github.event.commits.*.modified), 'src/backend/base/langflow/locales/en.json')
70+
)
71+
72+
steps:
73+
- name: Checkout repository
74+
uses: actions/checkout@v4
75+
76+
- name: Check if this is the latest release branch
77+
id: check-branch
78+
run: |
79+
LATEST=$(git ls-remote --heads https://github.com/${{ github.repository }} 'refs/heads/release-*' \
80+
| awk '{print $2}' \
81+
| sed 's|refs/heads/||' \
82+
| grep -E '^release-[0-9]+\.[0-9]+\.[0-9]+$' \
83+
| sort -V \
84+
| tail -n 1)
85+
CURRENT="${{ github.ref_name }}"
86+
if [ "$CURRENT" != "$LATEST" ]; then
87+
echo "skip=true" >> "$GITHUB_OUTPUT"
88+
echo "::notice::Skipping upload — $CURRENT is not the latest release branch ($LATEST)"
89+
else
90+
echo "skip=false" >> "$GITHUB_OUTPUT"
91+
fi
92+
93+
- name: Set up Python
94+
if: steps.check-branch.outputs.skip != 'true'
95+
uses: actions/setup-python@v5
96+
with:
97+
python-version: "3.12"
98+
99+
- name: Install dependencies
100+
if: steps.check-branch.outputs.skip != 'true'
101+
run: pip install -r scripts/gp/requirements.txt
102+
103+
- name: Upload strings to GP
104+
if: steps.check-branch.outputs.skip != 'true'
105+
working-directory: scripts/gp
106+
env:
107+
GP_ADMIN_USER_ID: ${{ secrets.GP_ADMIN_USER_ID }}
108+
GP_ADMIN_PASSWORD: ${{ secrets.GP_ADMIN_PASSWORD }}
109+
GP_INSTANCE: ${{ vars.GP_INSTANCE }}
110+
GP_BACKEND_BUNDLE: ${{ vars.GP_BACKEND_BUNDLE }}
111+
run: python upload.py --target backend

.github/workflows/py_autofix.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ jobs:
6363
steps:
6464
- uses: actions/checkout@v6
6565
with:
66-
ref: ${{ github.head_ref }}
66+
repository: ${{ github.event.pull_request.head.repo.full_name }}
67+
ref: ${{ github.event.pull_request.head.ref }}
6768
fetch-depth: 0
6869
- name: Merge base branch
6970
run: |

.secrets.baseline

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,7 +2793,7 @@
27932793
"filename": "src/backend/tests/unit/api/v1/test_mcp_projects.py",
27942794
"hashed_secret": "4258d43e3b1f9658067ceea9c682a96cbdbb5ca0",
27952795
"is_verified": false,
2796-
"line_number": 596,
2796+
"line_number": 739,
27972797
"is_secret": false
27982798
}
27992799
],
@@ -8101,23 +8101,23 @@
81018101
"filename": "src/lfx/tests/unit/services/settings/test_mcp_composer.py",
81028102
"hashed_secret": "00942f4668670f34c5943cf52c7ef3139fe2b8d6",
81038103
"is_verified": false,
8104-
"line_number": 162,
8104+
"line_number": 236,
81058105
"is_secret": false
81068106
},
81078107
{
81088108
"type": "Secret Keyword",
81098109
"filename": "src/lfx/tests/unit/services/settings/test_mcp_composer.py",
81108110
"hashed_secret": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
81118111
"is_verified": false,
8112-
"line_number": 202,
8112+
"line_number": 276,
81138113
"is_secret": false
81148114
},
81158115
{
81168116
"type": "Secret Keyword",
81178117
"filename": "src/lfx/tests/unit/services/settings/test_mcp_composer.py",
81188118
"hashed_secret": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4",
81198119
"is_verified": false,
8120-
"line_number": 335,
8120+
"line_number": 409,
81218121
"is_secret": false
81228122
}
81238123
],
@@ -8198,5 +8198,5 @@
81988198
}
81998199
]
82008200
},
8201-
"generated_at": "2026-04-24T03:31:30Z"
8201+
"generated_at": "2026-04-27T15:53:27Z"
82028202
}

0 commit comments

Comments
 (0)