Waymaker Host

Every Branch Gets Its Own Copy

Learn about Every Branch Gets Its Own Copy in WaymakerOS.

BranchesLive and Staging

Every branch gets its own copy of the whole Solution: its front end, its back end and its data. Build on a branch, or in a worktree on your machine, and nothing you do there touches Live. Merge it, and Host releases the change in order.

You'll see every copy on the Solution's home page, in the Branches section.

Open a pull request, get a copy

Open a pull request on one of the Solution's repositories and Host builds that branch as its own copy:

  • Its own address, for your organization only. The copy runs at its own web address, so you can open it and test it after signing in to Waymaker. A copy with real data is open only to the Solution's owners and releasers. A masked copy is open to every member of your organization. Anyone else, including someone who isn't signed in, a guest, or a pull request's author from outside your organization, is told the copy isn't available to them. See Preview environments.
  • Its own data. If the app has a database, the copy gets its own copy of the data. Your branch reads and writes that copy. Live's data is never touched.
  • Its own migrations. Database changes on your branch run on the branch's copy first, so you see a schema change working before it goes anywhere near Live.
  • Updated as you push. Push again to the same branch and the same copy is rebuilt.

When the pull request is merged or closed, its copy is removed.

Which data a copy gets

Who opened the pull request decides it:

  • A pull request from an owner or releaser of the Solution gets a real copy of the data.
  • Anyone else's pull request, a fork's included, gets a masked copy: a copy made from the Solution's masked branch, where names, emails, phone numbers and addresses were replaced with stand-ins (see Make copies from a masked branch). If the Solution has no masked branch, that copy gets no data at all.

Every copy has its sign-in data emptied. Nobody can sign in to a copy with a Live account, and no Live session or signing key ever reaches one. This applies to your own copies too. If Host can't confirm the sign-in data is gone, the copy gets no data at all.

Work on your machine

Working in a worktree on your laptop? Your branch can have its own copy of the data there too, so you never point your machine at Live.

The Waymaker tools on your machine (once released) read the git branch you're on, give it its own copy of the database, and write the address of that copy, plus the Solution's Staging values, into your local environment file. They only replace the lines they wrote. The commands are in the Solutions docs.

They refuse on your Live branch: Host won't hand out the Live database for local work. Switch to a feature branch first.

The Solution's home page counts these as "worktree copies on your team's machines". It never shows whose they are or what they're called.

Quiet copies are removed

A copy nobody has changed for a while is removed, so it doesn't keep costing you. By default that's after 7 days without changes. An owner can set it to anything from 1 to 90 days.

A pull request's copy counts as changed when someone pushes to its branch; opening it doesn't count. A worktree copy counts as changed whenever someone connects to it.

What a copy costs

Each copy that has its own data adds a small daily amount while it exists, and stops the moment it's removed. The Branches section shows each copy's cost so far, and a total. See Database Billing for the rates.

Make copies from a masked branch

By default, a copy's data comes from Live. You can choose a masked branch to make copies from instead, so even an owner's copy never holds real customer data.

  1. Create a branch of the Solution's database, from the database's branch switcher.
  2. Mask it with the Waymaker tools from your editor (how). Masking first shows what it would change, and only changes anything when you confirm. It overwrites those columns on that branch for good. Live is never touched. Masking finds personal data by column name, so a column with an unusual name (say, contact) is left as it is: check the preview before you rely on a masked branch.
  3. On the Solution's home page, under Branches, give the branch's id and choose Make copies from it.

Masking always runs on Host, whichever tool you start it from, and Host records it. Host only accepts a branch it has a record of masking. If the branch hasn't been masked, you'll see: "Mask that branch first. Previews copy from it, so it must not hold real customer data."

If the masked branch is deleted

If the masked branch is deleted, or is no longer recorded as masked, Host stops: new copies get no data at all until an owner chooses again. They never fall back to Live's data. The Solution's owners get one email, and the Branches section says "Masked copy unavailable: choose a new masked parent" until an owner picks a new masked branch, or chooses Copy from Live.

Turning it off

Owners can switch off Give every pull request its own copy on the Solution's home page. Pull requests then get no copy until it's switched back on. Copies that already exist stay until they go quiet or their pull request closes; to remove one now, use Remove in the app's Previews view.

Everyone else can see the setting, but only an owner can change it.

The Variables panel: Live and Staging

The Solution's settings have a Variables tab. It lists every variable in the Solution, its own and each tool's, and shows whether Live and Staging each have a value. It never shows a value: open a tool to see or change its own.

Missing in Staging means the variable has a value in Live and none in Staging. A Staging build of that tool would run without it, so set it in Staging before you rely on Staging. Missing in Live is the other way round: set it in Live before you release.

Next Steps