Commit Graph

386 Commits

Author SHA1 Message Date
Toan Nguyen
ce5ff4c367 server: support env template for otel status
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10764
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 3dfb3478cefc8ffa9067295293203e06b3eac90c
2024-04-17 07:25:44 +00:00
kodiakhq[bot]
dd3bbef2fe Jberryman/ghc 9.6.4
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10615
GitOrigin-RevId: 8a45c92bec8444d5ec0aed125f4aa96d9c684728
2024-01-23 19:47:53 +00:00
Brandon Simmons
1c801e7223 scripts: add script for searching source of all haskell transitive de…
…pendencies

Created in the process of hunting down a bug

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10613
GitOrigin-RevId: 7b44e7234c6b7be9ed7926a14c1cf9aa5f3c48e1
2024-01-18 21:06:59 +00:00
Divi
3a2b21fa32 ci: update tag in install-manifests for all data connectors
https://hasurahq.atlassian.net/browse/INFRA-1116

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10504
GitOrigin-RevId: d201467d7d1378e258c4eac603c0efa9afb8965a
2023-11-27 05:35:36 +00:00
Samir Talwar
cca591a7f9 CI: Test against PostgreSQL 16.
This changes our test configuration to use the PostgreSQL 16 image from `postgis/postgis`.

In addition, it bumps PostGIS to v3.4 (from v3.3).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10361
GitOrigin-RevId: 883c96d8453efb42b226f849891488382a99c80c
2023-10-05 12:59:17 +00:00
Samir Talwar
2467e23ef6 docker: Always use the official SQL Server image for testing.
Now that Docker for macOS supports using Rosetta for x86/amd64 emulation, we no longer need to use the `azure-sql-edge` image. We can always use the official `mcr.microsoft.com/mssql/server` one.

This also means that we no longer need the separate healthcheck container, because the official image ships with `sqlcmd`.

When this is merged, you will need to ensure you have enabled Rosetta emulation in the Docker settings to test against SQL Server on macOS. This requires macOS 13 (Ventura).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10139
GitOrigin-RevId: 2225bf5f4c6d3632da1f29b2229c9b04ead5e34c
2023-09-25 13:27:23 +00:00
kodiakhq[bot]
07bad7c498 INFRA-832: logs OTLP export
https://hasurahq.atlassian.net/browse/INFRA-832

Foundational work already merged:
- #10171
- 0184ba8bfcae9b
- 699317ffd061d3

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10238
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
GitOrigin-RevId: d88c6a1aafe74e7393873aacc61e6fce3bc7c068
2023-09-13 16:49:55 +00:00
Samir Talwar
15ac52ded4 server: Fix the Analyze feature for SQL Server.
The "Analyze" feature for SQL Server only partially worked. It would show the SQL generated, but not the execution plan. This is because SQL Server doesn't support generating a plan for prepared statements with parameters.

To work around this, we restructure the query as one without parameters. Instead, we replace each parameter with a variable. We declare the variables but don't set values. We then plan _that_, which works.

We run all this in a single query because local variables only last for a single transaction/batch.

This feature does not work for stored procedures.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10125
GitOrigin-RevId: a4b45b9b207456ff4fbd1b69b008e93f87346342
2023-08-17 12:51:57 +00:00
Rikin Kachhia
8c6f823f7b ci: update latest stable release as v2.31.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10034
GitOrigin-RevId: fe686e39e40ad8bb7fe3ec9a097b60ed88c2fc53
2023-08-02 16:37:45 +00:00
Daniel Harvey
9bd52c0a89 chore: remove Postgres data connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9970
GitOrigin-RevId: 5ebae21a19c50c305ee661052f629a367af05d57
2023-07-26 15:24:00 +00:00
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