Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/quiet-hooks-register.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openfn/runtime': patch
---

Use `module.registerHooks()` for the ESM resolve hook where Node supports it
5 changes: 5 additions & 0 deletions .changeset/worker-node-26-bookworm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openfn/ws-worker': minor
---

Run the worker image on Node 26 and Debian bookworm
5 changes: 5 additions & 0 deletions .changeset/worker-sentry-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openfn/ws-worker': patch
---

Upgrade Sentry to v11 to stop a Node deprecation warning at startup, and deduplicate repeated identical errors
80 changes: 68 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,47 @@ commands:
name: install CLI globally
command: sudo npm install -g file:dist/openfn-cli.tgz

check_node_version:
parameters:
node_version:
type: string
default: ''
steps:
- run:
name: Check Node versions match .tool-versions
command: scripts/check-node-version.sh << parameters.node_version >>

install_pnpm:
steps:
- run:
name: Install pnpm
command: sudo npm install -g "$(node -p "require('./package.json').packageManager.split('+')[0]")"

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
install:
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
docker:
- image: cimg/node:24.18
- image: cimg/node:26.12.0
resource_class: medium
# Add steps to the job
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
steps:
- run:
name: Install pnpm
command: sudo npm install -g corepack@latest && sudo corepack enable
- checkout
- check_node_version
- install_pnpm
- restore_cache:
# See the configuration reference documentation for more details on using restore_cache and save_cache steps
# https://circleci.com/docs/2.0/configuration-reference/?section=reference#save_cache
keys:
- deps-v1-{{ .Branch }}-{{checksum "pnpm-lock.yaml"}}
- deps-v1-{{ .Branch }}-{{checksum "pnpm-lock.yaml"}}-{{checksum ".tool-versions"}}
- run:
name: Install
command: pnpm install --frozen-lockfile
- save_cache:
key: deps-v1-{{ .Branch }}-{{checksum "pnpm-lock.yaml"}}
key: deps-v1-{{ .Branch }}-{{checksum "pnpm-lock.yaml"}}-{{checksum ".tool-versions"}}
paths:
- node_modules
- persist_to_workspace:
Expand All @@ -44,11 +59,13 @@ jobs:

build:
docker:
- image: cimg/node:24.18
- image: cimg/node:26.12.0
resource_class: medium
steps:
- attach_workspace:
at: ~/project
- check_node_version
- install_pnpm
- run:
name: Build packages
command: pnpm build
Expand All @@ -59,45 +76,53 @@ jobs:

unit_test:
docker:
- image: cimg/node:24.18
- image: cimg/node:26.12.0
resource_class: medium
parallelism: 1
steps:
- attach_workspace:
at: ~/project
- check_node_version
- install_pnpm
- run:
name: Run Tests
command: pnpm test

format:
docker:
- image: cimg/node:24.18
- image: cimg/node:26.12.0
resource_class: medium
steps:
- attach_workspace:
at: ~/project
- check_node_version
- install_pnpm
- run:
name: Check formatting
command: pnpm test:format

type_check:
docker:
- image: cimg/node:24.18
- image: cimg/node:26.12.0
resource_class: medium
steps:
- attach_workspace:
at: ~/project
- check_node_version
- install_pnpm
- run:
name: Type check
command: pnpm test:types

build_openfnx:
docker:
- image: cimg/node:24.18
- image: cimg/node:26.12.0
resource_class: medium
steps:
- attach_workspace:
at: ~/project
- check_node_version
- install_pnpm
- run:
name: Build local tarballs
command: pnpm pack:local dist --no-version
Expand All @@ -117,6 +142,9 @@ jobs:
steps:
- attach_workspace:
at: ~/project
- check_node_version:
node_version: << parameters.node_version >>
- install_pnpm
- install_cli_global
- run:
name: Check install
Expand All @@ -125,6 +153,29 @@ jobs:
name: Run integration test suite
command: pnpm test:integration

worker_image:
docker:
- image: cimg/node:26.12.0
resource_class: medium
steps:
- checkout
- check_node_version
- setup_remote_docker
- run:
name: Build worker image
command: docker build -t ws-worker-ci .
- run:
name: Check Node in the image matches .tool-versions
command: docker run --rm ws-worker-ci /app/scripts/check-node-version.sh
- run:
name: Install and load motherduck as user node
command: |
docker run --rm --user node ws-worker-ci sh -c '
mkdir -p /tmp/repo && cd /tmp/repo &&
npm install --no-audit --no-fund --no-package-lock --ignore-scripts @openfn/language-motherduck@latest &&
node -e "require(\"@openfn/language-motherduck\")"
'

# This ensures that we can run a v1 CLI deploy in node 18,
# which is important for GH sync
legacy_test:
Expand Down Expand Up @@ -168,9 +219,14 @@ workflows:
- integration_test:
matrix:
parameters:
node_version: ['22.20', '24.18.1', '26.5.1']
node_version: ['24.22.0', '26.12.0']
requires:
- build_openfnx
- legacy_test:
requires:
- build_openfnx
- worker_image:
filters:
branches:
ignore:
- main
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Default",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"image": "mcr.microsoft.com/devcontainers/base:bookworm",

"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
Expand All @@ -13,7 +13,7 @@
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "18"
"version": "none"
}
},

Expand All @@ -25,8 +25,8 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install -g pnpm"
// Node comes from .tool-versions, so the node feature only installs nvm.
"onCreateCommand": ".devcontainer/install-node.sh"

// Configure tool-specific properties.
// "customizations": {},
Expand Down
10 changes: 10 additions & 0 deletions .devcontainer/install-node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

node_version=$(awk '$1 == "nodejs" { print $2 }' .tool-versions)

. "$NVM_DIR/nvm.sh"
nvm install "$node_version"
nvm alias default "$node_version"

npm install -g "$(node -p "require('./package.json').packageManager.split('+')[0]")"
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 26.5.1
nodejs 26.12.0
Loading
Loading