Commit Graph

376 Commits

Author SHA1 Message Date
Brandon Simmons
f28b7cdfd8 Jberryman/07 11 2023 new cabal workarounds
some dev.sh cabal project file fixes

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9842
GitOrigin-RevId: a3a095f9ac7739ff94514d53222818f400269f8a
2023-07-12 08:30:35 +00:00
Daniel Harvey
cb02a9a034 chore(server): add tests/support for inserting JSON arrays
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9704
GitOrigin-RevId: 4c2820c302d056bed92bf61e3670419c6da1563e
2023-06-29 09:50:36 +00:00
Philip Lykke Carlsen
a9c2afa8e0 chore: Small dev improvements
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9637
GitOrigin-RevId: 7ff15af9733c3192df265b624fadb494c8c99e23
2023-06-23 20:22:59 +00:00
Samir Talwar
53a65b01a6 make: Always start all databases when running API tests.
We test remote relationships across databases, and so running e.g. the "Postgres" tests also runs the "Postgres-SQLServer" tests, the "Postgres-Cockroach" tests, etc.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9645
GitOrigin-RevId: bdc4e0f887d618f0c3b44868f552f545f0b228b0
2023-06-22 16:44:02 +00:00
Daniel Harvey
98fdeda54e fix(server): skip insert when no values provided for SQLServer
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9564
GitOrigin-RevId: 7d95ee428b8da7e246d9f1040f04d8abe359b667
2023-06-16 08:48:48 +00:00
Philip Lykke Carlsen
44dd00fc37 fix: Improvements to makefiles
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9547
GitOrigin-RevId: b02e586662b92ad085fa7ff6e19606a93098ed3f
2023-06-14 18:40:00 +00:00
Daniel Harvey
d49c476176 chore(postgres-agent): implement dataset API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9326
GitOrigin-RevId: 55f3e63dfcbc79474800b4a3dac00e0e9c82871f
2023-06-13 18:10:39 +00:00
Gil Mizrahi
e6ee9db169 trim a nq end to remove spaces and then semicolons
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9515
GitOrigin-RevId: 95e93d017ac9757a8088aea3015836b5d8236d66
2023-06-13 17:23:07 +00:00
Rikin Kachhia
5601e1bd1f update install manifests with v2.27.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9480
GitOrigin-RevId: e41a50f9d3144a8306e16de458d06d3683b80cce
2023-06-08 13:57:55 +00:00
Daniel Harvey
93860fd244 chore(tooling): fix make ghcid-* commands
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9453
GitOrigin-RevId: 491b1a82e1c820a5642f023fb409cf1e9844be5d
2023-06-07 12:20:11 +00:00
Brandon Simmons
440a8664de server: Upgrade the HGE server to GHC 9.4.5
Upgrade to GHC 9.4.5, and update any tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8954
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 5261126777cb478567ea471c4bf5441bc345ea0d
2023-06-06 13:29:30 +00:00
Puru Gupta
328b7b793f server: add support for redis clusters
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8867
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
GitOrigin-RevId: 6ab173b02f6b8bf97ccbcdb00110fe147771c751
2023-06-05 12:11:59 +00:00
Tom Harding
b124c943a9 chore(server): allow recursive native queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9373
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: b998da0e2725f687a00c2c6c993435e44df4f70f
2023-06-02 10:37:55 +00:00
Gil Mizrahi
3ce1b414b4 NativeQueries: validate that there are no unused or undeclare arguments
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9357
GitOrigin-RevId: 9d0ac74c8a2780c6d1b3e7769c3d4775bacb2d8d
2023-06-01 09:15:48 +00:00
Tom Harding
82d3cd477e "Better" Python version checking in dev.sh
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9347
GitOrigin-RevId: 952253a3683e30f59181e9cba2e77941635e5922
2023-05-30 11:29:52 +00:00
Gil Mizrahi
209fec7bb1 fix: nq relationships - throw an error instead on unexpected relationship
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9282
GitOrigin-RevId: 82ffda0d93de976181bae7befa9b62868355cd16
2023-05-24 14:37:57 +00:00
Tom Harding
10b773066a Run ormolu on the contrib directory
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9279
GitOrigin-RevId: 4b45fad3983394722034f9d8267a8bd0d2358453
2023-05-24 10:20:01 +00:00
Tom Harding
84ff37f8fb Numeric Aggregation of Postgres Computed Fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9210
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: c9f7f36e4a93ac2a2669590fe9ba83bb63a1f7ea
2023-05-23 14:48:03 +00:00
Samir Talwar
39786d54d8 make: Use the Docker Compose file from pro when running pro tests.
Let's keep these separate.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9248
GitOrigin-RevId: cdcdbc0e32aee11d495ba12bf820a883ba39daa8
2023-05-23 10:15:20 +00:00
Samir Talwar
4b50704061 make: Set an admin secret for the Pro server.
Otherwise it won't run at all with a license key.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9246
GitOrigin-RevId: 2c80baac78d4e209dee15f86e93bc7f958e1d1e0
2023-05-22 13:53:50 +00:00
Philip Lykke Carlsen
30fbdf2e83 feat(tests): Add support for heartbeat monitoring
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9212
GitOrigin-RevId: 38491ce24ae766533b55e0b402b883d3066618fe
2023-05-22 08:04:03 +00:00
Philip Lykke Carlsen
3c7fa7cca1 feat(tests-harness): Support api-tests using postgres-agent data connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9188
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 3eda64bcfcaebfb3fcef6783a88a1a4d36dade43
2023-05-17 14:44:06 +00:00
Daniel Harvey
48d4882b6c chore(server): NQ -> NQ array relationships for SQLServer and BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9166
GitOrigin-RevId: ac713d50059737728796d89ee5bc8f907cf85ff8
2023-05-16 17:40:56 +00:00
Daniel Harvey
b85272224e chore(postgres-agent): use capabilities from Rust POC agent
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9106
GitOrigin-RevId: 2536335b59ddf7e1353a41476f41ad4cfb389642
2023-05-10 11:42:25 +00:00
Gil Mizrahi
181f780273 WIP IN PROGRESS Query for postgres dc
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9071
GitOrigin-RevId: 863417976f6c2483ba092a8e8d660dfea8aca0a4
2023-05-05 16:31:13 +00:00
Samir Talwar
37fe99418c dc-agents/postgres: Test on random ports.
The ports we use for testing often collide with other containers that other test suites leave lying around. This is annoying.

