Skip to content

chore(release): 0.4.3 - #3

Merged
fransallen merged 24 commits into
mainfrom
dev
Nov 18, 2026
Merged

fransallen merged 24 commits into
mainfrom
dev

Conversation

@fransallen

Copy link
Copy Markdown
Contributor

Pyo 0.4.3: everything on dev since 0.4.2, HTTPS desktops on the tailnet, signed install scripts on pyo.dev, the installer's address list, the latest sandbox images and the version bump.

The dashboard bundles pyo-templates' catalog as catalog.json, and
nothing noticed when it fell behind. CI and the release now build
pyo-templates' main and fail when catalog.json doesn't match it, saying
how to refresh it.
The desktop image serves the screen with voxl on 6080. vnc.html, where
noVNC's page was, goes on to voxl's page, so desktopUrl stays as it is.
The comments and the template's API description say voxl now, and that
voxl's page needs HTTPS or localhost to decode video.
AWS, Google Cloud, Azure, Alibaba Cloud and Tencent Cloud map a VM's
public IP to it with 1:1 NAT, so the IP isn't on its network card and
Pyo never set up https://pyo.<ip>.nip.io there.

- locate.rs asks the cloud's metadata service for that IP (each cloud
  at once, a second at most; Oracle's trace IP, as its metadata has
  none) and looks again after a reboot, when a cloud may change it
- Pyo tries its public dashboard on that IP too: Let's Encrypt issuing
  the certificate is the reachability check, never a request from the
  server to itself. Issued, the IP counts as the server's own and free
  domains go there. Refused, cert-manager retries hourly and up, and
  the agent makes the certificate again after 6 hours at most
- a pyo-public-nat Service puts those IPs' ports 80 and 443 on the
  proxies inside the cluster (externalIPs), so cert-manager's self
  check and in-cluster requests don't depend on the cloud's hairpin
- the dashboard says which ports to allow while the IP is blocked
The install, connect, join, sandbox and pyo-up scripts drew each step
over the last one and printed "==>" headings in bold even into logs.

The shared pyo:progress block now keeps finished steps on screen: a
ticking "→ Downloading k3s… 0:12" becomes "✓ Downloaded k3s 0:12", a
failure "✗ Downloading k3s" before the error, and a wait that goes on
by itself "● Starting the dashboard". say, ok_line and dot_line come
with it, so headings, last lines and status dots look the same in
every script. Colors only on a terminal without NO_COLOR. In a log,
nothing is drawn over and each line comes once.
The installer only knew a public IP on the network card, so a cloud VM
behind 1:1 NAT showed no HTTPS address, and it picked the first private
address it saw, docker's or k3s's included.

host_units now writes addresses.sh, which the installer, pyo-up and
pyo-reset-login share. It prints one aligned line each, in color on a
terminal:

  ➜  Public:   https://pyo.<ip>.nip.io
  ➜  Tailnet:  http://<tailscale ip>:8000
  ➜  Network:  http://<private ip>:8000
  ➜  Local:    http://localhost:8000

- Public: the IP on the card, else the one the cloud's metadata names.
  The installer reads cert-manager's certificate and challenges, stops
  waiting as soon as Let's Encrypt issued or refused, and waits 90
  seconds at most. Refused, the line says which ports to allow. Not
  there yet, that it comes by itself. Never plain HTTP on that IP
- Tailnet: Pyo's tailnet name, else this machine's Tailscale IP when
  Pyo answers on it
- Network: the default route's card, never a docker, k3s, libvirt,
  multipass or LXD bridge
- run again, the installer tries a refused certificate again (15
  minutes after the last try at the soonest)
pyo.dev now serves each release's scripts at pyo.dev/v/<version>/,
checked against its signed release.json. Commands that fetch scripts from
pyo.dev use this release's there, instead of the latest one with
--version.

