Repository navigation
[deploy-helpers] Accept a secrets file in previewBuildOutput - #16751
Conversation
🦋 Changeset detectedLatest commit: b05642f The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
There was a problem hiding this comment.
✅ Approved — This is a small type change that exposes an upload path that already works, and it comes with a test. No issues found.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
Adding secretsFile to the Pick is correct, and the args are passed straight through to the existing upload path. The new test checks both that secrets are merged into the upload request and that the result is redacted.
📝 Documentation: ✅ LGTM
The JSDoc @param args now mentions the secrets file, and the changeset describes the change accurately.
Reviewed commit: b05642f2
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
previewBuildOutput()now accepts the samesecretsFileoption aspreview(). This lets the cf CLI add--secrets-filetocf previews deploy. Right now cf has no way to give a Preview its secrets: they have to be set in the dashboard or withwrangler preview secret put.The upload path already supports this.
runPreview()parses the file and uploads each entry as asecret_textbinding, andpreviewBuildOutput()passes its args straight through to it. The only thing missing wassecretsFilein thePick<PreviewArgs, ...>type.#16090 also edits that
Pick, so whichever PR merges second will hit a one-line conflict.previewBuildOutput()is only used by the cf CLI. The user-facing flag will be documented in the cf change.