graphql-engine
graphql-engine copied to clipboard
Server/Tests: Introduce CockroachDB Simple Query tests
This issue involves using the CockroachDB test harness in the Haskell integration test suite.
- [x] including that test fixture in the
Schema/*
andQueries/Simple
specs - [ ] creating issues for any specs that fail, and linking to them here. We can coordinate work with the CockroachDB team.
depends on https://github.com/hasura/graphql-engine/issues/8799
Have added all the tests. So far they pass if:
a) We use our HGE hotfix that stops us sending prepared arguments (as cockroach
is still strict about being sent unused prepared arguments)
b) We enable stringifyNumbers
for the tests, like we do with BigQuery, as integers from Cockroach are coming back as strings. Edit: this is expected behaviour: https://www.cockroachlabs.com/docs/stable/sql-faqs.html#why-are-my-int-columns-returned-as-strings-in-javascript
@danieljharvey is this actually blocked, then? Or, assuming the prepared args hotfix is already on main
, could we not merge the new tests onto main
?
The prepared args for metadata are fixed and in main
but the fix for regular queries is "just don't send the user metadata" which can't be merged because it unblocks console work but ruins any query that uses permissions: https://github.com/hasura/graphql-engine-mono/pull/5592
The Simple Query tests are done though, have added https://github.com/hasura/graphql-engine-mono/pull/5773 so that they can be merged behind a flag and then switched on once prepared args is fixed.
Gotcha, so confirming here that https://github.com/cockroachdb/cockroach/issues/86375, specifically a change to the wire protocol prepare, is the only thing blocking us from enabling those tests.
All tests have been added to the suite, some fail but have been commented out. These are the tickets to track those issues:
https://github.com/hasura/graphql-engine-mono/issues/5987 https://github.com/hasura/graphql-engine-mono/issues/5985 https://github.com/cockroachdb/cockroach/issues/88355