connect.sh, join.sh and sandbox.sh get run_release: with --version naming
another release, they run that release's own script from
pyo.dev/v/<version>/. Pyo 0.4.2 and earlier give the latest script their
--version, so their commands keep running their own release's scripts.
The release workflow writes each script's release on its
pyo:release-version line. Pyo's own copy leaves it empty and never runs
another.
--release release.json adds an "Install scripts" section with each
script's SHA-256, as the signed release.json lists them, and a link to how
to check one.
release.json lists the SHA-256 of each install script the release
publishes (`scripts`), so they're signed with it. release-manifest.ts
--scripts writes the scripts as the release publishes them, with the
version on the pyo:release-version line of connect.sh, join.sh and
sandbox.sh, and the release uploads those. Pyo reads release.json as
before: it ignores the new field.

For immutable releases, the release goes up as a draft with every asset,
the install scripts in it are checked against release.json, and only then
is it published. Run again before that, the job replaces the draft's
assets. A release that's published already is left as it is. The notes
list each script's sum.
A new job calls pyo-web's Workers Builds deploy hook, the secret
PYO_WEB_DEPLOY_HOOK, so pyo.dev serves the new release's install scripts
within minutes. When it fails, running that job again leaves the release
as it is.
Enabling the host timers printed "Created symlink …" between the
steps. systemctl -q leaves only errors.
AWS and Alibaba Cloud take a token first. Where nothing answers that
request (not a cloud), the address lookup asked for the address anyway
and took three seconds. Now it stops, and takes one.
A new install's dashboard on the public IP waits for the HTTPS issuers,
which the agent added up to 30 seconds after cert-manager came up. For
its first two minutes it now looks every 5 seconds.
pyo-sandbox-images' Dockerfiles copy THIRD_PARTY_NOTICES.md from the
repo's root as the named context `notices`. PYO_UP_SANDBOX_IMAGES=local
builds pass it, and a change to it builds the images again.
The desktop's voxl decodes video with WebCodecs, which browsers offer
only on HTTPS pages, and sandbox servers' daemons answer plain HTTP on
their tailnet addresses. Sandboxes' web pages now open at a tailnet
name of Pyo's own, sandboxes.<tailnet>.ts.net, which the tailnet
Gateway sends to Pyo's API like the dashboard's. The API passes each
request on to the sandbox's server, WebSockets too, for as long as
they stay open.

A name of its own keeps what sandboxes serve off the dashboard's
origin. The API answers nothing else on it, and Pyo's session cookie
never reaches it. The sandbox token comes once as ?pyo_token=, is
checked for that sandbox's ports, goes into an HttpOnly cookie for its
path, and the browser is sent on without it. Later requests go to the
daemon with it as a bearer token, never with Pyo's cookies, and a
page's cookies for other names are dropped.

The name is picked and kept like pyo and registry. A Service of this
Pyo's is used again. When someone else has it, another Pyo or the
user's own, Pyo picks the next free one by itself and moves there.
The Tailscale card shows it next to the others.

Connections carry webUrl. The dashboard opens the desktop there, and
greys out its buttons with a short note until Tailscale is set up and
the name is ready.
sqlx::migrate! embeds the migrations at compile time, which cargo
doesn't track, so an incremental build kept the old set.
The desktop image compiles voxl, and BuildKit has no memory limit here.
PYO_UP_CARGO_JOBS (6 by default) caps cargo's jobs, so a local build
fits in a laptop's memory.
The desktop link passes the sandbox's name as ?name=, and the desktop
image shows it in the tab's title as "Desktop | <name>". Images
without it keep "Desktop".
check-migrations rejects 0018 for adding a check constraint. The new
kind check only adds 'sandboxes', so every row 0.4.2 writes still
fits, and 0.4.2 skips kinds it doesn't know when it reads them.

0018 can't carry a pyo:contract line, because installations already
ran it and sqlx checksums the file. scripts/migration-contracts.json
now holds such contracts by file name, pinned to the file's SHA-256,
and lists 0018 there. The line in the migration stays the way for new
ones.
@fransallen
fransallen merged commit 2d3c1c2 into main Nov 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant