Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f274631
ci: check the template catalog against pyo-templates
fransallen Nov 17, 2026
313bc35
docs(sandbox): say the desktop's screen is voxl, not noVNC
fransallen Nov 17, 2026
fea601c
feat(gateway): serve https on a cloud server's nat'd public ip
fransallen Nov 17, 2026
d47fcd9
style(scripts): show steps as a checklist
fransallen Nov 17, 2026
6be4148
feat(install): list pyo's addresses by kind and wait less
fransallen Nov 17, 2026
53a0290
feat(install): pin each release's install scripts on pyo.dev
fransallen Nov 17, 2026
e548d6c
ci(release): list the install scripts' sums in the release notes
fransallen Nov 17, 2026
38da928
ci(release): sign the install scripts' sums and publish through a draft
fransallen Nov 17, 2026
3a34107
ci(release): rebuild pyo.dev once a release is published
fransallen Nov 17, 2026
66915bd
fix(install): keep systemctl's symlink lines out of the output
fransallen Nov 17, 2026
87a4901
perf(install): ask each cloud's metadata once off a cloud
fransallen Nov 17, 2026
f4b824c
perf(agent): look for cert-manager every 5 seconds at first
fransallen Nov 17, 2026
6bc37b7
chore: merge feat/install-addresses into dev
fransallen Nov 17, 2026
0d9a285
build(dev): give local sandbox image builds their notices
fransallen Nov 17, 2026
f9cd761
feat(sandbox): open the desktop over HTTPS on the tailnet
fransallen Nov 17, 2026
466917f
build(api): rebuild when a migration is added or changed
fransallen Nov 17, 2026
2de41a3
chore: merge docs/desktop-voxl into dev
fransallen Nov 17, 2026
dbba2ef
build(dev): cap cargo jobs for the local desktop image
fransallen Nov 17, 2026
dccb805
feat(dash): name the sandbox in the desktop's tab title
fransallen Nov 17, 2026
ed7f27e
fix(ci): keep reviewed migration contracts outside the migration
fransallen Nov 17, 2026
4a85074
docs(releasing): say where a ran migration's contract goes
fransallen Nov 17, 2026
4cfad1d
docs(readme): list pyo-sandbox-images under projects
fransallen Nov 18, 2026
0dfcb70
chore(sandbox): ship the latest base and desktop images
fransallen Nov 18, 2026
2d3c1c2
chore(release): 0.4.3
fransallen Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,32 @@ jobs:
- run: bun test ./dash/scripts
- run: bun run build

# The dashboard bundles pyo-templates' catalog as catalog.json. It has to
# match pyo-templates' main, or Pyo ships old templates.
templates:
name: Template catalog
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: upsetdev/pyo-templates
ref: main
path: .pyo-templates
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.2
- name: Build pyo-templates
working-directory: .pyo-templates
run: bun install --frozen-lockfile && bun run build
- name: catalog.json matches pyo-templates
run: |
bun dash/scripts/sync-templates.ts .pyo-templates/dist/v1 --check || {
echo "::error::dash/src/lib/pyo/catalog.json doesn't match pyo-templates' main. Run \`bun run build\` in pyo-templates, then \`bun scripts/sync-templates.ts\` in dash/, and commit catalog.json."
exit 1
}

rust:
name: Rust
runs-on: ubuntu-24.04
Expand Down
136 changes: 114 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Release

# Pushing a tag like v0.1.0 publishes that version: signed images at
# ghcr.io/upsetdev/pyo, and a GitHub release with the CLI for each
# platform, the sandbox server files and release.json (what the
# dashboard's updates apply). See RELEASING.md.
# platform, the sandbox server files, the install scripts and release.json
# (what the dashboard's updates apply). Then pyo.dev is rebuilt, to serve
# the release's install scripts. See RELEASING.md.

