Skip to content

fix: wrap AnalyticsEngine binding#155

Open
VergeDX wants to merge 1 commit into
cloudflare:mainfrom
VergeDX:main
Open

fix: wrap AnalyticsEngine binding#155
VergeDX wants to merge 1 commit into
cloudflare:mainfrom
VergeDX:main

Conversation

@VergeDX

@VergeDX VergeDX commented Jul 16, 2026

Copy link
Copy Markdown

Close #154

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@VergeDX

VergeDX commented Jul 16, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jul 16, 2026

@dom96 dom96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for this! Any chance you could add a quick test for this too?

@VergeDX

VergeDX commented Jul 16, 2026

Copy link
Copy Markdown
Author

@dom96 Actually, we already have tests here:
https://github.com/cloudflare/workers-py/blob/main/packages/cli/tests/bindings-test/src/test_analytics_engine.py
But the original issue can only be reproduced in the production environment (Requires wrangler deploy).

This is because wrangler dev (local server) uses a mock implementation from Miniflare:
https://github.com/cloudflare/workers-sdk/blob/main/packages/miniflare/src/workers/analytics-engine/analytics-engine.worker.ts

And seems the CI tests also run on the local server:
https://github.com/cloudflare/workers-py/blob/main/packages/cli/tests/test_bindings.py

@VergeDX

VergeDX commented Jul 16, 2026

Copy link
Copy Markdown
Author

Ping @ryanking13 because #130 adds support for the Workers Analytics Engine.

@ryanking13

ryanking13 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Yeah, it is tricky to test this as these classes sometimes have different class names in production and workerd dev environment. Thanks for catching this

@ryanking13 ryanking13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Could you update the commit message to make the CI happy?

⧗   input: fix: Wrap AnalyticsEngine, which is used in production.
✖   subject may not end with full stop [subject-full-stop]

@VergeDX VergeDX requested a review from ryanking13 July 16, 2026 12:56
@VergeDX VergeDX changed the title fix: Wrap AnalyticsEngine, which is used in production. fix: Wrap AnalyticsEngine, which is used in production Jul 16, 2026
@ryanking13 ryanking13 changed the title fix: Wrap AnalyticsEngine, which is used in production fix: wrap AnalyticsEngine binding Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Workers Analytics Engine] Type AnalyticsEngine is not wrapped correctly.

3 participants