-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Reserved keywords in column references break parser (fix #3597) #3927
Reserved keywords in column references break parser (fix #3597) #3927
Conversation
Deploy preview for hasura-docs ready! Built with commit fc0d73d |
Review app for commit 5b4fdbd deployed to Heroku: https://hge-ci-pull-3927.herokuapp.com |
@lexi-lambda do you want to review, or should I assign to someone else? |
@0x777 Has been doing most of the server reviews temporarily while I’ve been working on this refactoring project, so he’s probably the one to review this. |
@@ -184,6 +184,18 @@ def dir(cls): | |||
return "queries/graphql_mutation/insert/constraints" | |||
|
|||
|
|||
@pytest.mark.parametrize("transport", ['http', 'websocket']) | |||
@usefixtures('per_class_tests_db_state') | |||
class TestGraphqlInsertNullPrefixedColumnOnConflict: |
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.
I think this could probably have been added to one of the existing insert classes, since we can setup multiple unrelated tables for different tests in one class setup file. I don't think we need to change it now though.
Hi @lexi-lambda, is there anything you'd like me to do on this one before it can be reviewed for merge? |
Review app for commit b181a42 deployed to Heroku: https://hge-ci-pull-3927.herokuapp.com |
Review app for commit 8ca72dd deployed to Heroku: https://hge-ci-pull-3927.herokuapp.com |
8ca72dd
to
9694633
Compare
Review app for commit fc0d73d deployed to Heroku: https://hge-ci-pull-3927.herokuapp.com |
Review app for commit 3aa9c32 deployed to Heroku: https://hge-ci-pull-3927.herokuapp.com |
Review app for commit e019cac deployed to Heroku: https://hge-ci-pull-3927.herokuapp.com |
bc45925
to
849250f
Compare
Review app for commit 849250f deployed to Heroku: https://hge-ci-pull-3927.herokuapp.com |
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.
Changelog approved.
Review app https://hge-ci-pull-3927.herokuapp.com is deleted |
Description
This pull-request is intended to fix issues related to #3597 "Field naming starting with reserved keywords breaks updates ".
The bug is located in the parser, therefore the fix is as follows:
Affected components
Related Issues
Solution and Design
The solution was to add more nuance to the parser as can be seen in the related parser pull request: hasura/graphql-parser-hs#21
This is however only a temporary fix as the parser should probably be split into lexer/parser phases to much more effectively express the tokenisation of such identities as caused the problem here. Also this would make the code a lot more readable as it was quite difficult to narrow down the bug for a new contributor to the codebase (me!).
Steps to test and verify
Run
pytest
against the new and old versions to see the fix addressed:You can also reproduce manually in the console if preferred.
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
GraphQL
Breaking changes