-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Summary
In self-hosted Trigger.dev local deployments, the build image indexer (managed-index-controller) fetches project environment variables during the Docker build stage. In our setup this call fails and aborts the entire deployment build.
Proven behavior
- Docker build fails inside:
managed-index-controller.mjs
- Error:
Failed to fetch environment variables: 403 Forbidden
- Direct API probe against:
GET /api/v1/projects/:projectRef/envvars
- Response with production runtime key (
tr_prod_...):401 Invalid or Missing API key
Why this is a Trigger.dev self-hosted bug
- The build pipeline passes
TRIGGER_SECRET_KEYinto the image build. - The indexer depends on fetching env vars during the build.
- The supplied key path does not authenticate successfully against the envvars endpoint in self-hosted mode.
- Result: deployment image build hard-fails before publish.
Repro
- Self-host Trigger.dev v4 with local builds enabled
- Run
trigger.dev deploy - Let build reach the
managed-index-controllerstep - Observe failure on env var fetch
Expected
- Build-stage env var fetch succeeds with the provided deployment/build auth
- or the indexer degrades gracefully and continues with an empty env set
Actual
- Build aborts with:
Failed to fetch environment variables: 403 Forbidden
Evidence
- Build log excerpt:
Failed to index deploymentmessage: 'Failed to fetch environment variables: 403 Forbidden'
- Direct endpoint probe:
GET /api/v1/projects/proj_ncohokyumnepswndlhei/envvars- with
tr_prod_... - returns
401 Invalid or Missing API key
Suggested fix
- Use the correct auth token type for build-time envvar resolution
- or make
managed-index-controllernon-fatal when envvar fetch fails
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels