Skip to content

Commit 8b752ee

Browse files
authored
Merge pull request #317 from badaitech/feat/execution-context-detailed-debug
feat: add 'Local' variable namespace option to variable nodes
2 parents 7839bca + f6e725c commit 8b752ee

25 files changed

Lines changed: 135 additions & 13 deletions

File tree

.changeset/pre.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"olive-ears-camp",
3636
"petite-paws-cut",
3737
"proud-clouds-report",
38+
"public-impalas-visit",
3839
"red-donkeys-stop",
3940
"rude-parts-heal",
4041
"sixty-humans-smile",

apps/chaingraph-backend/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @badaitech/chaingraph-backend
22

3+
## 0.5.5-dev.26
4+
5+
### Patch Changes
6+
7+
- feat: add 'Local' variable namespace option to variable nodes
8+
39
## 0.5.5-dev.25
410

511
### Patch Changes

apps/chaingraph-backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-backend",
33
"type": "module",
4-
"version": "0.5.5-dev.25",
4+
"version": "0.5.5-dev.26",
55
"private": false,
66
"description": "Backend server for the Chaingraph project",
77
"license": "BUSL-1.1",

apps/chaingraph-execution-api/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# @badaitech/chaingraph-execution-api
22

3+
## 0.5.5-dev.26
4+
5+
### Patch Changes
6+
7+
- feat: add 'Local' variable namespace option to variable nodes
8+
- Updated dependencies
9+
- @badaitech/chaingraph-executor@0.5.5-dev.26
10+
- @badaitech/chaingraph-types@0.5.5-dev.26
11+
- @badaitech/chaingraph-trpc@0.5.5-dev.26
12+
313
## 0.5.5-dev.25
414

515
### Patch Changes

apps/chaingraph-execution-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-execution-api",
33
"type": "module",
4-
"version": "0.5.5-dev.25",
4+
"version": "0.5.5-dev.26",
55
"private": false,
66
"description": "Chaingraph tRPC Server - Scalable API server for Chaingraph execution management",
77
"license": "BUSL-1.1",

apps/chaingraph-execution-worker/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @badaitech/chaingraph-execution-worker
22

3+
## 0.5.5-dev.26
4+
5+
### Patch Changes
6+
7+
- feat: add 'Local' variable namespace option to variable nodes
8+
- Updated dependencies
9+
- @badaitech/chaingraph-executor@0.5.5-dev.26
10+
- @badaitech/chaingraph-nodes@0.5.5-dev.26
11+
- @badaitech/chaingraph-types@0.5.5-dev.26
12+
- @badaitech/chaingraph-trpc@0.5.5-dev.26
13+
314
## 0.5.5-dev.25
415

516
### Patch Changes

apps/chaingraph-execution-worker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-execution-worker",
33
"type": "module",
4-
"version": "0.5.5-dev.25",
4+
"version": "0.5.5-dev.26",
55
"private": false,
66
"description": "Chaingraph Execution Worker Service which connected to Kafka and process the flow executions",
77
"license": "BUSL-1.1",

apps/chaingraph-frontend/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @badaitech/chaingraph-frontend
22

3+
## 0.5.5-dev.26
4+
5+
### Patch Changes
6+
7+
- feat: add 'Local' variable namespace option to variable nodes
8+
- Updated dependencies
9+
- @badaitech/chaingraph-executor@0.5.5-dev.26
10+
- @badaitech/chaingraph-nodes@0.5.5-dev.26
11+
- @badaitech/chaingraph-types@0.5.5-dev.26
12+
- @badaitech/chaingraph-trpc@0.5.5-dev.26
13+
- @badaitech/badai-api@0.5.5-dev.26
14+
315
## 0.5.5-dev.25
416

517
### Patch Changes

apps/chaingraph-frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-frontend",
33
"type": "module",
4-
"version": "0.5.5-dev.25",
4+
"version": "0.5.5-dev.26",
55
"private": false,
66
"description": "Frontend application for the Chaingraph project",
77
"license": "BUSL-1.1",

apps/chaingraph-frontend/src/store/execution-tree/stores.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ export const fetchExecutionDetailsFx = executionDomain.createEffect(
134134
},
135135
)
136136

137+
// Fetch multiple execution trees (for refreshing expanded trees)
138+
export const fetchMultipleExecutionTreesFx = executionDomain.createEffect(
139+
async (executionIds: string[]) => {
140+
const promises = executionIds.map(id => fetchExecutionTreeFx(id))
141+
return await Promise.all(promises)
142+
},
143+
)
144+
137145
// ============================================================================
138146
// STORE UPDATES
139147
// ============================================================================
@@ -162,6 +170,16 @@ $loadingTrees
162170
newSet.delete(executionId)
163171
return newSet
164172
})
173+
.on(fetchMultipleExecutionTreesFx, (state, executionIds) => {
174+
const newSet = new Set(state)
175+
executionIds.forEach(id => newSet.add(id))
176+
return newSet
177+
})
178+
.on(fetchMultipleExecutionTreesFx.finally, (state, { params: executionIds }) => {
179+
const newSet = new Set(state)
180+
executionIds.forEach(id => newSet.delete(id))
181+
return newSet
182+
})
165183

166184
// Store for selected execution details
167185
export const $selectedExecutionDetails = executionDomain
@@ -225,9 +243,14 @@ $executionTreeError
225243
message: error.message,
226244
code: 'FETCH_DETAILS_ERROR',
227245
}))
246+
.on(fetchMultipleExecutionTreesFx.failData, (_, error) => ({
247+
message: error.message,
248+
code: 'FETCH_MULTIPLE_TREES_ERROR',
249+
}))
228250
.reset(fetchRootExecutionsFx)
229251
.reset(fetchExecutionTreeFx)
230252
.reset(fetchExecutionDetailsFx)
253+
.reset(fetchMultipleExecutionTreesFx)
231254

232255
// ============================================================================
233256
// SAMPLES (Event connections)
@@ -271,6 +294,15 @@ sample({
271294
target: fetchRootExecutionsFx,
272295
})
273296

297+
// Refresh expanded trees
298+
sample({
299+
clock: refreshExecutionTree,
300+
source: $expandedTrees,
301+
filter: expandedTrees => expandedTrees.size > 0,
302+
fn: expandedTrees => Array.from(expandedTrees.keys()),
303+
target: fetchMultipleExecutionTreesFx,
304+
})
305+
274306
// Fetch details when selecting an execution
275307
sample({
276308
clock: $selectedExecutionId,

0 commit comments

Comments
 (0)