Skip to content

Commit 64ad5f0

Browse files
authored
Merge pull request #1210 from OpenFn/release/next
Release: CLI 1.22.0, worker 1.21.0
2 parents 5d94936 + 13e19f7 commit 64ad5f0

Some content is hidden

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

47 files changed

+806
-317
lines changed

integration-tests/cli/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @openfn/integration-tests-cli
22

3+
## 1.0.8
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [f089f8d]
8+
- @openfn/project@0.10.1
9+
- @openfn/lightning-mock@2.4.1
10+
311
## 1.0.7
412

513
### Patch Changes

integration-tests/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@openfn/integration-tests-cli",
33
"private": true,
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"description": "CLI integration tests",
66
"author": "Open Function Group <admin@openfn.org>",
77
"license": "ISC",

integration-tests/cli/test/project-v1.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ steps:
138138
next:
139139
transform-data:
140140
disabled: false
141-
condition: true
141+
condition: always
142142
- id: transform-data
143143
name: Transform data
144144
adaptor: "@openfn/language-common@latest"

integration-tests/worker/src/factories.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const createTrigger = () => ({
1919
id: crypto.randomUUID(),
2020
});
2121

22-
export const createEdge = (a: any, b: any, condition?: string) => {
22+
export const createEdge = (a: any, b: any, extra?: any) => {
2323
const edge: any = {
2424
id: crypto.randomUUID(),
2525
target_job_id: b.id,
@@ -29,6 +29,7 @@ export const createEdge = (a: any, b: any, condition?: string) => {
2929
} else {
3030
edge.source_job_id = a.id;
3131
}
32+
Object.assign(edge, extra);
3233
return edge;
3334
};
3435

integration-tests/worker/test/runs.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,24 @@ test.serial('Run with collections', async (t) => {
283283
{ key: 'c', value: { id: 'c' } },
284284
]);
285285
});
286+
287+
test.serial('Run with edge conditions', async (t) => {
288+
const job1 = createJob({
289+
body: `fn((s) => s)`,
290+
});
291+
const job2 = createJob({
292+
body: `fn((s) => {
293+
s.didExecuteStep2 = true
294+
return s;
295+
})`,
296+
});
297+
const edge = createEdge(job1, job2, {
298+
// I would prefer this ran on failure, but that's a lot
299+
// harder to do the way these tests are set up
300+
condition: 'on_job_success',
301+
});
302+
const attempt = createRun([], [job1, job2], [edge]);
303+
304+
const state = await run(t, attempt);
305+
t.true(state.didExecuteStep2);
306+
});

packages/cli/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# @openfn/cli
22

3+
## 1.22.0
4+
5+
### Minor Changes
6+
7+
- f089f8d: Fix edge conditions in pulled workflows
8+
9+
### Patch Changes
10+
11+
- Updated dependencies [f089f8d]
12+
- Updated dependencies [f089f8d]
13+
- Updated dependencies [064933d]
14+
- @openfn/runtime@1.8.0
15+
- @openfn/project@0.10.1
16+
317
## 1.21.0
418

519
### Minor Changes

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openfn/cli",
3-
"version": "1.21.0",
3+
"version": "1.22.0",
44
"description": "CLI devtools for the OpenFn toolchain",
55
"engines": {
66
"node": ">=18",

packages/cli/test/projects/checkout.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ workspace:
457457
next: {
458458
'transform-data-to-fhir-standard': {
459459
disabled: false,
460-
condition: true,
460+
condition: 'always',
461461
},
462462
},
463463
},

packages/cli/test/projects/fetch.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ test.serial(
442442
next: {
443443
'transform-data': {
444444
disabled: false,
445-
condition: true,
445+
condition: 'always',
446446
openfn: {
447447
uuid: 'a9a3adef-b394-4405-814d-3ac4323f4b4b',
448448
},

packages/cli/test/projects/fixtures.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ workflows:
9090
next:
9191
transform-data:
9292
disabled: false
93-
condition: true
93+
condition: always
9494
openfn:
9595
uuid: a9a3adef-b394-4405-814d-3ac4323f4b4b
9696
history:

0 commit comments

Comments
 (0)