Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
9b95d09
fix(proto): count the admission policy in the agent access hash
fransallen Nov 22, 2026
8fae242
test(agent): add an in-memory kubernetes api for tests
fransallen Nov 22, 2026
d0d4538
fix(agent): write client policies an older install accepts
fransallen Nov 22, 2026
402f2c4
fix(api): say when a cluster's older install keeps visitor headers
fransallen Nov 22, 2026
0ecf370
fix(agent): keep applying the firewall past a failing service
fransallen Nov 22, 2026
6218862
fix(agent): keep publishing ports past a failing service
fransallen Nov 22, 2026
4727af8
fix(agent): write the gateway's client policies again once the instal…
fransallen Nov 22, 2026
1cebb7a
Merge branch 'fix/old-admission-fallback' into dev
fransallen Nov 22, 2026
b145440
docs: apply the tunnel decisions to the cloudflare tunnel spec
fransallen Nov 22, 2026
e3d91dd
feat(cloudflare): check the token's tunnel permissions per zone
fransallen Nov 22, 2026
adc8e62
feat(cli): show each zone's tunnel state in pyo cloudflare
fransallen Nov 22, 2026
12cf81f
feat(dash): show which cloudflare zones can use a tunnel
fransallen Nov 22, 2026
e56d6f3
docs: update the tunnel build status after phase 1
fransallen Nov 22, 2026
5284a70
docs: gate tunnel domains once their switch completes
fransallen Nov 22, 2026
0ef4273
feat(cli): drop pyo sandbox servers create
fransallen Nov 22, 2026
6f1ab40
feat(cli): drop the hetzner and server commands
fransallen Nov 22, 2026
70a584e
fix(dash): stop the new project form flashing a name error on create
fransallen Nov 22, 2026
8791e26
fix(dash): stop new databases flashing a name error on create
fransallen Nov 22, 2026
d8901d8
fix(dash): stop a new builder flashing a name error on add
fransallen Nov 22, 2026
02590fa
fix(dash): keep a new hetzner cluster's name from reading as taken
fransallen Nov 22, 2026
a3de5eb
Merge branch 'fix/new-project-flash' into dev
fransallen Nov 22, 2026
b7090b0
fix(api): read hetzner server type availability per location
fransallen Nov 22, 2026
085bc59
fix(api): keep hetzner's own words in its errors
fransallen Nov 22, 2026
0a1a454
Merge branch 'fix/hetzner-410' into dev
fransallen Nov 22, 2026
62f2f48
Merge branch 'chore/drop-provider-cli' into dev
fransallen Nov 22, 2026
8d0e33f
feat(dash): add cloudflare tunnel types and ops
fransallen Nov 22, 2026
4ea7356
feat(dash): choose public ports, tailscale or cloudflare tunnel
fransallen Nov 22, 2026
eadce05
feat(proto): describe the cloudflare tunnel connector and its admission
fransallen Nov 22, 2026
4db8b6f
feat(agent): run the cloudflare tunnel connector
fransallen Nov 22, 2026
3b9ae43
feat(api): run cloudflare tunnels from the control plane
fransallen Nov 22, 2026
a47f92e
feat(cli): add pyo cloudflare tunnel and pyo domain tunnel
fransallen Nov 22, 2026
bf1cc78
docs: note the tunnel decisions made while building
fransallen Nov 22, 2026
6ab03c9
feat(dash): show a tunnel badge beside clusters in tunnel mode
fransallen Nov 22, 2026
57bc331
docs: update the tunnel build status
fransallen Nov 22, 2026
50f1a49
feat(dash): switch domains to the cloudflare tunnel and back
fransallen Nov 22, 2026
3f41dd6
fix(dash): keep the tunnel's account when zones load late
fransallen Nov 22, 2026
06dfbba
Merge branch 'feat/cloudflare-tunnel-dash' into feat/cloudflare-tunnel
fransallen Nov 22, 2026
f0c7697
docs: note the merged tunnel dashboard in the build status
fransallen Nov 22, 2026
928ac34
fix(api): give the cluster tunnel endpoint its mcp tool and tidy clippy
fransallen Nov 22, 2026
20609d2
docs: record the tunnel test results in the build status
fransallen Nov 22, 2026
9a42d36
docs: record the clean tunnel clippy run
fransallen Nov 22, 2026
5f8d296
fix(proto): make the gateway, waf and tailnet pods critical
fransallen Nov 22, 2026
9d8167b
fix(agent): make vector's pods critical
fransallen Nov 22, 2026
d4db517
fix(agent): clean up a pod loop at once and run again soon
fransallen Nov 22, 2026
b9e534b
fix(install): keep the agent running on a server short of disk
fransallen Nov 22, 2026
f6348e6
fix(install): let a server stop counting as short of disk sooner
fransallen Nov 22, 2026
f3d0203
test(agent): release the fake cluster's lock before the next run
fransallen Nov 22, 2026
02f2826
style: format the new disk pressure tests
fransallen Nov 22, 2026
7e3ad38
fix(dash): reword the agent updates setting
fransallen Nov 22, 2026
9b1e9e1
Merge branch 'fix/agent-updates-copy' into dev
fransallen Nov 22, 2026
c758ae2
test(agent): check the gpu device plugin stays critical
fransallen Nov 22, 2026
9ea7926
fix(proto): update the waf when its daemonset changes
fransallen Nov 22, 2026
12b6ca9
feat(agent): bring its own priority and tolerations with a refresh
fransallen Nov 22, 2026
0394f36
test(api): run the tunnel against a fake cloudflare api
fransallen Nov 22, 2026
e36141e
feat(api): close the tunnel's gaps and give tunnel mode free domains
fransallen Nov 22, 2026
d135ff0
feat(dash): free domains in tunnel mode and the wizard's tunnel switch
fransallen Nov 22, 2026
d8e1a16
test: check the tunnel's gate against a real envoy
fransallen Nov 22, 2026
031bfe8
docs: update the tunnel build status after phase 6
fransallen Nov 22, 2026
5125840
feat(api): read x-pyo service settings in compose import
fransallen Nov 22, 2026
3b28fff
feat(api): plan and apply a compose sync
fransallen Nov 22, 2026
ea0149b
feat(cli): sync a project with pyo deploy -f
fransallen Nov 22, 2026
192d631
feat(dash): show the compose file a project comes from
fransallen Nov 22, 2026
60c8d00
feat(api): limit where the installation admin can sign in
fransallen Nov 22, 2026
270d114
test(api): cover admin sign-in limits end to end
fransallen Nov 22, 2026
bdc6ca0
feat(dash): add admin sign-in to the security settings
fransallen Nov 22, 2026
f34e475
fix(api): blank preview secrets without borrowing the spec twice
fransallen Nov 22, 2026
5b9e3ba
fix(dash): match the mtls and certificates empty states
fransallen Nov 22, 2026
b640309
Merge branch 'fix/empty-state-match' into dev
fransallen Nov 22, 2026
3cb5c75
feat(previews): put previews under the tunnel's default domain
fransallen Nov 22, 2026
17e042f
test: limit the memory of the tunnel gate e2e's containers
fransallen Nov 22, 2026
a9424b6
style(api): match a load balancer port without a guard
fransallen Nov 22, 2026
9f7b335
fix(test): indent the tunnel gate e2e's per-route rbac
fransallen Nov 22, 2026
14888cf
docs: record the phase 6 checks in the tunnel build status
fransallen Nov 22, 2026
fba9eca
fix(dash): drop the mtls and certificates page descriptions
fransallen Nov 22, 2026
bca18f9
Merge branch 'fix/cert-pages-copy' into dev
fransallen Nov 22, 2026
f638c14
style(dash): brighten sidebar links and soften their icons
fransallen Nov 22, 2026
4fb0473
Merge branch 'style/sidebar-links' into dev
fransallen Nov 22, 2026
b7984f7
style(dash): simplify the update notice
fransallen Nov 22, 2026
77df4ea
Merge branch 'style/update-notice' into dev
fransallen Nov 22, 2026
fd43ddc
Merge branch 'fix/disk-pressure' into dev
fransallen Nov 22, 2026
0ec3626
Merge branch 'feat/admin-sign-in' into dev
fransallen Nov 22, 2026
6a5991f
Merge branch 'feat/cloudflare-tunnel' into dev
fransallen Nov 22, 2026
179fb26
Merge branch 'feat/compose-sync' into dev
fransallen Nov 22, 2026
7eba9f7
test(proto): pin the agent's roles with the tunnel's services
fransallen Nov 22, 2026
9245ac8
fix(cloudflare): keep the tunnel check to this install's probes
fransallen Nov 22, 2026
d006118
fix(tunnel): keep the gate on when a name already on the tunnel switches
fransallen Nov 22, 2026
15947ec
fix(tunnel): refuse switch back for names under the default domain
fransallen Nov 22, 2026
0f8a34f
fix(tunnel): answer 404 for names no service has under the default do…
fransallen Nov 22, 2026
8d559db
fix(dash): say why the sandbox command button is off
fransallen Nov 22, 2026
6771cb1
Merge branch 'fix/sandbox-tailscale-hint' into dev
fransallen Nov 22, 2026
a8b35e1
fix(gateway): give services the visitor alone in x-forwarded-for
fransallen Nov 22, 2026
46983db
docs(tunnel): record the fixes after the real cloudflare test
fransallen Nov 22, 2026
ccfb48a
fix(security): update the debian base of pyo's images for apt and zli…
fransallen Nov 22, 2026
3ebab2f
fix(security): update buildkit to 0.34.2
fransallen Nov 22, 2026
d2033c9
fix(security): update the postgres base images to 16.16, 17.12 and 18.7
fransallen Nov 22, 2026
57c4d1d
fix(security): update the mysql image for apt and brotli fixes
fransallen Nov 22, 2026
d6ae88b
fix(security): update valkey-bundle to 8.1.12
fransallen Nov 22, 2026
042e2e3
fix(tunnel): leave a new name under the default domain to the wildcard
fransallen Nov 22, 2026
441ce3f
Merge branch 'fix/tunnel-real-test' into dev
fransallen Nov 22, 2026
fa32cc1
Merge branch 'dev' into worktree-agent-a627f718e506f043c
fransallen Nov 22, 2026
9d6290f
fix(security): update the postgres operator to cloudnative-pg 1.30.2
fransallen Nov 22, 2026
79adb5e
fix(security): update golang.org/x/net in the mysql operator images
fransallen Nov 22, 2026
1a77ef7
Merge branch 'fix/image-cves' into dev
fransallen Nov 22, 2026
6877f24
feat(release): name the database images a release pins
fransallen Nov 23, 2026
c854680
feat(api): say which databases restart for an update
fransallen Nov 23, 2026
d8559e1
feat(dash): show when an update restarts databases
fransallen Nov 23, 2026
0dd6d76
docs(releasing): say when databases restart for a release
fransallen Nov 23, 2026
fc6aa6c
Merge branch 'feat/database-restart-notice' into dev
fransallen Nov 23, 2026
040f869
fix(databases): add the failover history to postgres backups
fransallen Nov 23, 2026
dc28c30
fix(agent): write the proxies as an install not refreshed yet accepts
fransallen Nov 23, 2026
eeda6dd
fix(api): stop resending a refresh that failed on the agent's roles
fransallen Nov 23, 2026
4daf373
fix(agent): say refresh in the log line for proxies written without p…
fransallen Nov 23, 2026
ff482d4
Merge branch 'fix/unrefreshed-cluster-safety' into dev
fransallen Nov 23, 2026
7249d24
docs(releasing): say when clusters need the connect command
fransallen Nov 23, 2026
9064ac0
Merge branch 'docs/releasing-refresh' into dev
fransallen Nov 23, 2026
239db4f
test(api): cover compose sync in the database
fransallen Nov 23, 2026
f071efe
feat(agent): name the gateway's services in the admission policy only
fransallen Nov 23, 2026
21a1756
feat(agent): let the self-hosted agent keep its own roles current
fransallen Nov 23, 2026
b237ca8
fix(databases): say why the failover history can't be added in plain …
fransallen Nov 23, 2026
ea4e2c5
fix(agent): say once that the public ports service can't be read
fransallen Nov 23, 2026
fd68ada
feat(install): refresh what doesn't need the roles when they can't be…
fransallen Nov 23, 2026
7b12e60
fix(updates): ask for the connect command only where agents can't ref…
fransallen Nov 23, 2026
1891acc
Merge branch 'feat/self-managing-install' into dev
fransallen Nov 23, 2026
c9524ca
Merge branch 'fix/postgres-restore-after-failover' into dev
fransallen Nov 23, 2026
12d87a6
feat(api): tell pyo's own server when its cluster needs a refresh
fransallen Nov 23, 2026
1e09503
feat(install): refresh the server pyo runs on by itself after a release
fransallen Nov 23, 2026
650af19
fix(updates): leave out the connect command line where pyo's server r…
fransallen Nov 23, 2026
e8c3e36
fix(tunnel): say a cluster is updating instead of asking for the command
fransallen Nov 23, 2026
4d3f184
docs(releasing): say the server pyo runs on refreshes itself
fransallen Nov 23, 2026
2aa4294
refactor(sigstore): move the offline sigstore check into its own crate
fransallen Nov 23, 2026
7628cc3
refactor(sigstore): check signatures with aws-lc directly
fransallen Nov 23, 2026
f47b40a
Merge branch 'feat/own-server-refresh' into dev
fransallen Nov 23, 2026
6d3db13
feat(sigstore): match a release's exact tag and return rekor's time
fransallen Nov 23, 2026
addaac8
fix(dash): hold a form's checks through its own submit
fransallen Nov 23, 2026
48dbf68
fix(dash): stop the invite form flashing an error while it sends
fransallen Nov 23, 2026
8dda0d0
fix(dash): stop a new sandbox server flashing a name error on create
fransallen Nov 23, 2026
6f6a92f
fix(dash): stop add cluster flashing a name error on start over
fransallen Nov 23, 2026
becb1d2
Merge branch 'fix/form-error-flash' into dev
fransallen Nov 23, 2026
544cf91
style(sigstore): format after the move
fransallen Nov 23, 2026
ff9669e
feat(verify): add the pyo-verify bootstrap
fransallen Nov 23, 2026
a8048af
Merge branch 'feat/pyo-verify' into dev
fransallen Nov 23, 2026
67789e5
style(dash): show tailscale and cloudflare logos on domain rows
fransallen Nov 23, 2026
e5c7998
Merge branch 'style/domain-row-logos' into dev
fransallen Nov 23, 2026
b792f5d
feat(agent): let the agent read the verifier's status
fransallen Nov 23, 2026
713d519
feat(agent): report the verifier's status with each heartbeat
fransallen Nov 23, 2026
13f8834
feat(api): add the auto-update flag to hosted connect commands
fransallen Nov 23, 2026
9fedf75
feat(api): name pyo's version for the verifier and show its status
fransallen Nov 23, 2026
d53a75e
feat(dash): offer automatic updates with a hosted cluster's command
fransallen Nov 23, 2026
6705b61
docs(releasing): say what the 0.51.0 verifier does and does not do
fransallen Nov 23, 2026
afc4799
Merge branch 'feat/verifier-control-plane' into dev
fransallen Nov 23, 2026
6ef0e9f
fix(dash): call the auto-made name a tunnel domain in tunnel mode
fransallen Nov 23, 2026
ffce4c7
Merge branch 'fix/tunnel-domain-naming' into dev
fransallen Nov 23, 2026
9a10d89
fix: call the auto-made name a tunnel domain in tunnel mode
fransallen Nov 23, 2026
3378a22
Merge branch 'fix/tunnel-domain-wording' into dev
fransallen Nov 23, 2026
e6e711f
feat(connect): set up the verifier with --auto-update
fransallen Nov 23, 2026
e702d9f
fix(verify): take only hold, empty or auto from pyo-policy updates
fransallen Nov 23, 2026
b13f604
ci(release): publish the verifier and allow release candidates
fransallen Nov 23, 2026
afc213d
docs(releasing): describe the verifier's assets, pins and candidates
fransallen Nov 23, 2026
eceb80e
chore(agent): fix two clippy warnings
fransallen Nov 23, 2026
12ab552
Merge branch 'feat/verifier-release-wiring' into dev
fransallen Nov 23, 2026
f38edd0
test(join): rename the connect args helper that hid auto_update_flag
fransallen Nov 23, 2026
4520900
fix(connect): get install files from pyo's public address
fransallen Nov 23, 2026
7c44929
Merge branch 'fix/cloud-refresh-address' into dev
fransallen Nov 23, 2026
003ae03
fix(api): keep public_traffic writable for v0.5.5 during the update
fransallen Nov 23, 2026
837d457
fix(tls): install the rustls provider before any tls config is built
fransallen Nov 23, 2026
ac502f5
fix(deps): update url to 2.5.9 for RUSTSEC-2026-0592
fransallen Nov 23, 2026
ae3fe95
Merge branch 'fix/ci-051' into dev
fransallen Nov 23, 2026
efd70a2
test(api): keep the update tests passing on a release candidate
fransallen Nov 23, 2026
c56dec7
fix(verify): write the status under the keys the agent reads
fransallen Nov 23, 2026
0e4af35
fix(dash): hide this machine for builders on a hosted pyo
fransallen Nov 23, 2026
943c3cd
Merge branch 'fix/cloud-builder-no-this-machine' into dev
fransallen Nov 23, 2026
8df8da1
fix(dash): show the database restart notice for an install missing roles
fransallen Nov 23, 2026
806c5ea
fix(api): fetch a release candidate's scripts from its GitHub release
fransallen Nov 23, 2026
9dc8bdf
Merge branch 'fix/rc-verifier-status-keys' into dev
fransallen Nov 23, 2026
c8c8fc0
Merge branch 'fix/rc-database-restart-notice' into dev
fransallen Nov 23, 2026
ef55b56
Merge branch 'fix/rc-scripts-url' into dev
fransallen Nov 23, 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
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,19 @@ jobs:
- run: scripts/install-railpack.sh
- run: cargo test --locked --workspace
# Row security and teams against a real Postgres: what a person's
# requests may see and change, signing up, creating and joining teams.
# requests may see and change, signing up, creating and joining teams,
# and the Cloudflare Tunnel loop against a fake Cloudflare.
- name: Teams and row security (Postgres)
env:
DATABASE_URL: postgres://postgres:pyo@localhost:5432/pyo
run: cargo test --locked -p pyo-api --lib -- --ignored rls::tests teams_rls_tests teamsec_tests auth::key_tests auth::invite_tests
run: cargo test --locked -p pyo-api --lib -- --ignored rls::tests teams_rls_tests teamsec_tests auth::key_tests auth::invite_tests cloudflare::http_tests
# What a Compose sync writes. A run of its own: the tests above set a
# secret key for the whole process, and its one vault then keeps its
# data keys in whichever test's database came first.
- name: Compose sync (Postgres)
env:
DATABASE_URL: postgres://postgres:pyo@localhost:5432/pyo
run: cargo test --locked -p pyo-api --lib -- --ignored compose_sync::db_tests

# Known CVEs in the locked dependencies: Cargo.lock, bun.lock (with the
# dashboard's dev dependencies) and the WAF's go.mod. A CRITICAL one
Expand Down
139 changes: 126 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ 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, 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.
# platform, the verifier, 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.
#
# A tag like v0.1.0-rc.1 is a release candidate, for testing the verifier:
# the same build, published as a pre-release (never GitHub's latest, so
# installations and pyo.dev don't see it), and pyo.dev isn't rebuilt.

on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
tags: ["v[0-9]+.[0-9]+.[0-9]+", "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"]

permissions:
contents: read
Expand All @@ -22,6 +26,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.version.outputs.version }}
rc: ${{ steps.version.outputs.rc }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: The tag matches Cargo.toml
Expand All @@ -33,6 +38,7 @@ jobs:
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
case "$version" in *-rc.*) echo "rc=true" ;; *) echo "rc=false" ;; esac >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
with:
toolchain: 1.99.1
Expand Down Expand Up @@ -92,6 +98,41 @@ jobs:
needs: verify
uses: ./.github/workflows/cli.yml

# The verifier for Linux on Arm, built on an Arm runner like the CLI
# (cli.yml). Linux x86-64's comes from pyo.Dockerfile's `verify` target,
# in the release job. Static (musl): it runs on any customer's server.
verifier:
name: Verifier (Linux on Arm)
needs: verify
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
with:
toolchain: 1.99.1
targets: aarch64-unknown-linux-musl
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends musl-tools
- name: Build
env:
CC_aarch64_unknown_linux_musl: musl-gcc
run: |
cargo build --release --locked -p pyo-verify --target aarch64-unknown-linux-musl
mkdir out
cp target/aarch64-unknown-linux-musl/release/pyo-verify out/pyo-verify-linux-aarch64
# It runs on the platform it's for, and says the tag's version: a
# server's verifier compares it with the release it took.
- name: Check it runs
env:
VERSION: ${{ needs.verify.outputs.version }}
run: |
got=$(out/pyo-verify-linux-aarch64 version)
[ "$got" = "$VERSION" ] || { echo "::error::pyo-verify version says \"$got\", not $VERSION."; exit 1; }
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: verifier-linux-aarch64
path: out/
if-no-files-found: error

