diff --git a/CLAUDE.md b/CLAUDE.md index a0626976..5357320a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -152,7 +152,8 @@ Applied to: cloudflared, mailflow frontend + backend, n8n runner. `headscale` is `ci/validate.sh` runs every check that CI runs: yamllint, ansible-lint, `tofu validate` / `tofu fmt` for `tower`, a zizmor audit of the validation workflow, `ci/n8n-versions-check.sh`, which fails unless web3's n8n and -`n8nio/runners` images are pinned to the same version, and +`n8nio/runners` images are pinned to the same version and the n8n sandbox +service API, runner and sandbox images to the same release, and `ci/headscale-check.sh`, which runs the headscale image pinned in `tower/containers/headscale/docker-compose.yml` (`configtest`, `policy check`) against the committed config and policy and needs docker. Run it before pushing; diff --git a/ci/n8n-versions-check.sh b/ci/n8n-versions-check.sh index a6c56a8c..588c6a98 100755 --- a/ci/n8n-versions-check.sh +++ b/ci/n8n-versions-check.sh @@ -4,6 +4,10 @@ # n8n image, and .github/workflows/n8n-sync-runners.yml then pins the runners # to match, so this check fails a pull request until that has happened. # +# It also fails unless the n8n sandbox service API, runner and sandbox images +# are on the same release: they are only supported together, and Renovate can +# open (and automerge) a group PR before all three have been published. +# # Usage: ci/n8n-versions-check.sh [COMPOSE_FILE...] set -euo pipefail @@ -12,9 +16,10 @@ if [ "$#" -eq 0 ]; then set -- web3/containers/n8n/docker-compose.yml fi -# tag FILE IMAGE: the tag of IMAGE pinned in FILE, without the digest. +# tag FILE IMAGE: the tags of IMAGE pinned in FILE, without the digest, one +# per distinct tag. The sandbox image is set through an environment variable. tag() { - sed -nE "s#^[[:space:]]*image:[[:space:]]*$2:([^@[:space:]]+).*#\1#p" "$1" + sed -nE "s#^[[:space:]]*(image|SANDBOX_RUNNER_DOCKER_SANDBOX_IMAGE):[[:space:]]*$2:([^@[:space:]]+).*#\2#p" "$1" | sort -u } status=0 @@ -30,5 +35,18 @@ for compose in "$@"; do else echo "$compose: n8n and task runners both at $n8n" fi + + api=$(tag "$compose" 'ghcr\.io/n8n-io/n8n-sandbox-service-api') + runner=$(tag "$compose" 'ghcr\.io/n8n-io/n8n-sandbox-service-runner-dind') + sandbox=$(tag "$compose" 'ghcr\.io/n8n-io/n8n-sandbox-service-sandbox') + if [ -z "$api" ] || [ -z "$runner" ] || [ -z "$sandbox" ]; then + echo "$compose: could not find the sandbox service API, runner and sandbox images" >&2 + status=1 + elif [ "$api" != "$runner" ] || [ "$api" != "$sandbox" ]; then + echo "$compose: sandbox service images differ: API ${api//$'\n'/ and }, runner $runner, sandbox $sandbox" >&2 + status=1 + else + echo "$compose: sandbox service API, runner and sandbox all at $api" + fi done exit "$status" diff --git a/renovate.json b/renovate.json index 23a009bf..b8bfc7ee 100644 --- a/renovate.json +++ b/renovate.json @@ -108,10 +108,29 @@ "ghcr.io/maathimself/mailflow-frontend", "ghcr.io/maathimself/mailflow-backend", "ghcr.io/tailscale/tailscale", - "ghcr.io/thundersquared/n8n" + "ghcr.io/thundersquared/n8n", + "ghcr.io/n8n-io/n8n-sandbox-service-api", + "ghcr.io/n8n-io/n8n-sandbox-service-runner-dind", + "ghcr.io/n8n-io/n8n-sandbox-service-sandbox", + "dunglas/frankenphp", + "ghcr.io/tashfeenahmed/freellmapi" ], "matchUpdateTypes": ["patch", "digest", "pinDigest"], "automerge": true + }, + { + "description": "Also automerge minor updates for these images. Same caveats as the rule above.", + "matchDatasources": ["docker"], + "matchPackageNames": [ + "ghcr.io/maathimself/mailflow-frontend", + "ghcr.io/maathimself/mailflow-backend", + "ghcr.io/n8n-io/n8n-sandbox-service-api", + "ghcr.io/n8n-io/n8n-sandbox-service-runner-dind", + "ghcr.io/n8n-io/n8n-sandbox-service-sandbox", + "ghcr.io/tashfeenahmed/freellmapi" + ], + "matchUpdateTypes": ["minor"], + "automerge": true } ], "customManagers": [