on:
push:
Expand Down Expand Up @@ -42,6 +43,23 @@ jobs:
bun-version: 1.4.2
- run: bun install --frozen-lockfile
- run: bun run typecheck
# The templates this release bundles are pyo-templates' main, as CI
# checks.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: upsetdev/pyo-templates
ref: main
path: .pyo-templates
persist-credentials: false
- name: Build pyo-templates
working-directory: .pyo-templates
run: bun install --frozen-lockfile && bun run build
- name: catalog.json matches pyo-templates
run: |
bun dash/scripts/sync-templates.ts .pyo-templates/dist/v1 --check || {
echo "::error::dash/src/lib/pyo/catalog.json doesn't match pyo-templates' main. Run \`bun run build\` in pyo-templates, then \`bun scripts/sync-templates.ts\` in dash/, commit catalog.json on dev, and release again."
exit 1
}
# The WAF's processor (waf/).
- name: WAF tests
run: docker run --rm -v "$PWD/waf:/src" -w /src -e CGO_ENABLED=0 golang:1.26 sh -c 'go vet ./... && go test ./...'
Expand Down Expand Up @@ -198,6 +216,10 @@ jobs:
done
# What Pyo needs to update itself from the dashboard: the images
# pinned by the digests that were just signed, and the manifests.
# Also the install scripts as the release publishes them, written to
# release-scripts/ (connect.sh, join.sh and sandbox.sh with this
# version on their pyo:release-version line), and their SHA-256:
# pyo.dev serves only scripts that match these signed sums.
- name: Write release.json
env:
VERSION: ${{ needs.verify.outputs.version }}
Expand All @@ -213,8 +235,9 @@ jobs:
--sandbox-x86_64 "$(cut -d' ' -f1 sandbox/pyo-sandbox-linux-x86_64.tar.gz.sha256)" \
--sandbox-aarch64 "$(cut -d' ' -f1 sandbox/pyo-sandbox-linux-aarch64.tar.gz.sha256)" \
--sandbox-gvisor-x86_64 "$(cut -d' ' -f1 sandbox/pyo-sandbox-gvisor-linux-x86_64.tar.gz.sha256)" \
--sandbox-gvisor-aarch64 "$(cut -d' ' -f1 sandbox/pyo-sandbox-gvisor-linux-aarch64.tar.gz.sha256)" > release.json
jq '{version, images, k3s, minFrom, manualOnly, beforeYouUpdate, agentAccess, sandbox, sandboxGvisor, migrations: (.migrations | length)}' release.json
--sandbox-gvisor-aarch64 "$(cut -d' ' -f1 sandbox/pyo-sandbox-gvisor-linux-aarch64.tar.gz.sha256)" \
--scripts release-scripts > release.json
jq '{version, images, k3s, minFrom, manualOnly, beforeYouUpdate, agentAccess, sandbox, sandboxGvisor, scripts, migrations: (.migrations | length)}' release.json
# The release's own upgrader reads it before it's signed: an image
# it doesn't accept, or an agentAccess that isn't its agent's roles,
# fails the release here, not on installations.
Expand Down Expand Up @@ -263,19 +286,23 @@ jobs:
- name: Write the release notes
env:
GH_TOKEN: ${{ github.token }}
run: bun run scripts/release-notes.ts --to "$GITHUB_REF_NAME" > release-notes.md && cat release-notes.md
# install.sh goes out as an asset named exactly that: pyo.dev/install.sh
# fetches releases/latest/download/install.sh (stable releases only).
# connect.sh beside it: install.sh --uninstall runs its own release's.
# pyo.dev/connect.sh and pyo.dev/join.sh fetch connect.sh and join.sh
# the same way (Pyo's commands use them when it has no address other
# machines can reach). pyo.dev/cli.sh fetches cli.sh, the CLI's
# installer. pyo.dev/sandbox.sh fetches sandbox.sh, which sets up
# sandbox servers with the pyo-sandbox-linux-<arch>.tar.gz beside it.
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
body_path: release-notes.md
files: |
run: bun run scripts/release-notes.ts --to "$GITHUB_REF_NAME" --release release.json > release-notes.md && cat release-notes.md
# The release goes up as a draft with every asset, and is published
# once they're all there: with immutable releases (on for this repo),
# a published release's assets and tag can't change. Run again after
# a failure, this job replaces the draft's assets. A release that's
# published already is left as it is.
#
# The install scripts are release-scripts/'s: install.sh (pyo.dev/install.sh
# is the latest release's), connect.sh (also for install.sh --uninstall),
# join.sh, sandbox.sh (beside the sandbox files it installs) and cli.sh,
# the CLI's installer.
- name: Upload the release as a draft
id: draft
env:
GH_TOKEN: ${{ github.token }}
run: |
files=(
pyo-linux-x86_64
pyo-linux-x86_64.sha256
cli-platforms/pyo-linux-aarch64
Expand All @@ -288,11 +315,11 @@ jobs:
cli-platforms/pyo-windows-x86_64.exe.sha256
release.json
release.json.sigstore.json
deploy/install.sh
deploy/cli.sh
crates/pyo-api/assets/connect.sh
crates/pyo-api/assets/join.sh
deploy/sandbox.sh
release-scripts/install.sh
release-scripts/cli.sh
release-scripts/connect.sh
release-scripts/join.sh
release-scripts/sandbox.sh
sandbox/pyo-sandbox-linux-x86_64.tar.gz
sandbox/pyo-sandbox-linux-x86_64.tar.gz.sha256
sandbox/pyo-sandbox-linux-aarch64.tar.gz
Expand All @@ -301,3 +328,68 @@ jobs:
sandbox/pyo-sandbox-gvisor-linux-x86_64.tar.gz.sha256
sandbox/pyo-sandbox-gvisor-linux-aarch64.tar.gz
sandbox/pyo-sandbox-gvisor-linux-aarch64.tar.gz.sha256
)
if ! draft=$(gh release view "$GITHUB_REF_NAME" --json isDraft --jq .isDraft 2>&1); then
grep -q "release not found" <<<"$draft" || { echo "$draft"; exit 1; }
draft=none
fi
case "$draft" in
false)
echo "::notice::$GITHUB_REF_NAME is published already, so its assets stay as they are."
echo "published=true" >> "$GITHUB_OUTPUT"
;;
true)
gh release edit "$GITHUB_REF_NAME" --notes-file release-notes.md
gh release upload "$GITHUB_REF_NAME" --clobber "${files[@]}"
;;
none)
gh release create "$GITHUB_REF_NAME" --draft --verify-tag --title "$GITHUB_REF_NAME" \
--notes-file release-notes.md "${files[@]}"
;;
esac
# What the draft holds now: each install script as release.json lists it.
- name: Check the draft's install scripts
if: steps.draft.outputs.published != 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download "$GITHUB_REF_NAME" --pattern '*.sh' --dir uploaded
jq -r '.scripts | to_entries[] | "\(.value) uploaded/\(.key)"' release.json | sha256sum -c
[ "$(ls uploaded | wc -l)" = "$(jq '.scripts | length' release.json)" ]
- name: Publish the release
if: steps.draft.outputs.published != 'true'
env:
GH_TOKEN: ${{ github.token }}
run: gh release edit "$GITHUB_REF_NAME" --draft=false --latest

