fix(trigger): keep each worker's egress gateway address out of the env sync
Merged
WA
2d ago+21+21+01234567890123456789-1-1-0123456789
Summary
- The Trigger.dev env sync (#9632) copies every app key except a Trigger-owned list.
OUTBOUND_GATEWAYSwasn't on it, so each deploy overwrote the worker's gateway URL with the app's VPC load-balancer URL. - Workers can't reach that address, so any gateway-routed request in a background run (scheduled, webhook, async API, knowledge connector sync) fails with
GATEWAY_UNAVAILABLEafter two connect timeouts. App-side requests are unaffected. OUTBOUND_GATEWAYSis now Trigger-owned, likeREDIS_URL.OUTBOUND_GATEWAY_CREDENTIALSandOUTBOUND_ROUTING_SOURCEare identical for app and worker and keep syncing.
Verification
- Reproduced on staging with an organization routed through the staging gateway: app runs exited from the gateway IPs, while every async run failed with
UND_ERR_CONNECT_TIMEOUTon both CONNECT attempts. - After restoring the worker value by hand, all eight app and async cases completed through the gateway. Until this merges, the next staging deploy reverts that value.
- New test in
trigger-env.test.tsfails on the old key list and passes with the fix.
Follow-up after merge
The worker value has to be restored once in each Trigger.dev environment that syncs (staging, prod). The sync now leaves it alone.