Repository navigation
app/: production refuses to boot without GitHub, Stripe or Postmark configured (sc-8900) - #113
Open
ndbroadbent wants to merge 2 commits into
Open
ndbroadbent wants to merge 2 commits into
ndbroadbent wants to merge 2 commits into
Conversation
… the OAuth application and the App, all five settings, named when missing
…k secret, or Postmark's token
This branch has not been 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.
After the cutover (sc-8900), production came up with GitHub unset everywhere. The new manifests read the
visualci-githubSecret by the ExternalSecret's lowercase data keys, withoptional: true, so all five settings were empty. The sign-in page offered no forge, checks and pull request comments couldn't reach GitHub, and nothing said why. Stripe's key, its webhook secret and Postmark's token had the same mistake (talira infra's audit). talira infra fixed all eight. This makes the same mistake stop the boot instead.forge::github_app::check, run at boot after the other production checks: in production, all ofGITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET(sign-in),GITHUB_APP_ID,GITHUB_APP_PRIVATE_KEY_BASE64andGITHUB_WEBHOOK_SECRET(the App: checks, comments, the webhook) must be set and not blank. The error names each one that's missing. Outside production nothing changes: development and tests run without GitHub.billing::checkalso needsSTRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRETin production (it already refused a test key), andnotify::postmark::checkneedsPOSTMARK_SERVER_TOKEN. Without it every email would wait in the outbox for good.tests/hosts.rs:production_needs_github_configuredcovers two cases. It boots with two settings blank, as the cutover had them, and checks the boot is refused and names both. It then boots with all five and checks that/auth/providersoffers GitHub. Each Stripe and Postmark setting, left blank, refuses the boot and is named. The production test app now sets the five settings. One stale comment is corrected (dev-login's POST is a 405).The infra side, dropping
optional: truefrom these secretKeyRefs, goes to talira infra.Ran on a build-pool box with a throwaway Postgres 17: fmt, clippy
-D warnings,hosts(9),sign_in(17),billing(8) andemails(4) all pass. talira infra confirms every key is set in production andoptional: trueis gone, so this is safe to deploy after the cutover's step 9.