Promotion setup: from a pull request to stage and prod

Promotion moves a reviewed change from a Branch Environment to stage and then to prod, through Git. adops init writes three GitHub Actions workflows into your Project that do this for you. They only work after the one-time setup below, which adops cannot do for you because it needs admin rights on your GitHub repository and on your Server machines.

You do not need to know Git or Docker to follow this guide: every step is a command to copy and paste, or a setting to click. Your Assistant can run the commands for you.

Running prod on one machine? Run production on one VM adds what operating it needs: a Heartbeat to an outside monitor, the Disk Alert and Rollback.

What the workflows do

adops init writes these files into .github/workflows/ of your Project:

File Runs when What it does Where it runs
adops-pull-request.yml a pull request is opened or updated (opened, synchronize, reopened) adops validate, then adops run --all --branch <branch>: every Pipeline in that pull request's Branch Environment the stage Server (runner label adops-stage)
adops-pull-request.yml a pull request is closed or merged (closed) adops drop-branch <branch>: removes that Branch Environment the stage Server (runner label adops-stage)
adops-stage.yml a change is merged to main validates the new version, copies it into the stage Server's releases/<commit> and points current at it (adops server-release, which also deletes old release folders), reloads the Server's Pipelines and Schedules, then adops run --all --changed --env stage from current, which reruns only the Changed Steps the stage Server (runner label adops-stage)
adops-prod.yml a release is published the same as stage, for the release's tag, then adops run --all --changed --env prod from current, after a required reviewer approves the prod Server (runner label adops-prod, environment prod)

