fix(relay): stop forcing manual relay deploys by default (#13563)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
9c49228f54
commit
18c1210810
2 files changed
+16
-15
No files matched your search
@@ -4,15 +4,15 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
# Alchemy does not redeploy the Worker when only a Config value read in its
|
||||
# Init changes (alchemy-run/alchemy#1831), so a changed repository variable
|
||||
# needs a forced deploy to reach production.
|
||||
# Redeploys main after a variable or secret change. Alchemy redeploys the
|
||||
# Worker when a value it reads changes, so force is rarely needed, and it
|
||||
# replaces the Postgres runtime role (alchemy-run/alchemy#1832).
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force:
|
||||
description: Redeploy every resource, including ones with no detected changes
|
||||
description: Redeploy every resource, including ones with no detected changes. Replaces the Postgres runtime role.
|
||||
type: boolean
|
||||
default: true
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
+11
-10
@@ -140,10 +140,11 @@ Required `production` environment secrets:
|
||||
- `CLERK_SECRET_KEY`
|
||||
- `APNS_PRIVATE_KEY`
|
||||
|
||||
The relay Worker reads these variables and secrets when it is deployed. Alchemy does not redeploy the
|
||||
Worker when only one of these values changes ([alchemy-run/alchemy#1831](https://github.com/alchemy-run/alchemy/issues/1831)),
|
||||
so a push to `main` without relay code changes leaves the old value in place. After changing one, run
|
||||
the **Deploy T3 Connect relay** workflow manually from `main` with **force** checked.
|
||||
After changing a variable or secret, run the **Deploy T3 Connect relay** workflow manually from
|
||||
`main` with **force** unchecked. Alchemy compares the values the Worker reads and redeploys it when
|
||||
one changed. Check **force** only to redeploy resources with no detected change: a forced run also
|
||||
replaces the Postgres runtime role and its password
|
||||
([alchemy-run/alchemy#1832](https://github.com/alchemy-run/alchemy/issues/1832)).
|
||||
|
||||
The account-scoped repository credentials are consumed by Alchemy while provisioning relay stages; they
|
||||
are not bound into the relay Worker. The production deployment uses an Axiom personal access token,
|
||||
@@ -168,7 +169,7 @@ because those builds register recovery and replace a deleted tunnel after wake.
|
||||
1. Deploy the relay and migration with cleanup `off`.
|
||||
2. Release the server build and confirm current hosts register recovery. Older hosts stay marked
|
||||
legacy and are never candidates.
|
||||
3. Set `dry-run`, run a forced relay deploy, and read the sweep counters (`scanned`, `wouldDelete`,
|
||||
3. Set `dry-run`, run a relay deploy, and read the sweep counters (`scanned`, `wouldDelete`,
|
||||
`skippedLegacy`, `skippedOrphan`, `failed`, `truncated`) across several sweeps. Each sweep records
|
||||
them, and the active `mode`, as `relay.managed_endpoint_reaper.*` attributes on its
|
||||
`relay.managed_endpoint_reaper.sweep` span in Axiom.
|
||||
@@ -178,10 +179,10 @@ because those builds register recovery and replace a deleted tunnel after wake.
|
||||
The job runs every five minutes with a five-minute grace period for tunnels that lost their
|
||||
connector, so a candidate is usually removed five to ten minutes after it goes down. Tunnels that
|
||||
never connected wait an hour. One sweep attempts at most 100 deletions, so a backlog takes longer.
|
||||
Changing `RELAY_TUNNEL_CLEANUP_MODE`, including turning cleanup off during an incident, needs a forced
|
||||
relay deploy. Confirm the new `mode` on the next sweep span.
|
||||
Changing `RELAY_TUNNEL_CLEANUP_MODE`, including turning cleanup off during an incident, needs a relay
|
||||
deploy without force. Confirm the new `mode` on the next sweep span.
|
||||
|
||||
To roll back, set cleanup to `off` and run a forced relay deploy before downgrading any host. Keep the
|
||||
To roll back, set cleanup to `off` and run a relay deploy before downgrading any host. Keep the
|
||||
recovery endpoints deployed while current server builds are in use. The nullable columns can stay.
|
||||
|
||||
### Disposable-host canary
|
||||
@@ -201,8 +202,8 @@ stage, test Cloudflare account, disposable host, and disposable T3 home. Keep pr
|
||||
and pause it with `kill -STOP <first-pid>`. Wait until Cloudflare reports it down for over five
|
||||
minutes.
|
||||
5. Confirm dry-run counts the first tunnel in `wouldDelete` and the second in `skippedLegacy`.
|
||||
6. Set cleanup `enabled` on the disposable stage and deploy it with `--force`. Confirm in the test
|
||||
Cloudflare account that the first tunnel is deleted and the legacy tunnel still exists.
|
||||
6. Set cleanup `enabled` on the disposable stage and deploy. Confirm in the test Cloudflare account
|
||||
that the first tunnel is deleted and the legacy tunnel still exists.
|
||||
7. Resume the first child with `kill -CONT <first-pid>`. Confirm the running server detects the
|
||||
repeated rejection, requests recovery, and becomes reachable at the same hostname without a
|
||||
restart.
|
||||
|
||||
Reference in new issue
Block a user