[wip] js2py to quickjs#38473
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request replaces the js2py library with quickjs-ng for executing JavaScript UDFs in Beam YAML, addressing compatibility issues with Python 3.12. The implementation introduces a _JsWrapper class that utilizes thread-local caching for JavaScript functions and handles data transfer via JSON. Feedback includes suggestions to move the thread-local cache to the module level for better idiomaticity, removing a redundant local import of quickjs, and improving the regex used to identify JavaScript function names to support async declarations.
ebf6880 to
9b29dc3
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request replaces the js2py library with quickjs-ng for executing JavaScript UDFs within Beam YAML. Key changes include the introduction of a _JsWrapper class and a thread-local cache for JavaScript functions. Feedback focuses on potential regressions and performance issues caused by using JSON serialization for data transfer, fragility in the JavaScript variable unpacking logic for non-standard field names, and a restrictive regex for identifying function names in callables.
fix SomeTransform picklability in readme_test.py fix lint address gemini comments
74269ed to
f4217b0
Compare
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.