-
Notifications
You must be signed in to change notification settings - Fork 329
(maint) Update rhai to 1.23.6 (backport #8528) #8562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Cherry-pick of 34209e8 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 10 changed, 0 removedBuild ID: b1505135faef4fbcd3aaf19e URL: https://www.apollographql.com/docs/deploy-preview/b1505135faef4fbcd3aaf19e |
0e5ea5c to
73d9c86
Compare
Co-authored-by: bryn <bryn@apollographql.com> (cherry picked from commit 34209e8) # Conflicts: # Cargo.lock
73d9c86 to
fc913ec
Compare
aaronArinder
left a comment
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.
lgtm!
Fixes issues with scientific notation in scripts and json parse.
This updates Rhai to 1.23.6 which includes rhaiscript/rhai#1039 which fixes the scientific notation parsing.
Upgrading Rhai fixes property propagation so that statements such as:
will actually try to update the header if a setter is registered.
However in a subgraph context it's not possible to update the header of the supergraph request, this caused an issue with existing scripts as we did register a setter which would error on runtime.
The fix to restore the original behaviour and allow the existing scripts to dispense with all the macro magic that we had and just not register setters for things that can't be set in the appropriate context.
Review guidance:
The first couple of commits upgrade and fix the issue. The original tests pass.
Then I have pulled the functionality out into a separate module and greatly improved the test coverage.
The new code is honestly just easier to reason about without the macros.
During the development process I have regularly downgraded and reintroduced the bug to ensure that we get consistent results.
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
[ROUTER-1487]: https://apollographql.atlassian.net/browse/ROUTER-1487?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
This is an automatic backport of pull request #8528 done by Mergify.
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
A lot of (if not most) features benefit from built-in observability and
debug-level logs. Please read this guidance on metrics best-practices. ↩Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