A pull request from a fork (a copy of your repository under someone else's account) is a Fork PR. It only gets adops validate, on a machine GitHub provides, with no access to your Servers or secrets. Its Branch run is skipped; to run it, a maintainer pushes the same change to a branch in your own repository.

A deploy reruns only what changed. For each Pipeline, --changed reruns from the first Step whose definition changed since that Environment's last successful run, plus every Step after it. A Pipeline with no changed Step is not run, and its Steps show unchanged in stage (or prod) in the log; if it has a Schedule, its next scheduled run refreshes its data. A Pipeline runs in full when it has no Schedule, when that Environment has no saved Step Fingerprints for it yet (its first run there, or on prod its first deploy after upgrading adops), when that Environment's block in adops.yaml (or the time zone or alert webhook) changed, or when it has a new accepted-change record. To rerun everything by hand, run this in the Server folder on that machine (use --env prod on the prod Server):

docker compose --profile server run --rm --no-deps dagster_daemon adops run --all --env stage --project /project/current

The first deploy to prod after upgrading adops creates two new tables in prod's adops schema: _adops_step_fingerprints and _adops_deploy_state. That deploy runs every Pipeline in full, because prod has no saved fingerprints yet; later deploys rerun only the Changed Steps. The prod Warehouse user already writes to that schema, so no new rights are needed.

If a validate fails, no file in the Server folder changes and the Server keeps running the last good version. A deploy never runs git in the Server folder and never restarts the Server's containers.

Before you start

You need:

In the commands below, replace these placeholders once, everywhere they appear:

Step 1 — Put the Project on the Server machine as a Git clone

Clone your repository once to get its files onto the machine. The workflows never run git in this folder: each deploy copies the new version into its own folder under releases/.

sudo mkdir -p <your-server-folder>
sudo chown <runner-user> <your-server-folder>
sudo -u <runner-user> git clone https://github.com/<owner>/<repo>.git <your-server-folder>

For a private repository, git clone asks you to sign in once. The workflows never fetch from GitHub on the Server: they hand the new version over from the runner's own checkout.

Then create the Server's .env from the example and fill in the real passwords for this machine's Warehouse, Sources and Targets:

cd <your-server-folder>
sudo -u <runner-user> cp .env.example .env
sudo -u <runner-user> nano .env

.env and the .adops/ folder stay in <your-server-folder> and are never committed: the Project's .gitignore already lists both. Warehouse secrets live only in each Server machine's .env. Never add them as GitHub secrets. Make sure .env sets DAGSTER_WEBSERVER_PORT (the example sets 3000): the stage and prod workflows read it to reload the Server. Set ADOPS_ENVIRONMENT to the Environment this machine runs: stage on the stage machine (the example's value) and prod on the prod machine. A prod machine left at stage runs stage's Schedules while its workflow deploys prod.

Plain Projects only: a Project made with adops init without --demo defines only the dev Environment. Add a stage Environment to adops.yaml (same shape as dev, pointing at the stage Warehouse) and merge it before you start the Server, or the Server and adops-stage.yml both fail. For prod, step 6 below comes first.

Before you start the Server, lay the folder out as release folders: do steps 2 and 3 of One-time move to release folders. The Server reads the Project from the current link, so it does not start without it.

Start the Server once:

cd <your-server-folder>
sudo -u <runner-user> docker compose --profile server up -d --build

Step 2 — Install a self-hosted runner on the Server machine

A self-hosted runner is GitHub's small agent program that runs workflow jobs on your own machine. Each Server machine gets one, with a label that says which Server it is:

Server Runner label
stage adops-stage
prod adops-prod
  1. On GitHub, open your repository, then Settings > Actions > Runners > New self-hosted runner. Choose Linux and your machine's architecture.

  2. On the Server machine, as <runner-user>, run the download and config.sh commands GitHub shows. When config.sh asks for additional labels, enter adops-stage on the stage machine or adops-prod on the prod machine. You can also pass the label directly:

    ./config.sh --url https://github.com/<owner>/<repo> --token <token-from-the-github-page> --labels adops-stage
    

    <token-from-the-github-page> is the one-time token shown on that GitHub page; it expires after one hour.

  3. Install and start the runner as a service, so it keeps running after you log out and after a reboot (from the runner's folder):

    sudo ./svc.sh install <runner-user>
    sudo ./svc.sh start
    sudo ./svc.sh status
    

    (GitHub: Configuring the self-hosted runner application as a service)

  4. Check that the runner user can use Docker. Every job runs adops inside the Server's image with docker compose run, so a runner user without Docker access fails every job:

    sudo -u <runner-user> docker compose version
    sudo -u <runner-user> docker ps
    

    If docker ps says "permission denied", add the user to the docker group, then restart the runner service:

    sudo usermod -aG docker <runner-user>
    sudo ./svc.sh stop
    sudo ./svc.sh start
    

A Mac stage Server (Postgres Warehouse only, see "Before you start"): choose macOS on the GitHub page, run config.sh as yourself, and skip the sudo and usermod parts above: the runner runs as your user, who can already use Docker. ./svc.sh install sets it up as a launch agent that starts when you log in, or run ./run.sh in a terminal for a trial.

The runner shows as Idle under Settings > Actions > Runners when it is ready. Use the label exactly as written (adops-stage, not stage): a job whose label matches no runner waits forever.

Step 3 — Set the Server folder variables on GitHub

The workflows read the Server's folder from a GitHub variable (not a secret) named ADOPS_SERVER_DIR. It is set twice, because stage and prod are different machines:

  1. For stage — a repository variable. Settings > Secrets and variables > Actions > Variables > New repository variable. Name: ADOPS_SERVER_DIR. Value: the stage machine's <your-server-folder>.
  2. For prod — an environment variable on the prod environment (created in step 5). On the prod environment page, under Environment variables, add ADOPS_SERVER_DIR with the prod machine's <your-server-folder>. A job that uses the prod environment reads this value instead of the repository variable with the same name.

Optional — ADOPS_PACKAGE. Only the Fork PR validate job installs adops itself, by default the exact version your Project was made with (adops==<version>). To make it install something else, such as a wheel file URL or a Git URL, add a repository variable ADOPS_PACKAGE with that pip install target. Leave it unset otherwise.

Step 4 — Keep fork pull requests from running on your Server

The workflow's fork check (head.repo.full_name != github.repository) sends Fork PRs to a GitHub machine. That check is not a security boundary on its own. A Fork PR can change the workflow file itself, and its changed version is what runs. What stops fork code from reaching your Server is GitHub's approval setting, which makes a maintainer look at a Fork PR before any workflow runs for it. Keep it on at its strictest:

Open Settings > Actions > General, then:

Before you approve a Fork PR's workflow run, check that it does not change anything under .github/workflows/.

(GitHub: Managing GitHub Actions settings for a repository)

Step 5 — Create the prod environment with required reviewers

A release deploys to prod only after a person approves it.

  1. Settings > Environments > New environment. Name it exactly prod, then Configure environment.
  2. Tick Required reviewers and add the people or teams who may approve a prod deploy (up to 6). Save.
  3. On the same page, add the ADOPS_SERVER_DIR environment variable from step 3.

When a release is published, the adops-prod.yml job waits until one of those reviewers clicks Review deployments > Approve and deploy on the workflow run. Without required reviewers, every published release deploys to prod at once.

On GitHub Free, Pro and Team, required reviewers work only on public repositories; a private repository needs GitHub Enterprise for them. (Tried 2026-11-27: on a private repository GitHub refuses with "Please ensure the billing plan supports the required reviewers protection rule", so create the environment without reviewers.) Without them, limit who can publish releases instead: only people with write access to the repository can.

(GitHub: Managing environments for deployment)

Step 6 — Turn on prod in adops.yaml

A plain Project's adops.yaml ships with the prod Environment commented out. Before the first release, uncomment the # prod: block (remove the # at the start of each of its lines), point it at the prod machine's Warehouse, Sources and Targets, and merge that change. A demo Project ships a prod that runs against the local Docker databases instead: point its host, port and database lines at the prod machine before the first release, and merge that change. The prod machine's .env holds the matching passwords.

Step 7 — Try it

The first push of a new repository to main starts no adops stage deploy, so it needs no runner yet. Until stage has run once, a pull request's Branch run has nothing in stage to compare with and rebuilds every Step of each Pipeline. Stage first runs when that first pull request is merged; from then on a Branch run rebuilds only the Steps that changed. A repository created on GitHub with a README and then pushed to is not a first push: that push may still start adops stage, so if no runner exists yet, cancel that run under Actions.

  1. Open a pull request from a branch in your repository. adops pull request runs on the stage Server; its log shows each Pipeline's Branch run.
  2. Merge it. A second adops pull request run drops the Branch Environment, and adops stage deploys to stage.
  3. Publish a release. adops prod waits for approval, then deploys to prod.

One-time move to release folders

From this version on, a deploy never changes the files a run in progress is reading. It copies the new version into its own folder, <your-server-folder>/releases/<commit>, then points a link named current at it in one step. A run reads the folder current named when it started, to the end, retries included. adops server-release does this, and it stops with ... has the old layout ... or ... is half moved ... until the Server folder has been moved once, by hand, as below. It changes no file when it stops.

  1. Make sure no run is in progress. On the Dagster page, open Runs: nothing may be Queued, Starting or Started. Wait for it to finish if it is.

  2. Copy the version the Server runs now into its release folder, and link the shared .env and .adops/ into it:

    cd <your-server-folder>
    commit=$(sudo -u <runner-user> git rev-parse HEAD)
    sudo -u <runner-user> mkdir -p .adops "releases/$commit"
    sudo -u <runner-user> sh -c "git archive HEAD | tar -x -C releases/$commit"
    sudo -u <runner-user> ln -s ../../.env "releases/$commit/.env"
    sudo -u <runner-user> ln -s ../../.adops "releases/$commit/.adops"
    
  3. Create the current link. It must be relative (releases/<commit>, not a path starting with /): the containers see the Server folder at /project, so an absolute link would point at nothing inside them, and adops server-release refuses it.

    sudo -u <runner-user> ln -s "releases/$commit" current
    
  4. Keep .env, .adops/, server/, docker-compose.yml and Dockerfile where they are, at the root of <your-server-folder>. Every version shares them. The other Project files at the root are no longer read; you may leave them.

  5. Point the Server at current. A Project made with this version of adops init already has ADOPS_PROJECT: /project/current in docker-compose.yml; skip to the command below. In an older one, under dagster_daemon: → environment:, change ADOPS_PROJECT: /project to ADOPS_PROJECT: /project/current here on the Server. In the Project repository, run adops upgrade and merge its pull request: it brings docker-compose.yml to the same ADOPS_PROJECT, so the next deploy does not stop with "This commit changes the Server config". Then recreate the containers once (no run is in progress, step 1):

    sudo -u <runner-user> docker compose --profile server up -d
    
  6. Check it with the next deploy: its log shows current: releases/<commit> for the new commit.

When a deploy changes the Server config

Dockerfile, docker-compose.yml and the server/*.yaml files at the root of <your-server-folder> are shared by every release and read when the containers are built and started, so a deploy never changes them. When a commit adds, removes or changes one of them, for example the pull request adops upgrade made for a new adops version, adops server-release stops with This commit changes the Server config: <files> and changes no file.

Do not edit these files by hand in the Project. Run adops upgrade in the Project repository and merge its pull request; then rebuild the Server with Upgrade a Server and re-run the deploy that stopped.

Which release folders a deploy deletes

After switching current, adops server-release deletes old release folders, keeping the newest 3, the one current names, and every folder a run in progress is reading. Each run records its folder when it starts. Two cases:

Each release folder is a full copy of the Project without .git, .env and .adops/, so the Server folder needs room for about 4 of them (the newest 3 plus the one being copied), more while long runs hold older ones. Check with du -sh <your-server-folder>/releases.

After a deploy: Schedules pick up the change by themselves

The stage and prod workflows reload the Server's Pipelines and Schedules after current points at the new release. A run already in progress keeps reading the release folder it started with, to the end, retries included; runs that start after the switch read the new one. The Dagster page shows the new version at once. The Dagster daemon, which starts scheduled runs, picks up new, removed or changed Schedules within about 60 seconds, because it refreshes its own copy every 60 seconds. Do not restart the Server to pick up a change: a restart kills runs that are in progress, which the reload exists to avoid.

When two runs want the same Warehouse: the Warehouse lock

Every run that writes to a Warehouse (a Branch run, a stage or prod deploy, a Schedule, adops accept-schema --branch, and adops drop-branch) first takes that Warehouse's Warehouse lock. Branch runs, accept-schema --branch and drop-branch use stage's Warehouse, so they share stage's lock. What the lock keeps apart depends on the Warehouse:

If the lock is held:

Turn on one Run Slot per Pipeline on an existing Server

adops init writes server/dagster.yaml once, so a Server made with an older adops still runs one run at a time on Postgres. To let different Pipelines run at once, run adops upgrade in the Project repository: it brings server/dagster.yaml to the version you installed. Merge its pull request, then rebuild the Server with Upgrade a Server.

The same file keeps a DuckDB Server at one run at a time, because adops tags every DuckDB run adops/serial. Before you restart, run adops validate: it refuses two Pipeline files with the same name: and two Pipelines that sync the same table from the same Source, because runs of different Pipelines would then share a lock identity or race on one raw table.

Backfill one table

When rows in a Source table changed without moving their cursor forward (a fix-up script, a late import), the next run does not see them. adops backfill reloads them without a Full Refresh:

adops backfill shop_sync orders --from 2026-02-01 --env stage

When the volume Check halts a run

In stage and prod, every Sync table has the built-in volume_anomaly Check (ADR-0021). Once a table has 5 or more past loads, it halts the run when a load writes at least 1,000 rows and more than 10 times the median of the table's last 10 loads, or, for a Full Refresh table whose median is at least 1,000, fewer than a tenth of it. An Incremental table never halts for loading few rows.

A halt does not undo the load. The rows are already in the Warehouse table; the halt only stops the Transform and the Reverse Sync from passing them on. Look at the table before deciding:

When two branches get the same Branch Environment

A Branch Environment's name is the branch name lower-cased, with every run of characters other than letters and digits turned into _. So feature/new-orders and feature-new/orders both become feature_new_orders, and two open pull requests on those branches share one Branch Environment: each Branch run overwrites the other's tables, and closing either pull request drops the Branch Environment of both.

To recover:

  1. Rename one of the branches so the names differ after that rule (for example feature/new-orders-2) and open a new pull request from it; close the old one. Closing it drops the shared Branch Environment.
  2. On the other pull request, open its latest adops pull request run and click Re-run jobs, so its Branch Environment is built again.

To clean up by hand instead, run this on the stage Server machine, with <branch> being either branch name, then rerun the remaining pull request's workflow as in step 2:

cd <your-server-folder>
sudo -u <runner-user> docker compose --profile server run --rm --no-deps dagster_daemon adops drop-branch <branch>

After a reboot: the Server starts by itself

The Server's containers have restart: unless-stopped, so Docker starts them again after the machine reboots or a container crashes. The daemon then marks any run the reboot cut off as failed and sends one alert for it. docker compose stop still keeps a container stopped.

adops init writes docker-compose.yml once, so a Server made with an older adops does not come back after a reboot and never rotates its container logs. Run adops upgrade in the Project repository: it replaces the x-logging block and the dagster_meta, dagster_daemon and dagster_webserver services with the current ones. Merge its pull request, then rebuild the Server with Upgrade a Server.

Back up the Server

A Server's state lives in .env, .adops/, server/, releases/, each Warehouse and the Dagster metadata database. To back it up, or to rebuild a Server on a new machine, see Back up and restore a Server.

Recorded trials

Date Where Result
2026-11-26 Stage Server on a Mac (OrbStack, Postgres Warehouse), runner run with ./run.sh, a fresh private demo repository, Server image built from a wheel PR → Branch run, merge → stage and drop on close all passed. The first deploy failed at the reload step: the workflows asked Dagster for the location adops.interface.server, but Dagster names it adops.interface.server:defs. Fixed the same day. After that, merge → stage passed (22 s), a pull request adding a dbt model got a Branch run that deferred the unchanged Sync to stage and built only the Transform (17 s), and closing it dropped its schemas. Not yet tried: release → prod, a Linux runner as a service, root-owned .adops/ files, a reload during a run in progress.
2026-11-27 Prod Server on an AWS m7i-flex.large VM (Ubuntu 24.04, 2 cores, 8 GB), runner installed as a systemd service, a fresh private demo repository, Server image built from a wheel Release → prod passed. v0.1.0 made the first prod deploy (26 s; prod Warehouse built, 20 rows written to shop_prod). v0.2.0 added a dbt model and a schedule: line: the deploy updated the folder although Dagster had left root-owned files in .adops/ and server/logs (Git ignores them), the reload picked up the new Schedule as RUNNING without a container restart, and prod built the model (25 s). Required reviewers were refused on the private repository (GitHub Free). Not tried: a deploy while a run is in progress.
2026-11-28 Stage and prod Server on one Mac (OrbStack, Postgres Warehouse, Server on port 3300), one runner run with ./run.sh carrying both labels adops-stage and adops-prod, a fresh private demo repository created empty on GitHub, release-folder layout, Project made with adops init --demo and Server image built from the local wheel adops-0.3.1-py3-none-any.whl of commit dbfb6b8 (--build-arg ADOPS_PACKAGE=/build/adops-0.3.1-py3-none-any.whl), with schedule: "0 3 * * *" added First push, first pull request, changed-only stage and prod deploys and a failed-then-fixed deploy all passed. The Project's adops-stage.yml held the first-push if: before the first push. First push of main: an adops stage run appeared with its deploy job skipped (7 s); the runner, online, took no job. First pull request: its Branch run rebuilt every Step (sync_shop, transform_shop, reverse_sync_customer_stats all passed, none deferred) and went green (23 s). Merge → stage's first deploy ran in full (25 s). A merge changing only dbt/models/customer_orders.sql: step sync_shop: unchanged in stage, Transform and reverse sync reran (26 s). A merge adding a failing dbt test: sync_shop: unchanged in stage, transform_shop: check_failed, reverse_sync_customer_stats: skipped, job failed (25 s); the fix, an exact revert to the last good tree, reran from transform_shop with sync_shop: unchanged in stage, job green (25 s). Server switched to ADOPS_ENVIRONMENT=prod: release v0.1.0 ran prod in full (27 s, no prod fingerprints yet); release v0.2.0, changing only customer_orders.sql, printed step sync_shop: unchanged in prod and reran Transform and reverse sync (33 s). Not tried: a deploy while a run is in progress, a Linux runner, separate stage and prod machines.
2026-11-28 Stage and prod DuckDB Server on one AWS m7i-flex.large machine (Ubuntu 24.04, 2 cores, 8 GB, 20 GB disk, made by scripts/trial-ec2.sh), switched by ADOPS_ENVIRONMENT; one runner installed as a systemd service with labels adops-stage and adops-prod; a fresh private demo repository created empty; release-folder layout; stage and prod Warehouses switched to DuckDB files under .adops/ (dev kept its Postgres Warehouse); Server image built from the local wheel adops-0.3.2-py3-none-any.whl of commit 0942a4b plus fixes 1 and 2 below All 7 checks passed, after two bugs found by the trial were fixed. Building the Server image took 67 s and raised disk used from 3.3 GB to 5.6 GB (df -h; docker system df failed on Docker 29); the idle Server used 1.4 GB memory. Peaks below are memory used / CPU (100% = both cores) / root disk used, from scripts/trial-sample.sh (the trial ran a version that read CPU with vmstat; the committed one reads /proc/stat). 1. PR → Branch run: pass. All three Steps built, none deferred (22 s); 2.0 GB / 71% / 5.7 GB. 2. Merge → stage: pass. The first deploy ran in full (33 s); 2.2 GB / 72% / 5.7 GB. 4. Two Scheduled stage runs: pass. A pull request adding schedule: "* * * * *" deferred every Step, its merge deploy printed every Step unchanged in stage, and Scheduled runs 14:36:09–14:36:15 and 14:37:04–14:37:08 UTC succeeded; the first one came about 3 minutes after the deploy; 2.3 GB / 100% / 5.7 GB. 5. Schedule and Branch run on one DuckDB file: pass after fix 1. With 2,000,020 rows in shop.customers, a Scheduled run took about 2.5 minutes. Scheduled run 14:52:07–14:54:47 held the lock: /proc/locks showed one FLOCK ADVISORY WRITE on warehouse_stage.duckdb.lock, held by its worker, while the Branch run's adops run --all --branch rounded-total had been waiting for 21 s. The Branch job started 14:52:30, waited about 2 min 17 s, and went green at 14:55:00 with 2,000,020 customers, 100 orders and 20 customer_stats rows in its Branch schemas; 3.5 GB / 100% / 7.5 GB. The first attempt failed with WarehouseUnreachable. Fix 1: the waiting run got the flock about 0.2 s before the previous holder's DuckDB connection had closed. After getting the lock, a run now also waits up to 10 seconds for DuckDB to be able to open the file (the trial's image waited up to the whole lock timeout; the limit was added afterwards, so that a file kept open by a program outside adops still fails fast). 6. kill -9 during a run: pass after fix 2. kill -9 of the run worker, the process holding the flock (found in /proc/locks and docker top), 60 s into a Scheduled run, during the Sync of the 2-million-row table. Afterwards no flock remained and a flock -n probe got the lock. The DuckDB file opened with every table readable. The killed run was FAILURE, none was left STARTED, and the daemon restart's server-recover marked nothing. The next run failed load failed. Fix 2: dlt had kept the killed run's unfinished load package, and the next pipeline.run loaded only that package and then crashed. The Sync now finishes a leftover package before loading new data. Retest: killed at 15:12:37 mid-Sync with the package left behind; the next Scheduled run, 15:13:04–15:17:49, went green with 2,000,020 rows; 3.2 GB / 100% / 8.8 GB (the 8.8 GB includes a second Server image during a rebuild). 7. Breaking Change accepted: pass. A dev run (from a Mac through an SSH tunnel) and a stage run recorded an added customers.nickname that no model uses. After it was dropped, stage's Scheduled runs failed with Breaking Change in customers: nickname dropped. adops accept-schema shop_sync customers in dev wrote the accepted-change record, its pull request's Branch run was green (27 s), and the merge deploy (33 s) and the following Scheduled runs were green; 2.6 GB / 100% / 8.8 GB, read from the log of check 5's sampler, which was still running, cut to this check's window, 15:18–15:29 UTC, after the 2-million-row test data was deleted (the dev runs were on the Mac and are not counted). Merging the check-5 pull request next printed step sync_shop: unchanged in stage and reran only the Transform and reverse sync. 3. Release → prod: pass. Clean stop, ADOPS_ENVIRONMENT=prod, up -d --no-build. Release v0.1.0, made in the trial repository only, deployed prod green (15:31:59–15:32:39 UTC). The deploy printed orders 0 rows because prod's first Scheduled run, a minute earlier, had already loaded the 100 orders. The prod DuckDB file held 20 customers, 100 orders and 20 customer_stats rows. Prod had never seen nickname, so the record had nothing to accept there; 2.4 GB / 100% / 8.6 GB. No big bug was found: no run stuck in STARTED, no corrupt DuckDB file, no dlt type-mapping failure. Not tried: separate stage and prod machines, a machine with less than 8 GB, a Warehouse much larger than 2 million rows, a kill during dbt (both kills landed in the Sync).
2026-12-01 to 2026-12-02 Soak Trial on an AWS m7i-flex.large machine (Ubuntu 24.04, 2 cores, 8 GB, 19 GB root disk, made by scripts/trial-ec2.sh, 72 h shutdown armed). A stage Server ran on a Postgres Warehouse for about 24 h, 2026-12-01 05:00 to 2026-12-02 05:00 UTC, cut from a planned 48 h by the user. It had two Pipelines on one shop Source: events_sync every 7 minutes and shop_sync every 10 minutes, sharing one dbt project. A writer added Source rows every minute, alerts went to a local receiver, and the sampler took readings every few seconds. Image built from the wheel adops-0.4.1.dev1 of commit c0f2b8c, upgraded in place to dev2 (bd8e290), dev3 (b88c6ef) and dev4 (59464e5). Then a short DuckDB session on the same machine. Faults injected with scripts/soak/faults.sh and checked with scripts/soak/check_invariants.py (five Invariants) 9 of 10 Faults passed; backfill-kill failed with a big bug; 3 small bugs fixed. Switching the Server to DuckDB found a second big bug. Run counts: events_sync 209 of 216 expected ticks succeeded (96.8%), shop_sync 137 of 144 (95.1%), no run left STARTED. 1. source-stop: pass. The Source was stopped under a scheduled run, which waited out its 300 s retry and ended SUCCESS with no alert. 2. reboot-in-retry: pass after fix 1. First try: no container came back after the reboot. Fix 1 (bd8e290): restart: unless-stopped in both compose templates. Rerun: the Server came back by itself, the cut-off run was marked failed with one alert, and the next ticks succeeded. 3. kill-worker: pass after fix 2. kill -9 of a run worker with 300,000 orders rows pending: the run went FAILURE with 0 alerts. Fix 2 (b88c6ef): a sensor alerts once for a run whose process stopped before it finished. Rerun: the checker first read the alerts before the sensor's alert arrived (fixed in the harness, a9f13e8); the recheck passed with 1 alert and a green next tick. 4. backfill-overlap: pass. A backfill waited for a scheduled run, and a tick waited for a backfill; both passed. 5. backfill-kill: fail, big bug. docker kill of an adops backfill left its Dagster run STARTED, so the Schedule skips the Pipeline with no alert until dagster_daemon restarts. All five Invariants passed. 6. overlap-old-release: pass. A run of the old release was held at its Transform through 3 newer releases: releases/local was kept, the run and the deploy passed, and the saved fingerprints equal the newest release. 7. overlap-queued-run: pass. A scheduled run of the old code, queued behind a deploy, ended SUCCESS, and the next tick ran the new release. 8. backup-under-load: pass. See the 2026-12-01 Recorded trial in Back up and restore a Server. 9. disk-full: pass. The root disk was filled for 11 minutes: 2 runs failed with 1 alert each, and the next ticks were green once the file was removed. 10. DuckDB deploy-while-running: pass, after a big bug in the switch to DuckDB. The Postgres Server was stopped with no run in progress, and the stage block was switched to DuckDB and released (3465903; release shas here are commits of the soak Project's deploy checkout, not of adops). That release's own deploy run failed, because adops run --all ran events_sync first and its Transform needs shop_sync's tables. The first shop_sync load then failed: Table with name orders does not exist. The old dlt state in .adops/dlt/stage had made dlt skip creating raw_shop.orders. After that state and the DuckDB file were moved aside, both Pipelines loaded in full. With 2,000,000 extra customers rows, scheduled run 25d9b7b4 held the DuckDB lock. The deploy of release ce398a9 waited 143 s for it and then passed, the held run ended SUCCESS, and the next tick ran ce398a9. The Invariant Checker had to be rerun between ticks to get five PASS lines. Resources (scripts/trial-sample.sh trend): peak memory 2,650 MB; memory +4.7 and +3.9 MB/h in the two no-Fault windows (19:00–00:00 and 00:00–05:00 UTC); disk peak 18,752 MB, during disk-full. Stores still growing in those windows: dlt loaded packages +1.6 MB/h, fixed by fix 3 (59464e5, dlt's loaded packages removed after each Sync); container logs +0.2 and +0.3 MB/h, fixed in c63b367 (log rotation, 3 × 10 MB); Dagster metadata volume +0.7 and +0.6 MB/h and run logs +0.3 and +0.2 MB/h, a big bug. TransformBusyError 0 and dlt _dlt_* first-creation race 0 in the run logs. Harness fixes, not adops bugs: 3cdeba2, a9f13e8, 0015cc2, 8c9d22b, f68cad0, 80fca30, 1019327; playbook fix edbe07e. Big bugs deferred: a killed CLI run left STARTED, no retention for Dagster history, and switching a Server's Warehouse in place (briefs below). Teardown: scripts/trial-ec2.sh down deleted the machine, its security group, key pair and Budget, and its leftovers report printed No adops-trial resources are left.; a second run printed the same. Not tried on the soak machine: 48 h of growth, a truly simultaneous first load of two new Pipelines, a pending dlt package across a release switch, a dbt build near the 30-minute dbt Lock wait, and a DuckDB Server backup under load. The simultaneous first load and the dbt Lock wait were later tested on a local Postgres (answers 1 and 7 below).

The 2026-11-26 and 2026-11-27 trials used the earlier deploy, which moved the Server folder with git checkout and so could change files under a run in progress. The 2026-11-28 trial used the release-folder deploy (copy into releases/<commit>, switch current), built for that case. The 2026-12-01 Soak Trial tried a deploy during a run in progress on both a Postgres and a DuckDB Server.

What the 2026-12-01 soak answered

Twelve questions were left open by the parallel-Pipelines work (horizon 24). Each answer below names the Fault, figure or file in soak-evidence/horizon-25/ it rests on. That folder is git-ignored, because raw outputs can hold hostnames, IPs or .env values.

  1. Can two brand-new Pipelines race on dlt's own first creation of _dlt_loads, _dlt_version and _dlt_pipeline_state in a fresh raw_<source>? Not seen: 0 run-log lines and 0 runs with a duplicate-key or already-exists error on a _dlt_ table in the 24 h (13-run-log-counts.txt). The soak itself loaded the two Pipelines one after the other. Horizon 32 forced the truly simultaneous first load on a local Postgres, with both loads held at the same point before creating the schema and again before creating the tables (tests/unit/infrastructure/test_parallel_runs_postgres.py). It failed: the second load stopped with duplicate key value violates unique constraint "pg_namespace_nspname_index" on raw_shop. The losing load is now loaded again (dlt documents this retry as safe). With that fix both loads pass, and the schema holds each data table and _dlt_loads, _dlt_version and _dlt_pipeline_state exactly once. On DuckDB every run takes the file lock, so the race cannot happen there.
  2. After a Source stop, a full disk or a reboot, can the dlt state restored from the Warehouse hold a cursor that is older than the loaded data (duplicates) or newer (skipped rows)? Not seen. no-duplicate-primary-keys and cursor-never-moves-back passed after source-stop (02-source-stop.txt), reboot-in-retry (03-reboot-in-retry.rerun-1300.txt), kill-worker (04-kill-worker.recheck.txt) and disk-full (10-disk-full.txt).
  3. After a load is killed with a dlt package pending, does the next run replay it, drop it or fail, and does the cursor agree? The next run finishes the leftover package (the 2026-11-28 fix 2) and passes. In kill-worker the run worker was killed with 300,000 new orders rows pending; the next shop_sync tick succeeded, and both data Invariants passed (04-kill-worker.recheck.txt). The killed run itself ended FAILURE with no alert, which was a small bug, fixed in b88c6ef. Since horizon 32 the next run replays such a Pending Load Package only when the Warehouse has its tables, and otherwise drops it, prints one Dropped an unfinished load for <table> line and reads those rows again. Unit tests cover a package pending across a release switch (replayed, no row lost or doubled) and one pending for a new DuckDB or Postgres Warehouse (dropped, every Source row loaded), in tests/unit/infrastructure/test_dlt_sync.py. A live release switch with a package pending was not tried.
  4. h17 overlap: a scheduled run on the old release finishes after a changed-only deploy. Does it save Step Fingerprints that no longer match? No. overlap-old-release held an old-release run at its Transform through 3 newer releases. releases/local was kept while the run used it, the run ended SUCCESS, the deploy run passed, and the saved fingerprints of both Pipelines equal the newest release c41ffdc (07-overlap-old-release.rerun-1651.txt).
  5. h17 overlap: plan_deploy reads fingerprints before it takes the lock. Closed in code since horizon 18 (34cf2ab): the deploy run now builds its Deploy Plan inside the Pipeline Lock. The case still open was tested in its place, a scheduled run of the old code queued behind the deploy's lock. It ended SUCCESS, the fingerprints equal the new release, and the next tick ran the new release (08-overlap-queued-run.txt).
  6. Deploy while a run is in progress on a DuckDB Server. Tried on 2026-12-02 and passed. After the switch to a DuckDB stage Warehouse, 2,000,000 rows were added to shop.customers, and scheduled shop_sync run 25d9b7b4 held the DuckDB file lock from 06:50:06 UTC. Release ce398a9 was made, the Server reloaded, and the deploy run waited for the lock. It exited 0 after 143 s, the held run ended SUCCESS, and the next tick (07:00:08) carried adops/release ce398a9 (18-duckdb-deploy-while-running.txt). The checker run right after the Fault left 3 Invariants NOT CHECKED, because runs kept the file locked. Rerun between ticks, all five passed (18-duckdb-deploy-while-running.recheck.txt). No file-lock release race was seen.
  7. Does a long dbt build push other Pipelines' Transforms past the 30-minute dbt Lock wait into TransformBusyError? Not in 24 h: 0 TransformBusyError lines in the run logs (13-run-log-counts.txt). The dbt builds there took seconds. Horizon 32 tested the wait itself on a local Postgres, with the wait shortened to a few seconds: while another process holds the dbt Lock, a Transform fails with TransformBusyError when its wait runs out and never starts dbt, and it builds once the holder lets go within the wait (tests/unit/infrastructure/test_parallel_runs_postgres.py). The wait stays 30 minutes and is still not retried. How often real builds come near it depends on how long the Project's dbt builds take.
  8. Can a Sync from Pipeline B that loads raw tables while Pipeline A's Transform reads them give half-loaded inputs? Not seen in the Server runs. The only 2 STEP_FAILURE events in 24 h were both during disk-full (13-run-log-counts.txt), and load-records-match passed after every Fault. A related effect was seen outside adops: a Postgres query that started while dbt swapped in a rebuilt table read it as empty. The soak's backup check now counts rows only between runs (80fca30). Horizon 32 forced the overlap on a local Postgres: a Sync was held just before it committed its load while another Pipeline's Transform built from the same raw table (tests/unit/infrastructure/test_parallel_runs_postgres.py). An incremental load passed: it is merged in one transaction, so dbt read the whole old table. A full refresh failed: dlt empties the table and commits that before it inserts the new rows, so dbt read 0 rows. Since then a full refresh on Postgres is loaded into the staging schema and replaces the table in one transaction; dbt now waits for that transaction and then reads the whole new table. The cost is a second copy of each full-refresh table in raw_<source>_staging.
  9. If a reboot hits during the 300 s retry wait, is the result FAILURE, one alert and a green next tick? Yes, once the Server comes back. On the first try it did not come back: no container had a restart: policy, so a reboot needed a manual Server start (03-reboot-in-retry.txt). That small bug was fixed in bd8e290 (restart: unless-stopped). Existing Servers need the compose edit in "After a reboot" above (edbe07e). On the rerun the Server came back by itself, the cut-off run was marked failed, one-alert-per-failed-run passed, and the next ticks succeeded (03-reboot-in-retry.rerun-1300.txt). A crash-surviving resume tag is not warranted: the loss is one failed run and its alert.
  10. Does a backfill that overlaps a scheduled run, or a crash mid-backfill, leave the cursor rewound? No. In backfill-overlap the backfill waited for the scheduled run, a tick waited for the backfill, and both passed (05-backfill-overlap.rerun-1545.txt). In backfill-kill the cursor did not stay below its pre-backfill value. Big bug, not fixed: a killed adops backfill (or adops run) leaves its Dagster run STARTED, so the Schedule skips that Pipeline with no alert until dagster_daemon restarts (06-backfill-kill.finding.md).
  11. Does the backup playbook still restore a consistent Server when the backup is taken during parallel runs? Yes at the database level: see the 2026-12-01 Recorded trial in Back up and restore a Server (09-backup-under-load.rerun-1821.txt). Automated backups are not warranted as an adops feature by this soak. The playbook's dump commands worked during runs, so a cron job running them is enough. A DuckDB Server still has to stop for its copy.
  12. Do the Postgres Server's memory and disk stay bounded over days? Only 24 h were run (12-sampler-trend.txt). Peak memory was 2,650 MB, and it grew +4.7 and +3.9 MB/h in the two no-Fault windows (12b-sampler-trend-quiet.txt). dlt's loaded packages grew 1.6 MB/h and were fixed in 59464e5, container logs grew +0.2–0.3 MB/h and were fixed in c63b367, and Dagster run history (+0.6–0.7 MB/h) and run logs (+0.2–0.3 MB/h) are a big bug, below. The 18,752 MB disk peak is the disk-full Fault's fill file.

A retry e2e test is not warranted now. source-stop drove a real retry on the Server: the run waited out the 300 s retry wait with the Source back and ended SUCCESS (02-source-stop.txt), and the retry logic has unit tests. The CI e2e jobs run up to 20 minutes, and a 300 s wait would take a large share of that.

Big bugs for the next horizon: