Skip to content

Move the AE simulator from JSRPC to a Wrapped binding#9256

Merged
edmundhung merged 9 commits intomainfrom
penalosa/ae-wrapped
May 15, 2025
Merged

Move the AE simulator from JSRPC to a Wrapped binding#9256
edmundhung merged 9 commits intomainfrom
penalosa/ae-wrapped

Conversation

@penalosa
Copy link
Contributor

Fixes #9254

Because AE was available before JSRPC, using JSRPC for it's local simulator causes failures for Workers with a compat date before the JSRPC flag was enabled. Shifting to a Wrapped binding should resolve this.

Note: AE is still a no-op in local dev—this PR changes no functionality.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix
  • Wrangler V3 Backport

@penalosa penalosa requested a review from a team as a code owner May 15, 2025 09:45
@changeset-bot
Copy link

changeset-bot bot commented May 15, 2025

🦋 Changeset detected

Latest commit: 3ef2907

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

This PR includes changesets to release 5 packages
Name Type
miniflare Patch
wrangler Patch
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers 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

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk May 15, 2025
@workers-devprod workers-devprod added the e2e Run wrangler + vite-plugin e2e tests on a PR label May 15, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 15, 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/15051866372/npm-package-wrangler-9256
Prereleases for other packages:

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vite-plugin:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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

@github-actions
Copy link
Contributor

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main penalosa/ae-wrapped might be a good starting point.

name = "${workerName}"
main = "src/index.ts"
compatibility_date = "2024-08-08"
compatibility_date = "2022-08-08"
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a compat date before JSRPC was enabled, and so should test that AE works with the old compat date

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see - the regression was triggered by old compat dates - so this is checking that.

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Approving from the look of the code. Need to understand why the CI is failing though...

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk May 15, 2025
@penalosa penalosa enabled auto-merge May 15, 2025 10:32
@penalosa penalosa requested a review from a team May 15, 2025 12:04
@penalosa penalosa requested review from a team as code owners May 15, 2025 12:04
@penalosa penalosa force-pushed the penalosa/ae-wrapped branch from 6dfcbea to beec4fd Compare May 15, 2025 12:04
@penalosa penalosa force-pushed the penalosa/ae-wrapped branch from b456722 to 3ef2907 Compare May 15, 2025 17:54
@edmundhung edmundhung disabled auto-merge May 15, 2025 18:34
@edmundhung edmundhung merged commit 3b384e2 into main May 15, 2025
18 checks passed
@edmundhung edmundhung deleted the penalosa/ae-wrapped branch May 15, 2025 18:34
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run wrangler + vite-plugin e2e tests on a PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Regression with Analytics Engine writeDataPoint and older compatibility_date in 4.13.0

4 participants