-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Account for botManagement proxy in structuredClone #566
Conversation
I believe the DO Storage & Queues bindings both use the V8 serializer directly, rather than going through the workerd/src/workerd/api/queue.c++ Lines 14 to 21 in ed865f4
workerd/src/workerd/api/actor-state.c++ Lines 726 to 734 in ed865f4
Would those be covered by this change? My bad if they already are! |
314110b
to
337b5a0
Compare
@KianNH ... yeah, good point. Ok, I've updated the PR to account for the additional places. Hopefully this will be temporary and we can pull this back out soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me (although I'm not sure I would have necessarily caught the additional serializer uses).
This is ugly and horrible but hopefully temporary. While we are logging the cf.botManagement uses, since we are using a Proxy to catch accesses and Proxy is not supported via structuredClone, we end up having to intercept and handle the case where `request.cf` is passed off to structuredClone. It's *possible* we might have to do this elsewhere if folks are passing request.cf off to other things that using the v8 serializer? I certainly hope not.
337b5a0
to
57ca2bc
Compare
TBH I would rather just remove the botManagement logging at this point. It seems like it's just not workable. I don't like that this PR adds expense to every serialization operation, and meanwhile it seems very possible that more obscure stuff is broken. |
I suppose this hack only even covers the case where the |
This is ugly and horrible but hopefully temporary. While we are logging the cf.botManagement uses, since we are using a Proxy to catch accesses and Proxy is not supported via structuredClone, we end up having to intercept and handle the case where
request.cf
is passed off to structuredClone.It's possible we might have to do this elsewhere if folks are passing request.cf off to other things that using the v8 serializer? I certainly hope not.