Skip to content

Support autogates via MINIFLARE_WORKERD_AUTOGATES env var#8431

Merged
penalosa merged 3 commits into
mainfrom
penalosa/autogates
May 12, 2026
Merged

Support autogates via MINIFLARE_WORKERD_AUTOGATES env var#8431
penalosa merged 3 commits into
mainfrom
penalosa/autogates

Conversation

@penalosa
Copy link
Copy Markdown
Contributor

Allow for setting the autogates property of workerd config via an env var: MINIFLARE_WORKERD_AUTOGATES. This accepts a space separated list of strings that will be passed directly to workerd.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: this should be manually tested, to ensure it correctly enables autogates. cc @danlapid do you have any ideas for how this could be tested in an automated fashion?
  • Wrangler E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: Miniflare-only change
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal feature

@penalosa penalosa requested a review from a team as a code owner March 10, 2025 15:44
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 10, 2025

🦋 Changeset detected

Latest commit: 084d518

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
miniflare Minor
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
wrangler Patch

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

@danlapid
Copy link
Copy Markdown
Contributor

I guess you could replicate one of our wd tests that use this but it'll be really annoying because eventually we'll delete that autogate.
We could work really hard to create a test-specific autogate but that's probably not worth the hassle, a manual test is enough imho.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 10, 2025

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-wrangler-8431

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/8431/npm-package-wrangler-8431

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-wrangler-8431 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-workers-bindings-extension-8431 -O ./cloudflare-workers-bindings-extension.0.0.0-vf9b10c084.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vf9b10c084.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-create-cloudflare-8431 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-kv-asset-handler-8431

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-miniflare-8431

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-pages-shared-8431

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-unenv-preset-8431

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-vite-plugin-8431

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-vitest-pool-workers-8431

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-workers-editor-shared-8431

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-workers-shared-8431

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13769923490/npm-package-cloudflare-workflows-shared-8431

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.114.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20250224.0
workerd 1.20250224.0 1.20250224.0
workerd --version 1.20250224.0 2025-02-24

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link
Copy Markdown
Contributor

@CarmenPopoviciu CarmenPopoviciu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pending a confirmation that this has been manually tested 🙏

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Mar 31, 2025
@CarmenPopoviciu CarmenPopoviciu added the blocked Blocked on other work label Mar 31, 2025
@penalosa
Copy link
Copy Markdown
Contributor Author

Closing for now, since this is no longer high priority

@penalosa penalosa closed this Apr 15, 2025
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 15, 2025
@danlapid danlapid reopened this May 9, 2026
@danlapid danlapid requested a review from workers-devprod as a code owner May 9, 2026 18:09
@workers-devprod workers-devprod requested review from a team and emily-shen and removed request for a team May 9, 2026 18:10
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented May 9, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@danlapid danlapid force-pushed the penalosa/autogates branch from 3f2f460 to 80e8cfb Compare May 9, 2026 18:11
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

✅ All changesets look good

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 9, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@8431

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@8431

miniflare

npm i https://pkg.pr.new/miniflare@8431

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@8431

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@8431

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@8431

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@8431

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@8431

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@8431

wrangler

npm i https://pkg.pr.new/wrangler@8431

commit: 084d518

@danlapid
Copy link
Copy Markdown
Contributor

danlapid commented May 9, 2026

Rebased and tested locally and it works.
@penalosa can we merge please?

@penalosa penalosa added skip-pr-description-validation Skip validation of the required PR description format and removed blocked Blocked on other work labels May 11, 2026
@penalosa penalosa enabled auto-merge (squash) May 11, 2026 13:57
Copy link
Copy Markdown
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, however I wonder if this should have some documentation too? 🤔

Comment thread .changeset/sweet-fans-arrive.md Outdated
@penalosa
Copy link
Copy Markdown
Contributor Author

however I wonder if this should have some documentation too? 🤔

This is an internal-only feature, so it doesn't need any

Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Done to Approved in workers-sdk May 11, 2026
@penalosa penalosa force-pushed the penalosa/autogates branch from 49e358b to 084d518 Compare May 11, 2026 14:40
@penalosa penalosa merged commit 5d936c5 into main May 12, 2026
59 of 60 checks passed
@penalosa penalosa deleted the penalosa/autogates branch May 12, 2026 01:30
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-pr-description-validation Skip validation of the required PR description format

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants