Skip to content

Commit c47f39d

Browse files
authored
Release: CLI 1.32.0 + worker 1.23.3 (#1342)
* CLI: Update apollo urls (#1339) * update apollo staging url * chore: update default repo-dir (#1335) * chore: update default repo-dir * chore: engine multi different repo * feat: update default repo path * feat: auto create credentials.yaml (#1340) * Update to Node 24 (#1331) * add a custom module loader to handle older imports without .js extensions
1 parent 4945b0a commit c47f39d

45 files changed

Lines changed: 404 additions & 168 deletions

Some content is hidden

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

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
88
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
99
docker:
10-
- image: cimg/node:22.20
10+
- image: cimg/node:24.14
1111
resource_class: medium
1212
# Add steps to the job
1313
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
@@ -35,7 +35,7 @@ jobs:
3535

3636
build:
3737
docker:
38-
- image: cimg/node:22.20
38+
- image: cimg/node:24.14
3939
resource_class: medium
4040
steps:
4141
- attach_workspace:
@@ -50,7 +50,7 @@ jobs:
5050

5151
unit_test:
5252
docker:
53-
- image: cimg/node:22.20
53+
- image: cimg/node:24.14
5454
resource_class: medium
5555
parallelism: 1
5656
steps:
@@ -62,7 +62,7 @@ jobs:
6262

6363
format:
6464
docker:
65-
- image: cimg/node:22.20
65+
- image: cimg/node:24.14
6666
resource_class: medium
6767
steps:
6868
- attach_workspace:
@@ -73,7 +73,7 @@ jobs:
7373

7474
type_check:
7575
docker:
76-
- image: cimg/node:22.20
76+
- image: cimg/node:24.14
7777
resource_class: medium
7878
steps:
7979
- attach_workspace:
@@ -131,6 +131,6 @@ workflows:
131131
- integration_test:
132132
matrix:
133133
parameters:
134-
node_version: ['22.20']
134+
node_version: ['22.20', '24.14.0']
135135
requires:
136136
- build

.github/workflows/project-integration-tests.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
runs-on: ubuntu-latest
1515
if: github.event_name != 'pull_request' || github.event.label.name == 'run_project_tests'
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v6
1818
- name: Checkout Integration Test Repo
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v6
2020
with:
2121
repository: openfn/project-integration-tests
2222
path: resources/repo
23-
- uses: actions/setup-node@v3
23+
- uses: actions/setup-node@v6
2424
with:
25-
node-version: '22.12'
25+
node-version: '24.14'
2626
- uses: pnpm/action-setup@v4
2727
- run: pnpm install
2828
- run: pnpm install:openfnx

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fetch-depth: 1
1616
- uses: actions/setup-node@v6
1717
with:
18-
node-version: '22.12'
18+
node-version: '24.14'
1919
- uses: pnpm/action-setup@v4
2020
- run: pnpm install
2121
- run: pnpm build

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 22.12.0
1+
nodejs 24.14.0

integration-tests/cli/modules/test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@openfn/language-test",
33
"version": "0.0.1",
44
"type": "module",
5-
"module": "index.js",
5+
"main": "index.js",
66
"private": true,
77
"devDependencies": {}
88
}

integration-tests/cli/test/autoinstall.test.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,22 @@ test.serial(
7979
}
8080
);
8181

