lazy documentationv0.94Contents

Running the product at any commit

Tasks exist to ship a product, and sometimes you want to look at the product itself: the default branch as it stands, a colleague's branch, or the exact commit a bug report names. A run is that — the project's app at one commit, started the same way a task's services are, without creating a task.

A run is not a task. It has no agent, no turns, no review and no pull request, and it never appears in task lists or task counts.

Where to find it in Lazy Teams

Every project has a Run page, next to Tasks in the project's menu. It has two ways to pick what to run:

Below them, the project's runs are listed, each with the exact commit it serves. Asking for a run that already exists takes you to it.

A run's own page has, from top to bottom:

Anyone on the project can do all of this. Team admins have nothing extra here; the Start services command a run uses is the project's, set under Settings → Configuration.

What a run checks out

You pick what to run in one of three ways:

Everything is checked against the project's remote. A branch that exists only on one machine, or a commit nobody pushed, is refused with a message saying so — it is somebody's work in progress. While the project is offline (lazy system offline, or offline = true under [remote]), nothing can be resolved and runs cannot be created or pulled.

Each run shows the exact commit it serves (its id, subject and date), and a branch run also shows how many newer commits the branch has, as of the project's last fetch.

There is one run per branch and one per commit, shared by everyone on the project: asking for a run that already exists takes you to it. Anyone on the project can start, stop, pull or remove it, and the run records who created it and who last pulled it.

In the dashboard

Open Runs in the dashboard's navigation (/runs):

A run's own page shows the commit it serves, how many newer commits its branch has, its services with links, Run services / Stop services / Stop environment, what is running in its environment and its output, Pull latest (branch runs only), Remove, and a Shell. A service that is starting has Open when it answers, which waits for it and then opens it. When Pull latest or Remove would discard changes, the files and commits are listed and nothing happens until you confirm.

Running services

A run has the same tools as a task's Services tab:

Nothing stops a run for being idle. Restarting the project's daemon stops every run's environment, as it stops tasks' environments; the run itself stays, and Run services starts it again.

A task's code and a run's name can never be the same, so a link always reaches the one it names: a run is refused where an open task already uses the name, and a task code is refused where a run uses it.

Pull latest, and changes made in a run

The run's checkout belongs to lazy, but people can change files in it through the shell. Lazy never throws those changes away without asking:

Environment, secrets and files

A run receives the project's environment entries and files that apply to every task. Entries a person selects per task do not apply to runs. When an admin adds, changes or deletes one of those entries, every existing run is given the new set at once, as tasks are. A run whose environment is already running picks the change up the next time that environment starts — Run services or Start the environment starts it afresh when its set changed.

What a run's environment holds — and what it does not

A run executes whatever code the commit contains, so its environment is built to hold as little as possible:

With Docker, each run is on a network of its own that tasks' environments cannot reach, and that cannot reach theirs. Network access to the outside world is not restricted, as for every environment lazy runs: a run is not a sandbox for untrusted code beyond what its container provides.

If the project's own image is still building, or failed to build, a run does not start on another image by itself: you can choose to run it on lazy's default image instead, and that choice stays with the run. In Lazy Teams the run's page says when the project's image is not ready and offers Use lazy's default image; once the project's image is ready, Use the project's image switches back; if the run's environment is running, it is started again on the project's image, which stops what was running in it.

Runs need a container runtime (Docker or Podman); a project on the host-process runner cannot run commits.