Repository navigation
chore(release): 0.4.2 - #2
Merged
Merged
Conversation
A rerun at the same version returned before host_units, so a missing pyo-reset-login stayed missing. Updates from the dashboard never touched the host at all. Reruns now write the host units every time. Pyo serves install.sh's host_units at /install/host-units.sh, and the host's tailnet timer runs it whenever it changes, so an update brings new host scripts too.
The proxies rolled old before new with maxUnavailable 1, so a server had no proxy until the new one was ready. Envoy's PreStop waited on the shutdown manager, which ends that wait at 10 s, past the default drain, so it failed with EOF and Envoy stopped without draining. Roll new-before-old like the WAF (Envoy has no host ports, so two fit on one server) and drain within 6 s.
Axum's Query rejection reached callers as raw text like "Failed to deserialize query string: missing field `team`". A Query extractor in error.rs turns it into a JSON 400 like "Add the team parameter.", and every handler uses it.
Add server is for owners and admins, and a viewer got an empty New menu. The menu now only shows when it has items.
A template image like 127.0.0.1:5005/team/x or localhost:5005/team/x is in Pyo's registry, but the server tried its own loopback. Every name of Pyo's registry now goes to the server as the tailnet door.
The door's 403 only said "Not one of this team's images." It now names the path to push to and points to the Registry page.
Pyo 0.4.0 checks every *_IMAGE env value in a new release's manifests against the images it knows and refused 0.4.1, whose worker got PYO_SANDBOX_BASE_IMAGE. The variable is now PYO_SANDBOX_BASE_REF, the release check makes sure it holds the release's sandboxBase image, and a test runs 0.4.0's rule against the manifests.
Raw errors like "TLS with host: received corrupt message of type InvalidContentType" reached the dashboard. The templates' views now map the common ones (not a registry, refused login, missing image, unreachable) to plain messages.
An image in the name field and a bare word in the image field now get a plain warning and a Swap them button.
…heck A dev build has no base image of its own and took it from the latest release the update check found, which could be six hours away. Pyo now checks once itself when the stored check found no image or failed, and the worker keeps trying until it has one instead of only once at start.
pyo.dev's wrappers pick the release from --version, so the scripts accept it and ignore it.
A command that fetches join.sh or connect.sh from pyo.dev or a mirror now passes --version, so the wrapper runs this Pyo's scripts instead of the latest release's. Pyo's own /install scripts get no flag.
Pyo's round and a sandbox's first use of base can ask a server to make the same template at the same moment. The daemon checked for a build and started one in two steps, so both could start. It now does both under one lock.
A failed request showed only "Request failed (422 Unprocessable Entity)" when Pyo answered in plain text. The CLI now shows the JSON error, else the body's text, and for a 422 says the Pyo may be older than the CLI.
Axum's Json rejection reached callers as a 422 with raw text like "Failed to deserialize the JSON body into the target type: missing field `template`". A Json type in error.rs reads bodies like axum's and turns that into a JSON 400 like "Add the template field.", and every handler uses it.
Piped or in a CI log, a step printed its line with 0:00, and two steps with the same line (sandbox.sh's two checksum files) printed it twice. Each step's line now comes once, then with its time every 20 seconds while it runs.
GET /api/v1/tailnet/lock lists Pyo's machines (tag:pyo) that Tailnet Lock keeps off the tailnet, with the tailscale lock sign command for each. It reads Tailscale's device list at most every 15 seconds, for owners and admins.
A machine that waits for a Tailnet Lock signature only showed as joining. Sandbox servers, cluster servers and new clusters now show "Waiting for a Tailnet Lock signature" with the tailscale lock sign command, read from the tailnet's device list. Hetzner servers use the same callout.
Servers no longer make base when they join or in each round. A create from base with no server that has it ready goes to a server with room, which makes it first. The create waits for it (up to 4 minutes) and then starts the sandbox, so Sandbox.create() only takes longer the first time. Two creates at once go to the server already making it and wait on that one build. A failed copy is cleared and made again by one create at a time. base is always listed and ready to use, even before Pyo adds it or with no server. Its servers are the ones that have it. Servers that have an older revision still make a new release's in the background. Sandboxes waiting for it say so with `preparing`.
…late The templates page says base is ready to use, lists the servers that have it, and gives each usable template a Use button that opens New sandbox on it. New sandbox keeps base selectable before any server has it, and while a create waits it says "Getting base ready on <server>…", as the sandbox list and page do.
createSandbox takes an optional `server`, a sandbox server's id or name in the team. Pyo then uses only that server, makes base there first when it doesn't have it, and says plainly when it can't take the sandbox, like "sandbox-1 has no room for 2 GB. Pick another server or a smaller size." Left out, Pyo picks one as before. The CLI has --server and the MCP create_sandbox tool has `server`.
A Server field, "Any server" by default, lists each server with its runtime and free memory. Servers that aren't ready, are off, lack networking or have no room for the size are disabled with the reason. The code beside the form shows the server when one is picked.
pyo-api reads install.sh's host units at compile time since dfeffde, so the image build failed without it.
Show each template's image under its name, align the Use buttons with a fixed menu slot, use the table's type sizes and shorten the delete action to Delete.
Each template gets a logo tile from its image, Debian for base. The table keeps the template, its status and Use. The image, servers and when it was added move into a tooltip on the name, and errors into one on the status.
The store adds the new service as soon as Deploy is clicked, so the form's checks found its own name and domains taken and showed them in red until the page moved on. Leave the services this form made out of those checks, and hide problems while the service is being created.
The tarball's --exclude='*/utils' also dropped vendor/pako/lib/utils, which noVNC's inflate imports. The page then stayed on its loading spinner with no error. Only noVNC's own top-level tooling is removed now, and the build fails when the page imports a file that isn't there.
desktop.py now serves noVNC's files itself from memory, with a day's cache, and bridges its WebSocket to VNC, so websockify (and numpy) are gone. A request starts the screen in the background instead of waiting for the screen, websockify and Chromium. The WebSocket waits only for the screen, and Chromium starts after it without anyone waiting. In a 2 CPU container, noVNC in a browser went from vnc.html at about 0.7 s and the first frame at about 2.4 s to the page at once and the first frame at about 1.6 s. Each start is logged with how long it took.
Component updates and model downloads ran at its first start and wrote to the sandbox's disk.
vnc.html?app=chromium starts Chromium when it isn't running, or raises and maximizes its window when it is, with wmctrl. The page itself isn't cached any more, so each open asks again.
Running desktop sandboxes get a Chromium button beside Desktop and
Terminal. openDesktop(id, { app: "chromium" }) opens the screen with
Chromium in front.
Right after Pyo starts it knows no tailnet address for its registry door yet. Seeding a new desktop image then asked the server to pull 127.0.0.1:5005 itself, which failed, and since sandboxes kept starting from the older revision nothing tried again. They ran the old image, whose noVNC is missing a file and never loads. prepare_command is now None while the door has no address: the runner sends it a round later, and a first use says to try again in a minute. A failed copy of a built-in template's current revision is deleted a minute after it failed, so the next round makes it again.
Only web processes read Pyo's saved addresses, so the worker, which sends sandbox servers their templates, never knew the registry door's tailnet address. It skipped every template image in Pyo's registry (a dev build's desktop) for good. Every process follows them now.
Images made for Pyo sandboxes carry the label dev.pyo.sandbox.contract. When a server makes a template it now reads the image config (a few KB) and refuses an image whose contract it doesn't run, with a plain error. Images without the label are taken as before.
…mages base and desktop now come from upsetdev/pyo-sandbox-images (Ubuntu 24.04). Pyo reads that repo's latest images.json at start and every hour, checks its cosign signature (its release workflow on main) and its image contract, and keeps it in pyo.settings so every replica uses the same one. A newer build gives the templates a new revision and they never go back to an older build. Pyo ships the images.json of when it was made, so a fresh install has images before it reaches GitHub. PYO_SANDBOX_BASE_REF and PYO_SANDBOX_DESKTOP_REF still win when pinned by digest. PYO_UPDATE_CHECK=off stops the reading too.
base and desktop now come from upsetdev/pyo-sandbox-images, so their Dockerfiles, CI jobs and release jobs go. The sandbox e2e test makes base from the image Pyo ships with. release.json keeps images.sandboxBase and images.sandboxDesktop, set to the images Pyo ships with, as Pyo 0.4 reads them there and checks they are pinned. The manifests leave PYO_SANDBOX_BASE_REF and PYO_SANDBOX_DESKTOP_REF empty, so Pyo takes images.json's.
pyo-up.sh leaves the sandbox templates on the images upsetdev/pyo-sandbox-images publishes. With PYO_UP_SANDBOX_IMAGES=local it builds base and desktop from ../pyo-sandbox-images into the local registry, desktop on that base, and pins Pyo to them by digest. It's opt-in as both take about 8 GB of layers.
base now runs Ubuntu 24.04 from pyo-sandbox-images, so its mark is Ubuntu's in its brand color. Hovering Pyo's own templates' marks says what they run. desktop keeps the monitor icon.
The CLI help, the MCP tool and the API docs said base was Debian 13 and desktop had Chromium. base is now Ubuntu 24.04 with more tools, and desktop has Chrome on amd64 and Chromium on arm64, so they say a browser. The dashboard's button says Browser too.
The daemon now counts the layer bytes it unpacked, beside the bytes it pulled, and answers a new Template command with how far one template got. That answer skips the disk walk of a build in progress, so Pyo can ask every second while a template is made. Older Pyo ignores the new field and never sends the command.
While a server builds a template, the list asks it how far it got with the new Template command and lays that over its last report, so a progress bar moves every second instead of every round. Answers are kept for a second, and a server that doesn't answer (or a daemon too old for the command) keeps its last report for 15 seconds. Nothing is saved per ask. A new template's first answer from each server is now saved at once, so it shows building right after it's added.
A query whose refresh rate dropped below ten seconds waited out the cache first, so a page that sped up kept its old pace for one round.
While servers make a template, its status shows a slim bar with the slowest server's step: Downloading 42%, Unpacking 80% or Starting, and the server count on hover. The list refreshes every 1.5 seconds then. New sandbox's button counts up while its template gets ready.
Show only the template's name, what it runs and its image. The image is monospace, cut to a 12 character digest and wraps at its /, : and @. Tooltips stay inside narrow screens and break long words.
Swap the template logo's native title for the shared TemplateTip tooltip, so the list and the sandbox page match the templates page.
Piped into bash as a user, connect.sh and join.sh run again under sudo and the root shell reads on from the pipe. Since the progress helpers came before that call, the root shell had no quietly or wait_until and failed at its first download. Asking first keeps them.
82a054d moved the template logo's hover to the shared tooltip and removed templateTitle, but its test stayed and failed the whole file. templateOs has the same cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pyo 0.4.2: everything on dev since 0.4.1, the connect.sh and join.sh root fix, the latest sandbox images and the version bump.