This fixes the problem by ensuring that PostgreSQL runs a on random port. FWe can query Docker to find out the allocated port.

I also changed the `make` target to run the agent too (though I kept the old behavior under a different target name).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9053
GitOrigin-RevId: 3ddea297905c0019c5ac42d896f5609f0d079e93
2023-05-05 13:02:02 +00:00
Nicolas Beaussart
8b447a5880 frontend: switch to yarn berry
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9052
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
GitOrigin-RevId: d9c8bc29f9309247944d130d545c6dcaccff366a
2023-05-05 08:57:54 +00:00
Daniel Harvey
cb9056ab8a chore(postgres-agent): introspect table names from database
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9042
GitOrigin-RevId: de2412ee2511d4cd0b72a660a85ac26a3214d735
2023-05-04 13:13:12 +00:00
Samir Talwar
397e95fc6a Upgrade Citus to v11.3.0 in tests.
Upgrades Citus to v11.3.0 in tests.

This breaks an assumption made by the tests for the `get_source_tables` metadata API, in which data is expected to be ordered. We fix it by explicitly ordering rather than relying on the goodwill of the database.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9039
GitOrigin-RevId: ee86db7e1c264d5009bb0203ac2f3fb2cda7b39f
2023-05-04 11:40:10 +00:00
Daniel Harvey
e62339d20c feat(postgres data connector): Adding initial support for /Schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9018
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 4330c1201bac790b370d3d53d915f8ffe00ba0c9
2023-05-03 21:12:45 +00:00
Samir Talwar
c1705a09df api-tests: Fix the error messages to match those reported by Citus v11.3.0.
I also pinned Citus to v11.3. This should hopefully stop us from being surprised with random test failures in the future. We will need to bump this every now and again.

I have updated the Makefile to standardize Docker commands, and made sure we start all the containers even when running tests for a single database, as we need to test cross-DB remote joins. This ensures `make test-citus` actually works and runs all tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9035
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 9c36ab65eb05206bfddd639c257d6c5c5cedd2bd
2023-05-03 20:22:26 +00:00
Gil Mizrahi
990fd54e8c Stored Procedures schema parsers and codegen
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9000
GitOrigin-RevId: 951a8b949359db11df183964b4ce217ae02a301c
2023-04-29 08:05:37 +00:00
Samir Talwar
53749aa796 CI: Use "12345" for the server version instead of generating one.
We bake the version number into the binary, which means that changing it causes a lot of files to rebuild (also thanks to Template Haskell). We can avoid this by simply using a dummy value which does not change.

When releasing, we still use the Git tag.

This should speed up the server build a lot, most of the time.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8916
GitOrigin-RevId: 7e5f9d4d582dba3eecab52fd37a216cadefba941
2023-04-28 18:19:40 +00:00
Gil Mizrahi
930df62de7 Stored procedures api commands
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8975
GitOrigin-RevId: c71a9f74bf01bb8c0bc8c8cd4b744b530d99476a
2023-04-28 13:38:34 +00:00
Samir Talwar
e3b46b78a9 server/upgrade-tests: Tests that ensure that HGE upgrades successfully.
These tests ensure that upgrading HGE preserves the GraphQL schema.

They do this by running two different versions of HGE against the same metadata, and ensuring that the GraphQL schema doesn't change.

We might find that in the future, we make an additive change that makes these tests fail. Improving the tests to allow for this is left as an exercise to whoever triggers it. (Sorry.)

Currently, we do this with:

  * an empty database (zero tracked relations)
  * the Chinook dataset
  * the "huge schema" dataset

