Repository navigation
chore(trigger): sync Trigger.dev env vars from the app's Secrets Manager secret, gated per environment - #9632
Merged
Conversation
…ger secret, gated per environment
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Critical impact] The changes since the previous review appear safe to merge; no new blocking issue was found. SummaryAdds opt-in Trigger.dev environment sync from each app environment’s Secrets Manager secret.
Reviews (2) · Last reviewed commit: "fix(trigger): re-read values before flag..." · Reviewed by Greptile |
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
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.
Summary
prod,staging,preview) is listed in theTRIGGER_ENV_SYNC_TARGETSrepo variable, and only then does the job assume the deploy role for Secrets Manager. Nothing changes until that variable is setAWS_*(runs use workload identity, so static keys never go back in),REDIS_URL/REDIS_TLS_SERVERNAME(workers reach Redis through their own endpoint),INTERNAL_API_BASE_URL,MIGRATION_DATABASE_URL,OTEL_EXPORTER_OTLP_*,TRIGGER_*,GITHUB_TOKEN.DB_APP_NAME/SIM_DB_ROLEare code constantsNEXT_PUBLIC_*syncEnvVars(4.8.3) catches callback errors and deploys without syncing, so throwing isn't enough. The CI log shows counts only, never names or valuesDB_APP_NAME, now alsoSIM_DB_ROLE=trigger, which every environment already holds, so the CLI's unchanged-value check skips it) plus the function-execution vars as before. TheTRIGGER_DEV_ENABLEDentry is dropped:syncEnvVarsstrips everyTRIGGER_*key, so it never syncedplan-trigger-env-sync.ts, a names-only dry run of what enabling an environment would add or change.--apply-secret-flagsmarks unchanged plain-text variables as secrets, re-reading before each batch so a value rotated mid-run is skipped rather than overwritten: the CLI skips unchanged values, soisSecretalone never converts an existing variablefetchRuntimeSecretsfromloadRuntimeSecretsso the boot path and the deploy read the secret the same wayType of Change
Testing
@trigger.dev/build/trigger.dev4.8.3 source and the webapp import route to confirm the semantics: upsert-only,isSecretflips only on changed values, sync runs before deployment init, callback errors are swallowedpackages/runtime-secretstests; biome;check-source-conventions,check-file-names,check-import-specifiers,check-monorepo-boundaries,check-comment-hygiene,check-utils-enforcement,check-explicit-any. Full type-check and audits run in CIChecklist
test-auditauthoring gate)