# A sandbox server's files for each architecture (sandbox.yml).
sandbox:
name: Sandbox
Expand Down Expand Up @@ -215,7 +256,7 @@ jobs:

release:
name: GitHub release
needs: [verify, images, cli, sandbox]
needs: [verify, images, cli, verifier, sandbox]
runs-on: ubuntu-24.04
permissions:
contents: write
Expand Down Expand Up @@ -252,11 +293,42 @@ jobs:
sha256sum -c "pyo-sandbox-linux-$a.tar.gz.sha256"
sha256sum -c "pyo-sandbox-gvisor-linux-$a.tar.gz.sha256"
done
# The verifier for each architecture: Linux x86-64's from the binaries
# this run built (pyo.Dockerfile's `verify` target), Linux on Arm's
# from the verifier job. release.json lists their sums, so they're
# signed with it, and connect.sh gets the same sums on its
# pyo:verify-pin lines.
- name: Build the verifier
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
file: deploy/images/pyo.Dockerfile
target: verify
platforms: linux/amd64
cache-from: type=gha,scope=rust-${{ github.run_id }}
outputs: type=local,dest=verify-build
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: verifier-linux-aarch64
path: verifier
- name: Check the verifier
env:
VERSION: ${{ needs.verify.outputs.version }}
run: |
cp verify-build/pyo-verify verifier/pyo-verify-linux-x86_64
chmod 755 verifier/pyo-verify-linux-*
got=$(verifier/pyo-verify-linux-x86_64 version)
[ "$got" = "$VERSION" ] || { echo "::error::pyo-verify version says \"$got\", not $VERSION."; exit 1; }
for a in x86_64 aarch64; do
file -b "verifier/pyo-verify-linux-$a" | grep -qE 'static(-pie)? linked|statically linked' || { echo "::error::pyo-verify-linux-$a isn't static: $(file -b "verifier/pyo-verify-linux-$a")"; exit 1; }
done
sha256sum verifier/pyo-verify-linux-*
# 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:
# version on their pyo:release-version line, connect.sh with the
# verifier's sums on its pyo:verify-pin lines), and their SHA-256:
# pyo.dev serves only scripts that match these signed sums.
- name: Write release.json
env:
Expand All @@ -270,17 +342,42 @@ jobs:
--mysql-operator "$(digest mysql-operator)" --mysql-backup "$(digest mysql-backup)" \
--postgres-16 "$(tagged postgres 16-)" --postgres-17 "$(tagged postgres 17-)" --postgres-18 "$(tagged postgres 18-)" \
--agent-access "$(docker run --rm "$IMAGES/agent:$VERSION@$(digest agent)" access-hash)" \
--database-pins "$(docker run --rm "$IMAGES/agent:$VERSION@$(digest agent)" database-pins)" \
--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)" \
--scripts release-scripts > release.json
jq '{version, images, k3s, minFrom, manualOnly, beforeYouUpdate, agentAccess, sandbox, sandboxGvisor, scripts, migrations: (.migrations | length)}' release.json
--verifier verifier --scripts release-scripts > release.json
jq '{version, images, k3s, minFrom, manualOnly, beforeYouUpdate, agentAccess, sandbox, sandboxGvisor, verifier, scripts, migrations: (.migrations | length)}' release.json
# The verifier's sums are the files', and connect.sh carries them.
- name: Check release.json's verifier
env:
VERSION: ${{ needs.verify.outputs.version }}
run: |
jq -r '.verifier | to_entries[] | "\(.value) verifier/pyo-verify-\(.key)"' release.json | sha256sum -c
[ "$(jq '.verifier | length' release.json)" = 2 ]
grep -qx "PYO_VERIFY_RELEASE=\"$VERSION\" # pyo:verify-pin release" release-scripts/connect.sh
for a in x86_64 aarch64; do
sum=$(jq -r --arg k "linux-$a" '.verifier[$k]' release.json)
grep -qx "PYO_VERIFY_SHA256_${a^^}=\"$sum\" # pyo:verify-pin $a" release-scripts/connect.sh
done
# 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.
#
# A release candidate's version isn't one installations take, so the
# upgrader checks everything else in it: a copy with the version's
# numbers alone.
- name: Check release.json with the release's upgrader
run: docker run --rm -v "$PWD/release.json:/release.json:ro" "$(jq -r .images.agent release.json)" check-release /release.json
env:
RC: ${{ needs.verify.outputs.rc }}
run: |
check=release.json
if [ "$RC" = true ]; then
jq '.version |= sub("-rc\\.[0-9]+$"; "")' release.json > release-check.json
check=release-check.json
fi
docker run --rm -v "$PWD/$check:/release.json:ro" "$(jq -r .images.agent release.json)" check-release /release.json
# release.json is signed like the images: keyless, as this workflow
# at this tag. install.sh, pyo-up.sh --release and the dashboard's
# updates (pyo-api sigstore.rs) check it before using anything in it.
Expand Down Expand Up @@ -358,6 +455,8 @@ jobs:
release-scripts/connect.sh
release-scripts/join.sh
release-scripts/sandbox.sh
verifier/pyo-verify-linux-x86_64
verifier/pyo-verify-linux-aarch64
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 Down Expand Up @@ -385,20 +484,31 @@ jobs:
--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
# What the draft holds now: each install script and verifier as
# release.json lists it.
- name: Check the draft's install scripts and verifier
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)" ]
gh release download "$GITHUB_REF_NAME" --pattern 'pyo-verify-*' --dir uploaded-verifier
jq -r '.verifier | to_entries[] | "\(.value) uploaded-verifier/pyo-verify-\(.key)"' release.json | sha256sum -c
[ "$(ls uploaded-verifier | wc -l)" = "$(jq '.verifier | length' release.json)" ]
# A release candidate is a pre-release: never GitHub's latest.
- 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
RC: ${{ needs.verify.outputs.rc }}
run: |
if [ "$RC" = true ]; then
gh release edit "$GITHUB_REF_NAME" --draft=false --prerelease
else
gh release edit "$GITHUB_REF_NAME" --draft=false --latest
fi

# 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
Expand All @@ -407,9 +517,12 @@ jobs:
# 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.
#
# Not for a release candidate: pyo.dev serves releases only.
site:
name: Rebuild pyo.dev
needs: release
needs: [verify, release]
if: needs.verify.outputs.rc != 'true'
runs-on: ubuntu-24.04
permissions: {}
steps:
Expand Down
33 changes: 29 additions & 4 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
@@ -1,6 +1,6 @@
[workspace]
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"]
members = ["crates/pyo-proto", "crates/pyo-sigstore", "crates/pyo-verify", "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.5.5"
Expand Down
Loading