# pyo.dev serves the latest release's install scripts, and each release's
# at pyo.dev/v/<version>/. Its build takes them from the published
# release only when they match the sums in its signed release.json. This
# asks Cloudflare's Workers Builds for that build, through a deploy hook
# whose URL is the secret PYO_WEB_DEPLOY_HOOK (Cloudflare dashboard >
# Workers & Pages > pyo-web > Settings > Builds > Deploy Hooks). When it
# fails, run this job again: the release stays as it is.
site:
name: Rebuild pyo.dev
needs: release
runs-on: ubuntu-24.04
permissions: {}
steps:
- name: Ask Workers Builds to build pyo-web
env:
HOOK: ${{ secrets.PYO_WEB_DEPLOY_HOOK }}
run: |
if [ -z "$HOOK" ]; then
echo "::error::The secret PYO_WEB_DEPLOY_HOOK isn't set, so pyo.dev wasn't rebuilt and still serves the previous release's scripts. Make a deploy hook for pyo-web in Cloudflare (Workers & Pages > pyo-web > Settings > Builds > Deploy Hooks), save its URL as this repo's PYO_WEB_DEPLOY_HOOK secret, and run this job again."
exit 1
fi
case "$HOOK" in
https://api.cloudflare.com/client/v4/workers/builds/deploy_hooks/*) ;;
*) echo "::error::PYO_WEB_DEPLOY_HOOK isn't a Workers Builds deploy hook URL."; exit 1 ;;
esac
out=$(curl -fsS -X POST --retry 3 --max-time 30 "$HOOK") || { echo "::error::The deploy hook didn't answer. Check that it still exists in Cloudflare."; exit 1; }
if [ "$(echo "$out" | jq -r '.success // empty' 2>/dev/null)" = false ]; then
echo "::error::Cloudflare refused the build: $(echo "$out" | jq -c '.errors')"
exit 1
fi
echo "Build started: $(echo "$out" | jq -r '.result.build_uuid // .build_uuid // "see the Cloudflare dashboard"' 2>/dev/null)"
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ Then run `bun run dev`.
The template catalog in `dash/src/lib/pyo/catalog.json` comes from
[pyo-templates](https://github.com/upsetdev/pyo-templates). Don't edit it by
hand. Run `bun scripts/sync-templates.ts` in `dash/` with pyo-templates built
next to this repository.
next to this repository. CI and the release check that it matches
pyo-templates' `main`.

## Run the checks

Expand Down
26 changes: 14 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "3"
members = ["crates/pyo-proto", "crates/pyo-api", "crates/pyo-agent", "crates/pyo-builder", "crates/pyo-cli", "crates/pyo-flows", "crates/pyo-resp", "crates/pyo-kv", "crates/pyo-db-controller", "crates/pyo-static", "crates/pyo-envd", "crates/pyo-sandbox"]

[workspace.package]
version = "0.4.2"
version = "0.4.3"
edition = "2024"
license = "Apache-2.0"
publish = false
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Building from source or contributing? See [CONTRIBUTING.md](CONTRIBUTING.md).
- [pyo-docs](https://github.com/upsetdev/pyo-docs): the documentation, published at [pyo.dev/docs](https://pyo.dev/docs).
- [pyo-web](https://github.com/upsetdev/pyo-web): the website, [pyo.dev](https://pyo.dev).
- [pyo-templates](https://github.com/upsetdev/pyo-templates): the one-click templates.
- [pyo-sandbox-images](https://github.com/upsetdev/pyo-sandbox-images): the images of the built-in sandbox templates, base and desktop.

## License

Expand Down
Loading
Loading