82+
/***
83+
* Important: these tests are skipped because the old @openfn/language-testing package,
84+
* which has been deprecated and removed from adaptors repo, depends on a version of
85+
* language-common which just happens to be incompatible with node24
86+
*
87+
* Since the pre-release stuff is sitting unreleased these tests will just sit on skipped
88+
* We should work out how to build a new version of this package (not in the adaptors repo)
89+
* And probably remove the common dependency
90+
*/
91+
8292
// Ignore the @next version if present but we asked for latest
83-
test.serial(
93+
test.serial.skip(
8494
`openfn ${jobsPath}/simple.js -a testing@latest ${repoDir} ${log}`,
8595
async (t) => {
8696
const { stdout, err } = await run(t.title);
97+
console.log(stdout);
8798

8899
// t.falsy(err); // TODO I think this is a broken adaptor build?
89100
t.regex(stdout, /Auto-installing language adaptors/);
@@ -109,7 +120,7 @@ test.serial(
109120
);
110121

111122
// Ignore @next if present but we asked for no version
112-
test.serial(
123+
test.serial.skip(
113124
`openfn ${jobsPath}/simple.js -a testing ${repoDir} ${log}`,
114125
async (t) => {
115126
const { stdout, err } = await run(t.title);
@@ -126,7 +137,7 @@ test.serial(
126137

127138
// TODO we need to fix the version of testing
128139
// maybe after release we can push next onto 2.0 and leave latest on 1.0
129-
test.serial(
140+
test.serial.skip(
130141
`openfn ${jobsPath}/simple.js -a testing@next ${repoDir} ${log}`,
131142
async (t) => {
132143
const { stdout, stderr } = await run(t.title);

integration-tests/cli/test/deploy.v2.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ test.serial('pull a project', async (t) => {
140140
t.regex(yaml, /id\: test-project/);
141141
});
142142

143-
test.serial.only('pull, change and re-deploy', async (t) => {
143+
test.serial('pull, change and re-deploy', async (t) => {
144144
const projectId = 'aaaaaaaa';
145145
server.addProject(makeProject(projectId) as any);
146146

integration-tests/cli/test/errors.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ test.serial('job with reference error', async (t) => {
158158
'ref aborted with error (SSSms)',
159159
`TypeError: Cannot read properties of undefined (reading 'y')
160160
at vm:module(0):1:23
161-
@openfn/language-common_2.1.1/dist/index.cjs:333:12`,
161+
@openfn/language-common_2.1.1/dist/index.js:270:12`,
162162
'Error occurred at: ref',
163163
'1: fn((state) => state.x.y)',
164164
' ^ ',
@@ -178,7 +178,7 @@ test.serial('job with not a function error', async (t) => {
178178
'not-function aborted with error (SSSms)',
179179
`TypeError: state is not a function
180180
at vm:module(0):1:15
181-
@openfn/language-common_2.1.1/dist/index.cjs:333:12`,
181+
@openfn/language-common_2.1.1/dist/index.js:270:12`,
182182
'Error occurred at: not-function',
183183
'1: fn((state) => state())',
184184
' ^ ',
@@ -198,7 +198,7 @@ test.serial('job with assign-to-const error', async (t) => {
198198
'assign-const aborted with error (SSSms)',
199199
`TypeError: Assignment to constant variable.
200200
at vm:module(0):1:33
201-
@openfn/language-common_2.1.1/dist/index.cjs:333:12`,
201+
@openfn/language-common_2.1.1/dist/index.js:270:12`,
202202
'Error occurred at: assign-const',
203203
'1: fn((state) => { const x = 10; x = 20; })',
204204
' ^ ',

integration-tests/worker/src/init.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,23 @@ import createLightningServer, { toBase64 } from '@openfn/lightning-mock';
55
import createEngine from '@openfn/engine-multi';
66
import createWorkerServer from '@openfn/ws-worker';
77
import { createMockLogger } from '@openfn/logger';
8-
// import createLogger from '@openfn/logger';
8+
import createLogger from '@openfn/logger';
9+
10+
const debugWorker = process.env.OPENFN_DEBUG_WORKER;
11+
const debugLightning = process.env.OPENFN_DEBUG_LIGHTNING;
912

1013
export const randomPort = () => Math.round(2000 + Math.random() * 1000);
1114

1215
export const initLightning = (port = 4000, privateKey?: string) => {
1316
// TODO the lightning mock right now doesn't use the secret
1417
// but we may want to add tests against this
15-
const opts = { port };
18+
const opts: any = { port };
1619
if (privateKey) {
17-
// @ts-ignore
1820
opts.runPrivateKey = toBase64(privateKey);
1921
}
20-
// opts.logger = createLogger('LTG', { level: 'debug' });
22+
if (debugLightning) {
23+
opts.logger = createLogger('LTG', { level: 'debug' });
24+
}
2125
return createLightningServer(opts);
2226
};
2327

@@ -40,8 +44,9 @@ export const initWorker = async (
4044
});
4145

4246
const worker = createWorkerServer(engine, {
43-
logger: createMockLogger(),
44-
// logger: createLogger('worker', { level: 'debug' }),
47+
logger: debugWorker
48+
? createLogger('worker', { level: 'debug' })
49+
: createMockLogger(),
4550
port: workerPort,
4651
lightning: `ws://localhost:${lightningPort}/worker`,
4752
secret: crypto.randomUUID(),

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

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ test.serial('run parallel jobs', async (t) => {
198198

199199
test.serial('run a http adaptor job', async (t) => {
200200
const job = createJob({
201-
adaptor: '@openfn/language-http@7.2.0',
201+
adaptor: '@openfn/language-http@7.2.9',
202202
body: `get("https://jsonplaceholder.typicode.com/todos/1");
203203
fn((state) => { state.res = state.response; return state });`,
204204
});
@@ -217,40 +217,6 @@ test.serial('run a http adaptor job', async (t) => {
217217
});
218218
});
219219

220-
test.serial('use different versions of the same adaptor', async (t) => {
221-
// http@5 exported an axios global - so run this job and validate that the global is there
222-
const job1 = createJob({
223-
body: `import { axios } from "@openfn/language-http";
224-
fn((s) => {
225-
if (!axios) {
226-
throw new Error('AXIOS NOT FOUND')
227-
}
228-
return s;
229-
})`,
230-
adaptor: '@openfn/language-http@5.0.4',
231-
});
232-
233-
// http@6 no longer exports axios - so throw an error if we see it
234-
const job2 = createJob({
235-
body: `import { axios } from "@openfn/language-http";
236-
fn((s) => {
237-
if (axios) {
238-
throw new Error('AXIOS FOUND')
239-
}
240-
return s;
241-
})`,
242-
adaptor: '@openfn/language-http@6.0.0',
243-
});
244-
245-
// Just for fun, run each job a couple of times to make sure that there's no wierd caching or ordering anything
246-
const steps = [job1, job2, job1, job2];
247-
const attempt = createRun([], steps, []);
248-
249-
const result = await run(t, attempt);
250-
t.log(result);
251-
t.falsy(result.errors);
252-
});
253-
254220
test.serial('Run with collections', async (t) => {
255221
const job1 = createJob({
256222
body: `fn((state = {}) => {
@@ -270,8 +236,6 @@ test.serial('Run with collections', async (t) => {
270236
state.results.push({ key, value })
271237
});
272238
`,
273-
// Note: for some reason 1.7.0 fails because it exports a collections ??
274-
// 1.7.4 seems fine
275239
adaptor: '@openfn/language-common@1.7.4',
276240
});
277241
const attempt = createRun([], [job1], []);

0 commit comments

Comments
 (0)