fix(trigger): sync worker configuration from Secrets Manager at deploy - #7696
Draft
BillLeoutsakosvl346 wants to merge 1 commit into
Draft
fix(trigger): sync worker configuration from Secrets Manager at deploy#7696BillLeoutsakosvl346 wants to merge 1 commit into
BillLeoutsakosvl346 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Trigger workers now run more application code directly, but the existing deployment hook only copied a small subset of the deployer's environment. Extend
syncEnvVarsto fetch the mapped combined AWS Secrets Manager object at deployment time and synchronize only approved platform configuration. Keep customer credentials in the application database.The deployment-only module reuses the shared capability/OAuth/LLM registries, records consumer and secret classification for additional worker settings, validates source and effective configuration, and preserves Trigger-owned database, Redis, PII and telemetry settings. Missing optional values preserve existing Trigger values and produce names-only notices; no automatic deletion or continuous rotation propagation is included. The adapter sanitizes failures and exits with code 1 because Trigger 4.5.12 swallows ordinary callback exceptions.
Type of Change
Deployment prerequisites
Keep this draft until configuration ownership and deployment wiring are reviewed. This PR deliberately leaves CI orchestration, IAM and live environment changes to the separate investigation.
SIM_TRIGGER_ENV_SYNC_PROJECT_REFandSIM_TRIGGER_ENV_SYNC_REGIONin each deployment entrypoint, using existing Trigger authentication and the AWS default credential chain.SIM_DB_ROLEremain Trigger-owned; no pool behavior changes.GetSecretValueon the exact environment secret ARN, pluskms:Decryptonly when its customer-managed key requires it. Workers need no Secrets Manager grant.preview/dev-sim→/dev/sim/env-vars; branchlessstaging→/staging/sim/env-vars; branchlessprod→/production/sim/env-vars. Staging/prod project references and deploy entrypoints still need live verification.Environment import and code promotion are not atomic. Running/checkpointed jobs and cached clients may retain old configuration; omission and code rollback do not restore previous values. Removed/renamed variables require explicit owner-reviewed retirement, including preview inheritance and existing secret classification.
Testing
Completed before the request to stop further testing:
bun run testonce. It stopped on two unrelatedpackages/sim-cli/src/update/check.process.test.tsassertions: local Node 22.23.1 emits an experimentalEnvHttpProxyAgentwarning where the tests expect empty stderr. Turbo cancelled remaining suites; the full suite is not green. CI uses Node 24. Runtime-secrets tests passed before cancellation.The disposable non-production smoke test is deferred at the requester's direction. No live secret synchronization, production-secret retrieval, deployment, IAM change, or external configuration update was performed.
Checklist