The base version of HGE tested against can be overridden with an option. The version must be available on Docker Hub.

Further information is in the Haddock documentation.

[NDAT-627]: https://hasurahq.atlassian.net/browse/NDAT-627?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8982
GitOrigin-RevId: 97b4deda1e6fe1db33ce35db02e12c6acc6c29e3
2023-04-28 12:54:51 +00:00
Daniel Harvey
d663207f5e chore(tooling): fix make test-integration-mssql
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8987
GitOrigin-RevId: ad9c3bc6f1dcfe034f33260a151a3424cb7f433d
2023-04-28 10:23:09 +00:00
Daniel Harvey
a0b1d69392 chore(server): make native queries pro-only
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8926
GitOrigin-RevId: 68d2091c97ed80e86f851d656749eab865f73ec4
2023-04-27 14:31:53 +00:00
Daniel Harvey
107db24caf chore(tests): Move Native Queries and Logical Models tests to api-tests-pro
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8936
GitOrigin-RevId: 9c170f2ce2de68818a9efe52266b47e87a7c4726
2023-04-26 11:05:32 +00:00
Samir Talwar
6afcf17df8 frontend: Use origin/main as the base when running Nx commands.
We may not want to assume that the `main` branch on a developer's machine (a) exists and (b) is up-to-date.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8915
GitOrigin-RevId: 441d1c4cb7d864601a5f7a81dbfd04ec5415161e
2023-04-25 21:43:28 +00:00
Samir Talwar
be67b0db59 server: Make HLint pass, by hook or by crook.
This fixes the simple HLint warnings, and adds a few suppressions to avoid noise.

The suppressions don't really solve the problems, but I think the warnings here are quite benign and I'm uncomfortable with how likely I would be to introduce a bug during refactoring.

In the case of _pg-client_ and _resource-pool_, we can't use the recommended functions anyway, and there doesn't seem to be a way to tell HLint to ignore entire packages.

I have updated the `make` targets to only fail if errors or warnings are found, not suggestions. This brings it in line with the CI job.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8910
GitOrigin-RevId: 596277b4ae5833876fc3f43875208c1279518a59
2023-04-25 14:03:02 +00:00
Daniel Harvey
7e20fd9088 chore(tests): run pro api-tests for all native databases
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8892
GitOrigin-RevId: 6bf2629e676471ff94a34746beacb08cad14f4d0
2023-04-25 13:26:20 +00:00
Brandon Simmons
7066b52777 dev.sh: support graphql-engine-pro
So you can do:

```
$ HASURA_GRAPHQL_EE_LICENSE_KEY=... scripts/dev.sh graphql-engine-pro
```

along with the `--prof-*` modes etc.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8894
GitOrigin-RevId: 2257749b2936cbd3230beb23e774ac92989e2fbc
2023-04-25 10:54:30 +00:00
Gil Mizrahi
e768ef4920 cleanup(sqlserver): throw an error when native queries not supported
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8839
GitOrigin-RevId: afdaa9a0a5aa54f852d3a955a0d3de4f74b5fedf
2023-04-21 13:51:58 +00:00
Gil Mizrahi
2635ed46bd sqlserver: implement native queries as CTEs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8818
GitOrigin-RevId: 78d84c3558b2cc27e1c1a6c025de4c5035a9cafe
2023-04-19 14:54:56 +00:00
Brandon Simmons
3332189756 benchmarks: resource_calibration.sh and CI throughput benchmarks
See this earlier iteration of this work for an example of the kind of report  we're producing: #7664

And related work in this repo: github.com:hasura/graphql-bench-helper

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7923
GitOrigin-RevId: 99d2a55e2fb5b55f3f33e2570cfd0bc23e448e0c
2023-04-18 16:44:54 +00:00
Rikin Kachhia
e95259e1f4 build: update manifests with latest version
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8775
GitOrigin-RevId: e5cfc438c3f14efc0dfd9a8bbbec984c7d203674
2023-04-17 10:32:05 +00:00
Philip Lykke Carlsen
0346224444 Rename "Logical Models" → "Native Queries"
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8769
GitOrigin-RevId: 66f2cbfb620d641e672a4074554d9d324a18c591
2023-04-13 16:12:20 +00:00
Samir Talwar
6d79b7dfaf make: Add run-oss-server, and associated frontend targets.
`make run-oss-server` will now build the Console for OSS ("CE"), start PostgreSQL, and run a simply-configured server.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8652
GitOrigin-RevId: cada25e66fe216867ff331d597764e64aaf2dc19
2023-04-06 08:53:13 +00:00
Daniel Harvey
9c83934869 chore(tooling): add make repl-postgres command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8638
GitOrigin-RevId: 8cbc8317a661e2bb43e965be5c32696d03d394bd
2023-04-05 13:24:04 +00:00
Daniel Harvey
9c99bcb6f8 chore(server): move perms to custom return types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8604
GitOrigin-RevId: ff024429b3f06e4867334665f35d4bd404a85cba
2023-04-04 12:46:51 +00:00