Repository navigation
Preserve existing secret bindings during Worker deployments - #15964
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 046aa60 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 |
Contributor
|
LGTM |
jamesopstad
marked this pull request as ready for review
September 30, 2026 10:08
@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: |
workers-devprod
requested review from
a team and
dario-piotrowicz
and removed request for
a team
September 30, 2026 10:08
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
jamesopstad
force-pushed
the
james/deploy-keep-secrets
branch
from
September 30, 2026 10:19
4eef2a7 to
5275f87
Compare
petebacondarwin
approved these changes
Sep 30, 2026
workers-devprod
approved these changes
Sep 30, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
Merged
hyperspeed-ci Bot
pushed a commit
to mauricekleine/mauricekleine.com
that referenced
this pull request
Sep 30, 2026
cf 1.0.0-beta.8 includes the fix for cloudflare/cf#70 (cloudflare/workers-sdk#15964), so this reapplies the cf migration reverted in #66. A throwaway Worker kept its secret across cf deploy, cf deploy --prebuilt and cf workers versions create --prebuilt. The signup secrets are now declared with bindings.secret(), so a deploy fails instead of shipping without them. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
mauricekleine
added a commit
to mauricekleine/fluncle
that referenced
this pull request
Oct 1, 2026
cf 1.0.0-beta.8 keeps existing Worker secrets on deploy (cloudflare/cf#70, fixed in cloudflare/workers-sdk#15964), so fluncle-web moves from Wrangler to cf. - apps/web/cloudflare.config.ts replaces wrangler.jsonc. The Vite plugin loads it through experimental.newConfig and writes cf's build output, which deploy:cf ships with `cf deploy --prebuilt`. - @cloudflare/vite-plugin goes to 1.61, the oldest release that reads cf's config format and clears minimumReleaseAge. - The client-chunk purity gate keys on the Vite environment instead of the output directory name, which no longer ends in "client". - Sentry source maps upload from cf's output directories. - purge-edge-cache reads the zone id from cloudflare.config.ts. Secrets are not declared with bindings.secret(): declaring any makes local dev load only declared names from .dev.vars, which drops the E2E stack's fake endpoints. apps/ci-events stays on Wrangler; cf can't find its hoisted wrangler bundler, and the relay isn't deployed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
hyperspeed-ci Bot
pushed a commit
to mauricekleine/fluncle
that referenced
this pull request
Oct 1, 2026
* chore(web): deploy with the cf CLI cf 1.0.0-beta.8 keeps existing Worker secrets on deploy (cloudflare/cf#70, fixed in cloudflare/workers-sdk#15964), so fluncle-web moves from Wrangler to cf. - apps/web/cloudflare.config.ts replaces wrangler.jsonc. The Vite plugin loads it through experimental.newConfig and writes cf's build output, which deploy:cf ships with `cf deploy --prebuilt`. - @cloudflare/vite-plugin goes to 1.61, the oldest release that reads cf's config format and clears minimumReleaseAge. - The client-chunk purity gate keys on the Vite environment instead of the output directory name, which no longer ends in "client". - Sentry source maps upload from cf's output directories. - purge-edge-cache reads the zone id from cloudflare.config.ts. Secrets are not declared with bindings.secret(): declaring any makes local dev load only declared names from .dev.vars, which drops the E2E stack's fake endpoints. apps/ci-events stays on Wrangler; cf can't find its hoisted wrangler bundler, and the relay isn't deployed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * chore: exempt cf from the minimum release age cf 1.0.0-beta.8 is the first release whose deploy keeps Worker secrets (cloudflare/cf#70), and it is younger than the 3-day minimumReleaseAge, so CI and Workers Builds could not install it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(web): add the crawler banner to cf's client output The banner plugin skipped any output directory not ending in "client". cf's client assets land in .../assets, so browser chunks lost the banner. Key it on the Vite environment, as the purity gate already is. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * chore(web): generate Worker types with cf wrangler types read wrangler.jsonc, which this branch removes. typecheck now runs `cf workers types` first and tsconfig includes its output, so Env follows cloudflare.config.ts without a committed generated file. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(web): drop deleted source maps from the Worker manifest With SENTRY_AUTH_TOKEN set, the Sentry plugin deletes the Worker's source maps after uploading them, but the Vite plugin has already listed them in worker.config.json. cf deploy --prebuilt reads every listed module, so the production deploy would fail with "Module not found". The build now ends with prune-worker-manifest, which drops listed source maps that no longer exist and fails the build if any other listed module is missing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
1 task
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.
Fixes cloudflare/cf#70
Preserve existing secret bindings during Worker deployments
Deployments now explicitly inherit unchanged secret bindings from the previous Worker version, including secrets that are not declared in the local configuration. Wrangler already preserved these secrets through backend compatibility behavior; this change makes that behavior explicit and consistent for other consumers of the deploy helpers.
A picture of a cute animal (not mandatory, but encouraged)