Skip to main content

Updating workers and the version policy

A self-hosted worker carries its own copy of every workflow step. When Blokkio adds a step, or a new version of a step, a worker built before that release can't run it. Blokkio knows which release each worker runs and which steps it can run, so a step only goes to a worker that can run it, and you get a clear message when one needs updating.

What Blokkio knows about each worker​

Every worker reports, about every 30 seconds:

  • Its release, for example 1.5.0: the Blokkio release its image was built from. The platform and the app report the same kind of number, so you can compare them directly.
  • The steps it can run: every step and every version of it, for example If / Else v1 and If / Else v2.

Settings → Workers shows this for each worker:

You seeWhat it means
The release, e.g. 1.4.2The release the worker runs.
Update availableA newer release is out. The worker still works.
Update requiredThe worker is older than the oldest release Blokkio supports. It keeps getting jobs until the date shown, then stops.
Too old · no jobsThe date has passed. The worker gets no jobs until you update it.
Can't run …Steps this worker can't run because they were added or changed after its release.

Click the badge to see the steps it can't run and the exact update steps for Portainer, docker run and Docker Compose.

Releases​

Every Blokkio release publishes the worker image ghcr.io/blokkio/worker with three tags:

TagMoves?Use it for
1.6.0NeverYour workers. Pin this; you decide when to change it.
1.6To each 1.6.x patchGetting fixes automatically without new features.
latestTo every releaseAutomatic updates only.

Each image runs on linux/amd64 and linux/arm64, is signed, and carries an SBOM (the list of every package in it). What changed in each release, including the steps and step versions it adds, is in the changelog.

The stacks Blokkio shows under Add worker and the generic worker-stack.yml pin the release with one variable, BLOKKIO_WORKER_VERSION. Kubernetes uses the chart's image.tag.

Updating a worker​

Updating keeps the worker's key, name and pool. The worker reconnects by itself and Settings → Workers shows the new release within a minute. Jobs that were running when you stopped it are handed to another worker (or to this one when it's back).

Portainer​

  1. Open Stacks and the stack of the worker.
  2. Click Editor. Under Environment variables, set BLOKKIO_WORKER_VERSION to the new release, for example 1.6.0 (add it if it isn't there), or change the number at the end of the image: line.
  3. Click Update the stack.

Docker Compose​

In the folder with the worker's docker-compose.yml, set BLOKKIO_WORKER_VERSION=1.6.0 in .env (or change the number in the image: line), then:

docker compose pull
docker compose up -d

docker run​

docker pull ghcr.io/blokkio/worker:1.6.0
docker rm -f blokkio-worker-homelab
# Start it again with the command you used when you added it, ending in the new image:
docker run -d --name blokkio-worker-homelab --restart unless-stopped \
-e Worker__ApiUrl=<API address> -e Worker__ApiKey=<worker key> \
ghcr.io/blokkio/worker:1.6.0

Kubernetes (Helm)​

helm upgrade blokkio-worker ./Worker/k8s/self-hosted/helm --reuse-values --set image.tag=1.6.0

Updating automatically​

If you'd rather not think about it, let Docker update the worker for you. Use the :latest tag for this (or 1.6 for patches only), with pull_policy: always in the stack.

  • Portainer: in the stack, turn on GitOps updates / Automatic updates with Re-pull image, or use a stack webhook from your own scheduler.

  • Watchtower: run Watchtower next to the worker. To limit it to the worker, start the worker with the label com.centurylinklabs.watchtower.enable=true and Watchtower with --label-enable:

    docker run -d --name watchtower --restart unless-stopped \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower --label-enable --interval 3600

Pin a release (for example :1.6.0) instead when you want to choose the moment yourself.

Check the image signature​

Each release image is signed in GitHub Actions with Sigstore cosign (keyless). To check that an image really comes from Blokkio's release workflow before you run it:

cosign verify ghcr.io/blokkio/worker:1.6.0 \
--certificate-identity-regexp '^https://github\.com/Blokkio/Backend/\.github/workflows/release-worker\.yml@refs/tags/v' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com

To see the SBOM (every package and its version) or how the image was built:

docker buildx imagetools inspect ghcr.io/blokkio/worker:1.6.0 --format '{{ json .SBOM }}'
docker buildx imagetools inspect ghcr.io/blokkio/worker:1.6.0 --format '{{ json .Provenance }}'

To run only that exact image, pin it by digest (ghcr.io/blokkio/worker@sha256:…, listed on each release), or enforce signatures in Kubernetes with a policy controller such as Kyverno or Sigstore's policy-controller.

When a worker is too old​

A step it can't run. When a workflow reaches a step that none of the online workers in its pool can run, the step fails straight away with a message that names the worker, the step and the release to update to, for example:

homelab-worker needs updating to run If / Else v2. Update it to Blokkio 1.5.0 and restart (Settings → Workers shows how), or run the project on hosted workers.

If another worker in the pool can run the step, that worker takes it and nothing fails. A worker never runs a different version of a step than the one in your workflow: an old worker doesn't quietly run If / Else v1 for an If / Else v2 step.

Before you publish. The editor's pre-flight checks warn about the same thing (under Problems), so you can update the worker before a run fails.

The oldest supported release. From time to time Blokkio raises the oldest worker release it supports. Workers older than that:

  1. get a warning first: Update required in Settings → Workers, and workspace administrators get an in-app notification and an email saying which workers to update and by when;
  2. after the date, stop getting jobs. Settings → Workers shows Too old · no jobs, the worker's log says why, and administrators are told once more. Updating the worker brings it back straight away.

Workers built before Blokkio 1.5 don't report which steps they can run. They keep working until the oldest supported release passes them, but update them to get the checks above.

The version policy​

  • Releases. Blokkio, its app and its worker image share one release number. A worker image tagged 1.5.0 reports 1.5.0.
  • Step versions. Each step has its own version (If / Else v2). A change in what a step does or what settings it takes always gets a new step version; the existing version never changes behaviour. Your saved workflows keep the version they were built with, so they behave the same on every worker and on Blokkio's hosted workers.
  • Old step versions stay. A new step version doesn't remove the old one: workflows that use it keep running, on new and old workers alike.
  • Release notes (changelog) list the steps and step versions each release adds, so you can see when a worker update is needed.
  • Notice. When Blokkio raises the oldest supported release, the date is announced in the changelog and by email at least two weeks ahead.