Repository navigation
chore(release): 0.4.5 - #5
Merged
Merged
Conversation
An admin pastes a short-lived Tailscale API access token and Pyo does the tailnet setup itself. planTailscaleSetup reads the tailnet and says what's missing without changing anything. setUpTailscale then turns on MagicDNS and HTTPS certificates, adds tag:pyo to the policy (and a grant or autoApprovers when needed), creates Pyo's own OAuth client with the scopes the manual path asks for, saves it like a pasted one, and deletes the token last. The policy is HuJSON and is edited in place with jsonc-parser's CST, so comments and formatting stay. It's validated, then written with If-Match, and read again once on a 412. A policy managed in Git is never written: the plan returns the lines to add. A tailnet that's already set up gets no changes. The token is kept in memory for the one request: it's never stored, logged or put in an error. Both operations are for admins in the dashboard only, so API keys and MCP can't run them.
The Tailscale card now leads with one field for an API access token, a link to Tailscale's Keys page, and a Check step that shows what Pyo will change, with the policy lines it adds, before Set up. Making an OAuth client by hand stays as "Set up with an OAuth client instead".
SecretInput takes an optional onPasteText. Where the browser can read the clipboard, a paste button sits beside the show toggle.
Cards share one layout: logo, name, one line, a status badge (Connected, Not set up, Needs attention) and one action, Set up or Manage. The kebab menus are gone. Test, Disconnect, the guide and adding another account now live in each dialog. Every dialog has the logo and name as its title, one sentence with the guide link, then the fields or what's connected, then Cancel or Done and one primary action. Tailscale's token setup shows its steps (Token, Review, Done). Errors sit under their field, buttons spin while they work, secrets use show and paste, and Disconnect asks inline instead of in a second dialog. GitLab, registries and secret stores switch to their form inside the same dialog instead of stacking one on top.
Replace next to the saved secret opened the access token setup, so the secret alone couldn't be rotated. It now opens the client ID and secret form with the saved client ID filled in.
…t path The setup's Api::send repeated Client::call's request and error handling. Both now go through tailscale::send, and the setup keeps only its own token, headers and scrubbing.
survey() read them one after another. They don't depend on each other, so they now run together with try_join.
plan_of parsed the policy text again to see whether the tailnet reaches tag:pyo, and turned a parse error into an empty policy. The policy is now parsed once when it's read, and what the plan needs comes with it.
Access limited to a group or a posture counted as not reaching tag:pyo, so the setup added a grant for autogroup:member and widened it. Any accept rule to tag:pyo now counts as the admin's choice. Pyo only adds the missing ports for those same sources, with their posture, and uses autogroup:member only when no rule reaches tag:pyo at all.
When a newer Pyo is out, the installation's admin sees its version, the release notes, a link to Updates and the install command that updates Pyo. Dismissed per version in localStorage. Hidden on hosted Pyo and while an update runs.
Connect Git, deploy a service, add a domain, turn on backups and set up Tailscale. Each step ticks itself off from the snapshot and links to its page. Backups show for team admins with a backup store, and Tailscale for the installation's admin. The card hides once done or dismissed.
… token On a 412 the setup re-patched the fresh policy and saved it, though the admin had only reviewed the plan for the old one. Apply also read the policy again itself, so an edit made between plan and apply was saved unreviewed too. The plan now returns the policy's version, which setUpTailscale takes back. If the policy differs, or a save gets a 412, nothing more changes and reviewAgain comes back with the token kept for the new review. A setup that stopped partway or failed early kept the pasted token and showed no todo. Every other exit now deletes it, or asks the admin to when it can't. Failures come back as an outcome with ok false, so what changed and what became of the token always show.
Setting up sends the plan's version. When the tailnet changed since, the dialog plans again and shows the new changes. A stopped setup clears the token, since it's deleted or listed to delete.
planTailscaleSetup and setUpTailscale held run_op's Postgres transaction open across many Tailscale calls. They now run before it: reads go through the pool, and setUpTailscale logs the change in a short transaction of its own afterwards.
/new?repo=<repository URL> and ?image=<image> open the last-used team's deploy page with that source filled in. Signing in first returns to the same link. The deploy page checks each param and shows what's wrong with an invalid link. A repository is an https URL on GitHub, GitLab or the host of one of the team's GitLab connections. A tree link picks its branch and the folder to build. Other Git hosts show that they aren't supported yet. A linked repository goes through the team's GitHub or GitLab connection when it sees it. Without one, the page offers to connect it, and asks for a builder when none is ready. Nothing deploys until Deploy is pressed.
Connecting GitHub from a deploy link used to land on Integrations. The deploy page now keeps its own path in this tab before leaving for GitHub, and Integrations sends the person back to it with how it went. Only a same-origin path for the same team, under 30 minutes old, is followed. Connecting from anywhere else drops a kept path.
A browser downloaded join.sh, connect.sh, sandbox.sh and host-units.sh since they came as text/x-shellscript. They now share one text/plain type, so a browser shows them. web::headers already makes every response nosniff.
Alert channels belong to a team and its owners and admins manage them. Bot tokens, webhook URLs and signing secrets are sealed with the team's key. Alerts come from the activity log: an entry that is an alert event queues one job per channel in the same transaction, so delivery never blocks the request or rollout and is retried with backoff. Requests go through the outbound guard (no loopback, link-local, metadata or cluster ranges), Discord and Slack only to their own webhook hosts, and webhooks over https or plain http to private networks where allowed, never on a hosted Pyo. Webhooks are signed with HMAC-SHA256 over the timestamp and body. One alert per subject per 15 minutes, with "back online" and a held "offline" for flapping servers.
The activity log now has entries for a cluster that stops reporting (after a grace period once Pyo starts), a server that stops or starts being ready, a backup run that fails, and a domain certificate that was issued and now fails to renew. These raise alerts.
Each heartbeat listed every pod in the cluster as one response, whole. A server short of disk evicted the gateway's proxy over and over and left about 4,700 Failed pods (Kubernetes only collects them past 12,500). That one list was about 92 MB of JSON and over 500 MB once decoded, so the agent was OOMKilled at its 256Mi limit right after starting, and again on every restart. Lists now come a page at a time (250), heartbeat pods leave out ended ones (except the ended pods of Pyo's Jobs, which cron runs read), and what's kept of each pod, workload, job and node is cut down to what the agent reads. The same goes for the drain, room, database metrics and rollout event lists.
Every five minutes the agent deletes Failed pods that ended more than ten minutes ago in pyo-system, pyo-gateway and the namespaces it manages (projects', teams' databases'), keeping the newest three per owner. Never a Job's pods, never another namespace. At most 500 a run, 25 at a time with a pause between, each by its uid. The agent's role in pyo-gateway may now delete pods, for the proxy's.
A server's DiskPressure and MemoryPressure conditions already come with each heartbeat. The activity now has an entry when a server becomes low on disk space or memory, and one when it has enough again. One that comes back within 15 minutes of ending is logged only once that window is over, if it still holds. Both raise alerts under a new server_pressure setting, held to one per window like going offline.
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.5: everything on dev since 0.4.4, Tailscale setup with one access token, the Integrations redesign, the update notice and setup checklist, Deploy with Pyo links, alerts to Telegram, Discord, Slack and webhooks, server pressure alerts, the agent's pod list fixes, and the version bump.