Repository navigation
infra(deploy): fix nixos-changed alert, /etc/nixos drift, stale smoke check - #141
Merged
Merged
Conversation
… check Main deploys were broken from May 7 to Dec 4 because the deploy.nix fix (4c91e36) was never applied, and nothing surfaced that: - deploy-main posted the nixos-changed notification with status "warning", which the notify service rejects (success|failure|info), so the alert was never delivered. Use "failure". - `cli nixos apply` rebuilds from the worktree but never updated /etc/nixos, which deploy-main diffs against, so the "manual apply required" message fired even after an apply. Sync /etc/nixos after a successful rebuild. - The smoke check expected /projects to redirect to sign-in, but /projects has been public since ef11e37. Check /new instead. Pot-Run: 7979
danielnaab
temporarily deployed
to
infra-2026-12-04-deploy-drift-fixes
December 4, 2026 17:48
Inactive
This branch was previously deployed
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.
Context
Main deploys failed on every push from May 7 to Dec 4 with
fatal: refusing to fetch into branch 'refs/heads/main' checked out at '/srv/forms-lab/main'. The fix (4c91e36) was merged but never applied withcli nixos apply, because deploy-main deliberately skips NixOS rebuilds. Three issues kept this from being noticed or made it confusing:deploy.nixos-changedwith"status":"warning", which the notify service rejects (status must be one of: success, failure, info)./etc/nixos, butcli nixos applyrebuilds from the worktree and never updated/etc/nixos. It had been frozen since May 6, so the warning fired after every deploy, even after a successful apply./projectsto redirect to sign-in, but/projectshas been a public page since ef11e37.The server has since been fixed by hand:
nixos applywas run, main was redeployed, and/etc/nixoswas synced once.Changes
deploy.nix: the nixos-changed notification now usesstatus: failure.cli nixos apply: after a successful rebuild, copiesinfrastructure/nixosinto/etc/nixos(cp -rT).smoke-check.ts: the auth guard check now targets/new(protected byrequireAuth) instead of/projects.Testing
bun run checkpasses (1424 tests)https://forms.labs.flexion.us/main/newreturns 302 to/auth/signinbun run cli nixos apply(this PR changes deploy.nix), then check that the next main deploy reports "No NixOS config changes" and 5/5 smoke checks pass