Skip to content

devlanes is in beta and not ready for production use.Report an issue

When a service fails

The checkout branch of myapp breaks its API while the main branch keeps running. On the same branch you then make a typo in the project file and change it while the lane runs.

On the branch, you add a line at the top of the API’s server that throws before the server listens.

api/server.mjs
throw new Error("checkout: the api is broken on this branch");
~/dev/myapp-checkout
$ devlanes restart api --no-ui
$ devlanes status

The restart waits for the API’s ready check, which never passes, so the API reads failed and lane 1 with it, while lane 0 on main keeps running. devlanes does not restart a failed service: it stays failed until you restart or stop it.

~/dev/myapp-checkout
$ devlanes debug errors

This prints each failed unit with the end of its log, here the API’s stack trace pointing at the line you added. devlanes logs api shows the whole log.

You take the line out again. The API still reads failed, because devlanes runs the ready check when it starts a service and not later.

~/dev/myapp-checkout
$ devlanes restart api --no-ui

This time the ready check passes and the API reads ready.

You misspell the lane’s domain in the API’s hostname.

devlanes.yaml
services:
api:
hosts: "api.${{ lane.domian }}"
~/dev/myapp-checkout
$ devlanes config check

The check names the file, the line and the column, and suggests lane.domain. You fix the line.

You give the API a log level.

devlanes.yaml
services:
api:
env:
LOG_LEVEL: debug
~/dev/myapp-checkout
$ devlanes status
$ devlanes reload --no-ui

The lane keeps running as it was, and its status says the config changed and names the API. The reload restarts the API alone, and the web app keeps running.

A start leaves running services alone and adds only those the lane lacks. A restart runs the services you name again from the file as it stands. A reload applies the difference between the file and what runs.

So far a person has typed every command. Next, a coding agent gets a worktree of its own and runs a lane there.