Skip to content

fix(trigger): keep each worker's egress gateway address out of the env sync - #9821

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/trigger-owned-outbound-gateways
Nov 9, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/trigger-owned-outbound-gateways

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • The Trigger.dev env sync (chore(trigger): sync Trigger.dev env vars from the app's Secrets Manager secret, gated per environment #9632) copies every app key except a Trigger-owned list. OUTBOUND_GATEWAYS wasn'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_UNAVAILABLE after two connect timeouts. App-side requests are unaffected.
  • OUTBOUND_GATEWAYS is now Trigger-owned, like REDIS_URL. OUTBOUND_GATEWAY_CREDENTIALS and OUTBOUND_ROUTING_SOURCE are 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_TIMEOUT on 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.ts fails 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.

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 9, 2026 11:34pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the documented one-time worker configuration restore.

Summary

Stops the app's gateway addresses from overwriting worker-specific addresses during Trigger.dev env sync.

  • Trigger.dev workers keep their own gateway address during environment sync.

Reviews (2) · Last reviewed commit: "fix(trigger): keep each worker's egress ..." · Reviewed by Greptile

…v sync

The Trigger.dev env sync copies the app's OUTBOUND_GATEWAYS over the
worker value. The app reaches a gateway through the VPC load balancer;
workers reach it through their own private endpoint, so the copied URL
is unreachable from a run and every gateway-routed request in a
background run fails with GATEWAY_UNAVAILABLE after two connect
timeouts. OUTBOUND_GATEWAYS is now Trigger-owned like REDIS_URL; the
shared credentials and routing source still sync.
@waleedlatif1
waleedlatif1 force-pushed the fix/trigger-owned-outbound-gateways branch from f536187 to e719c2d Compare November 9, 2026 23:34
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — e719c2d2 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant