Commit Graph

3245 Commits

Author SHA1 Message Date
Daniel Chambers
cb80942e4f Disable use of local relationships in metadata if Data Connector agents don't declare relationships capability
[GDC-489]: https://hasurahq.atlassian.net/browse/GDC-489?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8862
GitOrigin-RevId: cfff2d9c688185e00f4a830dbdbe173dba4ce7f0
2023-04-26 06:49:36 +00:00
Gil Mizrahi
858c0634f3 add QueryWithDDL back
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8906
GitOrigin-RevId: 5304e2a3ffa71ed13c3f706cdf64bcef84d7c0c1
2023-04-25 21:06:58 +00:00
Karthikeyan Chinnakonda
c19bc58f1e Server: Websocket queue time and pre subscriptions start errors metrics [Subscription metrics - 3]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8870
GitOrigin-RevId: 35cb1f1c7ffe7c8dcdd65fa14c423fcd1c2de234
2023-04-25 20:29:30 +00:00
Tom Harding
74f282ad16 chore(server): remove Eventing instances from RQL.Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8909
GitOrigin-RevId: 302a9583c3364d507dfe106111ffcabac0b1dbf5
2023-04-25 17:18:30 +00:00
Daniel Harvey
c2424abd2e chore(server): add -fexpose-all-unfoldings in hasura-base and hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8890
GitOrigin-RevId: 3a028ea9e6f2e7d6829ceb411c460da1e971178b
2023-04-25 16:35:58 +00:00
Tom Harding
2a9575f922 Split Hasura.Session, remove RQL.Types dependency
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8921
GitOrigin-RevId: b3586942838be4d7a7d48b6b50c7e2643cd8fa06
2023-04-25 15:57:08 +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
Samir Talwar
e24bcf2a39 server/tests-py: Never allocate the same port twice.
We seem to be getting flakes where we try and use the same port for two different servers. This is because in certain cases we cannot simply allocate the port dynamically, but have to decide it in advance, leading to a race condition.

We resolve this by keeping track of the ports we allocate when using this method, making sure we never allocate them twice. We also make sure we allocate from a different pool of ports to the usual dynamic port pool (typically above port 32768, and often above port 49152).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8903
GitOrigin-RevId: 375a23867591a4566493dddbc550c58cf88ea392
2023-04-25 12:51:01 +00:00
Daniel Harvey
15ce4818b2 chore(server): fix Logical Model permissions for nested fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8889
GitOrigin-RevId: c86f5328170aaa40cc5bf469f5cbb98e01ac521d
2023-04-25 11:59:48 +00:00
Krushan Bauva
2a68a4ac18 server: API support for fetching events
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7587
GitOrigin-RevId: da9e77abe9e9eb0e414aaddccd021433cd40e604
2023-04-25 11:24:09 +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
Tom Harding
6a53470728 Break Metadata.DTO.Utils into Autodocodec.Extended and RQL.Types.BackendTag
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8874
GitOrigin-RevId: 77a8f61e1f5a5bb84908b5afd743a575e723d87f
2023-04-25 09:01:12 +00:00
Tom Harding
1a23e47818 Separate Hasura.EncJSON into its own package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8875
GitOrigin-RevId: 9622bb67b6c357837db3e3a9f26e8e471ec7382c
2023-04-25 08:25:06 +00:00
paritosh-08
b158aae73b server: check for event triggers before throwing source-cleanup-failed warnings
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8885
GitOrigin-RevId: 7e02829608c6838f5db8226b532b436dd97f1b22
2023-04-24 19:52:50 +00:00
Samir Talwar
8af30c4c6b server/tests-py: Extract Apollo servers into fixtures.
I'm hoping this will reduce the flakiness of the tests, by ensuring the servers stop appropriately.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8880
GitOrigin-RevId: 6379b18cbe43527a1c2e73a14d93179b54bf1b75
2023-04-24 19:16:20 +00:00
Daniel Harvey
ea5c92acae chore(server): move Hasura.SQL.Backend to Hasura.RQL.Types.BackendType
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8876
GitOrigin-RevId: abfc18eeef96a1f3593bfe823adab4d161161333
2023-04-24 18:37:33 +00:00
Auke Booij
d5402d17d8 ci: sleep 3 seconds after allowlist adhoc operation benchmark
Trying to reduce the nondeterminism in the allowlist benchmarks.

Thanks to @jberryman for spotting this.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8842
GitOrigin-RevId: 1369050e4c5844538ef0852f4347d7a72dd18287
2023-04-24 18:02:30 +00:00
Tom Harding
de8e6c022d Move the GHC directory into hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8888
GitOrigin-RevId: 50cdb72293096faa2c6ab94fe40bbc59d232d4e1
2023-04-24 17:25:32 +00:00
Daniel Harvey
8cf134dad1 Split Hasura.RQL.DDL.Headers to put types in Hasura.RQL.Types.Headers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8873
GitOrigin-RevId: 566cb4271f0eb27e6688c2e0fbc26711bdf8baa9
2023-04-24 16:45:55 +00:00
Tom Harding
f8ae944dbc Move Hasura.GraphQL.Schema.Options to Hasura.RQL.Types.Options
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8877
GitOrigin-RevId: 8be82f60a57cd9582d6980a6dea2f34c7b0c13c1
2023-04-24 15:18:56 +00:00
Tom Harding
982bf2cec6 RemoveHasura.RQL.Types dependency on Backends.Postgres.Execute.Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8869
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: acabf17b5b9bde9f0f319eeae120ccc9527075a3
2023-04-24 14:41:19 +00:00
Daniel Harvey
4c2ab2db4b chore(server): inline helpers from Hasura.Server.Utils into RQL.Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8868
GitOrigin-RevId: e6ebbd63c2feca185a991057c1fa9809be4970bd
2023-04-24 14:04:53 +00:00
Tom Harding
249beed7d9 Remove ODBC dependency in hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8882
GitOrigin-RevId: 08c756c042976adc14a028477e9d5f9c3dff5991
2023-04-24 13:26:11 +00:00
Tom Harding
f80369573c Move Hasura.SQL.Tag into RQL.Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8871
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: f69ff31018d6a68a3221d75cc1e2ef467bc46e12
2023-04-24 12:27:27 +00:00
paritosh-08
ccdeba3254 server: make event trigger inconsistent for read-only source
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8657
GitOrigin-RevId: 7cffbf5104a9cdff3655168ed93c418f5a8c3966
2023-04-24 11:50:02 +00:00
Tom Harding
eac27bbf13 Extract Network and Net into hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8855
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 5bde8ff821739c37a2e4435b57a5a623bc66de42
2023-04-24 11:13:34 +00:00
Samir Talwar
6ed9f36125 Remove the server upgrade/downgrade tests.
These tests are intended to catch issues in upgrading HGE. However:

* the tests are very convoluted and hard to understand,
* we can only run a small subset of Python tests that don't mutate any data or metadata, and
* I have never seen them fail for a legitimate reason, but I've seen a lot of flakes.

While we do believe it's important to test that upgrades don't break the stored introspection, these tests don't seem to be doing that any more. I humbly request that we delete them now and either (a) figure out how to test this properly, or (b) just wait for v3, which does away with reintrospecting on server startup entirely.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8844
GitOrigin-RevId: 528bc632fce377b7eff2026b832bd58586ac5a0b
2023-04-24 10:04:15 +00:00
Puru Gupta
44d9987e92 server: process event triggers with a timeout
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8823
GitOrigin-RevId: 4a38ef993fffe018ae16e232f2abb5d30c604855
2023-04-24 09:28:49 +00:00
Tom Harding
1698f9dd91 Extract RoleName from Hasura.Session, move it into Hasura.RQL.Types.Roles
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8856
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 38ad67de9b3d765c4eb50943dd52b8fc32317540
2023-04-24 08:51:58 +00:00
Karthikeyan Chinnakonda
9869e3fcf4 Server: add hasura_active_subscription_pollers_in_error_state metric [Subscriptions observability - 2]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8808
GitOrigin-RevId: 9686125e87bdf06cdb4b133d236bfa64c61bb6f3
2023-04-24 07:44:04 +00:00
Daniel Chambers
367f5f7771 Log the backend source kind in telemetry so we can see which data connector agent is in use
[GDC-1188]: https://hasurahq.atlassian.net/browse/GDC-1188?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8828
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
GitOrigin-RevId: 46f39e229cb52a3b7d8965bbff972f74b031a510
2023-04-24 03:56:42 +00:00
Tom Harding
8292a9fae3 Move both Autodocodec.Extended modules into hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8851
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 1095c52338d15ec41f1a09f2c40da74f038c8102
2023-04-21 15:25:12 +00:00
Tom Harding
99c1d99ecb chore(server): break out Hasura.Base into own package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8850
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 47310479d66adc3baf27ca9d2dbda7addea6bb3d
2023-04-21 14:26:15 +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
Tom Harding
3151dd0074 Extract hasura-extras from graphql-engine
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8848
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 4a667e2760f866e57e0e7d804815153571b413e6
2023-04-21 13:15:27 +00:00
Daniel Harvey
59244eac85 feature(server): basic array relationships on Native Queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8752
GitOrigin-RevId: adea2941e01c4037b74f6e8c9150ff0819729fae
2023-04-21 11:57:42 +00:00
Samir Talwar
7e1fc89377 server/tests-py: Remove "new".
Now that we have removed the old runners, the new one is the only one left; let's remove the word "new".

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8843
GitOrigin-RevId: c3dc7b91881948eb543a933304c3284e84210ea8
2023-04-21 11:24:01 +00:00
Samir Talwar
71430082f2 server/tests-py: Remove the old local and CI runners.
We no longer need these!

Next up:

1. renaming anything with "new" in the name (because we don't have an "old" any more)
2. removing the server upgrade/downgrade tests (I am sure this is controversial)
3. deleting a lot of Python code

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8841
GitOrigin-RevId: df026d4a19dc0cf5c8730d41eafae5eebb6f6f50
2023-04-20 14:22:07 +00:00
Tom Harding
52c21832d8 Add an alias for EXISTS clauses in queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8537
GitOrigin-RevId: d931e4f32bef75dcba7cf8d370caa7539a7d3d8a
2023-04-20 12:34:51 +00:00
Gil Mizrahi
a5043ab215 cleanup(sqlserver): remove QueryWithDDL
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8834
GitOrigin-RevId: b31fba44bb67a16bcc1901ce51ce4ab1c6797f23
2023-04-20 10:02:58 +00:00
Samir Talwar
ffa3f5e3cc server/tests-py: Remove test_horizontal_scale.py.
This removes *test_horizontal_scale.py*, which tests horizontal scaling by running some tests against two HGE servers, both talking to PgBouncer.

This doesn't really test HGE; it's testing whether PgBouncer guarantees the same level of consistency as PostgreSQL. I'm not convinced that it's worthwhile, so I am deleting it.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8821
GitOrigin-RevId: 2029f2fea11c7fd58ed47e724cb3cd50e67d5a43
2023-04-20 09:28:15 +00:00
awjchen
5e97a1e475 server: set default service.name in opentelemetry exporter
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8169
GitOrigin-RevId: 0aac41869d6d9a100825f7a90fb976b75c006875
2023-04-19 16:16:31 +00:00
Samir Talwar
832fac9c69 server/tests-py: Remove test_startup_db_calls.py.
This removes the *test_startup_db_calls.py* tests. These tests are looking for a specific regression on resolving sources multiple times on startup. I have never seen them fail and I'm not convinced the tests are worthwhile.

This is compounded by the roundabout way in which we verify that we resolve the sources; we do it by inspecting the logs. This is a real pain to port to the fixture-based method of spinning HGE, and I don't believe it's worth the effort; I'd rather just delete it.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8813
GitOrigin-RevId: 0a313e7998fa034fa96aaa10924d9d11dd1856f4
2023-04-19 15:30:19 +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
ananya-2410
72d0c73377 ci: tag release v2.24.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8814
GitOrigin-RevId: ba9a5f44d3d8cdcd2990c2c192d4063b429f416e
2023-04-19 11:37:32 +00:00
Anon Ray
055cf11134 server/pro: remote schema queries should not be cached when forward client headers are set
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8806
GitOrigin-RevId: e2b5aa012146cf3cf1bc361d986c0619e9f78d26
2023-04-19 11:13:35 +00:00
Samir Talwar
26e03a07bb server/tests-py: Parallelize JWT tests.
This rewrites the JWT tests to generate and specify the secrets per test class, and to provide the server configuration to the HGE fixture.

It covers the tests in:

  - *test_jwt.py*
  - *test_jwt_claims_map.py*
  - *test_config_api.py*
  - *test_graphql_queries.py* (just a couple here)

This does reduce the number of code paths exercised with JWT, as we were previously running *all* tests with JWT tokens. However, this seems excessive; we don't need to tread every code path, just enough to ensure we handle the tokens appropriately. I believe that the test coverage in *test_jwt.py* does this well enough (though I'd prefer if we moved the coverage lower down in the stack as unit tests).

These tests were configured in multiple different ways by *test-server.sh*; this configuration is now moved to test subclasses within the various files. This results in a bit of duplication.

Unfortunately, the tests would ideally use parameterization rather than subclassing, but that doesn't work because of `hge_fixture_env`, which creates a "soft" dependency between the environment variables and `hge_server`. Parameterizing the former *should* force the latter to be recreated for each new set of environment variables, but `hge_server` isn't actually aware there's a dependency.

It currently looks like this adds lines of code; we'll more than make up for it when we delete the relevant lines from *test-server.sh*. I am not doing that here because I plan on deleting the whole file in a subsequent changeset.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8803
GitOrigin-RevId: f7f2caa62de0b0a45e42964b69a8ae73d1575fe8
2023-04-19 10:30:21 +00:00
Philip Lykke Carlsen
983fc2ad47 Rename "Custom Return Types" → "Logical Models"
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8800
GitOrigin-RevId: e5e10f31c6cc8953a8ee947441a7f80b0e9b5e5e
2023-04-19 09:05:25 +00:00
Daniel Chambers
91c88b2109 Properly return schema information about views and PK mutability from the Super Connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8786
GitOrigin-RevId: b7cd0dd5736a408a269819ea76dfbe53455060ee
2023-04-18 17:24:51 +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
Gil Mizrahi
5ed9fcc0a3 bugfix(NativeQueries): fix validation failed on name with uppercase on postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8790
GitOrigin-RevId: f3b9b041fd96c6087ff4bd3379ef6283befcdc54
2023-04-18 16:09:45 +00:00
Karthikeyan Chinnakonda
41ed0d369b server: add active multiplexed subscriptions metrics
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8644
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: ff1f646cd6a4b8dd5106db4693b2c6ad465ae052
2023-04-18 15:33:01 +00:00
Daniel Chambers
4ccfc3490b Satisfy get_table_info from cached DBObjectsIntrospection for Data Connectors
[GDC-643]: https://hasurahq.atlassian.net/browse/GDC-643?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8761
GitOrigin-RevId: 6b8e15fc35f7f463d86c865c880779794f0f28b8
2023-04-18 05:37:34 +00:00
Daniel Harvey
69e329ee18 chore(server): break down Hasura.RQL.IR.Select somewhat
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8779
GitOrigin-RevId: 9e40de0ed36cfe84d1457bd7c6a96c80e31d357b
2023-04-17 15:21:05 +00:00
Samir Talwar
0ea8bd8df8 server/tests-py: Parallelize test_logging.py.
This adds the ability to capture logs to the HGE fixture, and uses this in test_logging.py to analyze the logs, instead of relying on a shell script redirecting the logs to a file.

We then inject the logs into the tests and parse the JSON. Because we're no longer reading a file, we need to do this in a separate thread, as we'll block on reading rather than the stream ending. (Once HGE stops, the stream will be closed.)

Some of the tests require a JWK server, so this has been extracted from test_jwk.py.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8772
GitOrigin-RevId: 9413e714f1c42b8a0991d0d30c4358209fd30c0c
2023-04-17 13:09:34 +00:00
Daniel Harvey
eab64a8ca3 chore(server): replace Metadata.hs-boot with 3 orphan instances
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8740
GitOrigin-RevId: 801f03045b9981b07f8c0abfdeb2722e715e63cd
2023-04-17 12:11:21 +00:00
Daniel Harvey
2fd3f91398 chore(server): metadata changes for array relationships for Native Queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8670
GitOrigin-RevId: c23e23e3cf48013ab76fc2fa98c8b8b800c6cee6
2023-04-17 11:31:59 +00:00
Puru Gupta
d9b77d9dae server: remove cache specific headers when response is not cached
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8637
Co-authored-by: Daniele Cammareri <5709409+dancamma@users.noreply.github.com>
GitOrigin-RevId: 0af8adbb638394fb65926165b09ff237d060ce85
2023-04-16 19:33:26 +00:00
Solomon
eada60b80d Add a Query Cache Max TTL, Bucket Size, and Bucket Rate Arg/Env options in HasuraPro
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6484
GitOrigin-RevId: 1a060ca8d81f123abaa54a64e905cc8e20b683c7
2023-04-13 20:04:24 +00:00
Tom Harding
4c25eafc52 bulk_keep_going
[NDAT-604]: https://hasurahq.atlassian.net/browse/NDAT-604?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8770
GitOrigin-RevId: 597dbb1448794c0ac25496d6b6f759d5aaccc2fb
2023-04-13 17:00:45 +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
Antoine Leblanc
e682868350 Remove app state reference in pro context
### Description

**This PR is on top of #8655. Its diff is [this commit](8dd6e8899e).**

This PR removes the app state reference in pro's context, allowing us to build the context _before_ building the firsts schema cache. It does so by introducing `MetricsConfigRef`, based on the very similar `TLSAllowListRef`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8665
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
GitOrigin-RevId: d0a614f699f41cd50801b125c6b1e40bd2f629e2
2023-04-13 15:12:35 +00:00
Vishnu Bharathi
a043dadaf3 ci: tag release v2.23.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8768
GitOrigin-RevId: fd546695d77dc511613420fe7c0daf870279e4e7
2023-04-13 14:17:10 +00:00
Tom Harding
d60136b4fb Create a schema dependency from logical models to their types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8746
GitOrigin-RevId: 969685c87e7fcd3458da87a37a0a4589d6f85bc5
2023-04-13 09:56:29 +00:00
Daniel Chambers
56db8ec358 Data Connectors: Fix track_table not working if the table was created after schema cache was built
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8732
GitOrigin-RevId: e11a0ef6979d1d58a0b39dcd8fff48d446d3420f
2023-04-13 01:30:50 +00:00
Solomon
7ce1093683 Allow CE users to attempt GDC requests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8754
GitOrigin-RevId: 26a364a6c9d5788d4b06a84942ba9953be104ab7
2023-04-12 22:04:13 +00:00
Daniel Harvey
cd024dcaa4 chore(server): logical models, remove unused arg
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8751
GitOrigin-RevId: fcef0a4b3974206bd0920bd8e4b46af9407b90c0
2023-04-12 17:00:44 +00:00
Samir Talwar
5677446ff3 server/tests-py: Run test_websocket_init_cookie.py in parallel.
This requires rewriting the test class to split it into 3, each specifying the correct environment variables for HGE.

It would be lovely to use parameterization rather than subclassing, but that doesn't work because of `hge_fixture_env`, which creates a "soft" dependency between the environment variables and `hge_server`. Parameterizing the former *should* force the latter to be recreated for each new set of environment variables, but `hge_server` isn't actually aware there's a dependency. See `TestParameterizedFixtures` in test_tests.py for more information.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8747
GitOrigin-RevId: 878b2fc20f39f962a67cd950046a99c283cfc6fc
2023-04-12 16:26:22 +00:00
Auke Booij
6f78d25932 chore(server): simplify bindErrorA and use more broadly
The simplification will allow us to avoid a few `MonadError QErr m` constsraints in the future - this effect can be created locally instead of reusing a global one.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8729
GitOrigin-RevId: 851e28b1f5bfe4c47da43fa324714a941ef25c57
2023-04-12 15:51:37 +00:00
Samir Talwar
43f179688c server/tests-py: Run test_graphql_read_only_source.py in parallel.
This requires making it add its own source, rather than expecting one to be provided.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8745
GitOrigin-RevId: 65c818e4f065e9f98e9cfd65c158eff5d768ae31
2023-04-12 14:37:21 +00:00
Naveen Naidu
a8b94120d1 server: close all websocket connection when sqlGenCtx and experimental features changes
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8736
GitOrigin-RevId: 20f3d6386c961020b5b93c857dfa0cd99a9838b5
2023-04-12 10:27:42 +00:00
Tom Harding
af0b56332d De-duplicate prepared logical model arguments
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8723
GitOrigin-RevId: 5df1a05c47852d7371ef323bb0df2ac9d1749243
2023-04-12 09:05:48 +00:00
Naveen Naidu
0720c6a66c server: always read latest appContext in v1alpha1/config endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8727
GitOrigin-RevId: 0139a3d98262bfdf0a39ad7fc986482fb1bfe156
2023-04-12 05:55:19 +00:00
Tom Harding
168037df02 Add a test for multiplexing logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8720
GitOrigin-RevId: da435a5700929592eb95d49dbaa9b4531c10042e
2023-04-11 16:59:41 +00:00
Toan Nguyen
713b434aef server,frontend: generic EE SSO login for console with multiple identity providers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8035
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
Co-authored-by: Stefano Magni <173663+NoriSte@users.noreply.github.com>
GitOrigin-RevId: 3c5d5d899578c2fe50af8569318e25495f380878
2023-04-11 13:15:27 +00:00
Gil Mizrahi
5d518f62a9 cleanup(tests): remove the type class in logimo typechecking test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8698
GitOrigin-RevId: 367cbc38ee7260c499a42b249b94463f2235ae0f
2023-04-11 10:29:39 +00:00
Gil Mizrahi
4696b60ec7 chore(debugging): convert trace ghc warnings to hlint warnings
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8700
GitOrigin-RevId: 29b1ee9172bb10823420de9555c3e22f9846facd
2023-04-11 09:06:56 +00:00
David Overton
346804fc67 Support nested object fields in DC API and use this to implement nest…
## Description

This change adds support for nested object fields in HGE IR and Schema Cache, the Data Connectors backend and API, and the MongoDB agent.

### Data Connector API changes

- The `/schema` endpoint response now includes an optional set of GraphQL type definitions. Table column types can refer to these definitions by name.
- Queries can now include a new field type `object` which contains a column name and a nested query. This allows querying into a nested object within a field.

### MongoDB agent changes

- Add support for querying into nested documents using the new `object` field type.

### HGE changes

- The `Backend` type class has a new type family `XNestedObjects b` which controls whether or not a backend supports querying into nested objects. This is currently enabled only for the `DataConnector` backend.
- For backends that support nested objects, the `FieldInfo` type gets a new constructor `FINestedObject`, and the `AnnFieldG` type gets a new constructor `AFNestedObject`.
- If the DC `/schema` endpoint returns any custom GraphQL type definitions they are stored in the `TableInfo` for each table in the source.
- During schema cache building, the function `addNonColumnFields` will check whether any column types match custom GraphQL object types stored in the `TableInfo`. If so, they are converted into `FINestedObject` instead of `FIColumn` in the `FieldInfoMap`.
- When building the `FieldParser`s from `FieldInfo` (function `fieldSelection`) any `FINestedObject` fields are converted into nested object parsers returning `AFNestedObject`.
- The `DataConnector` query planner converts `AFNestedObject` fields into `object` field types in the query sent to the agent.

## Limitations

### HGE not yet implemented:
- Support for nested arrays
- Support for nested objects/arrays in mutations
- Support for nested objects/arrays in order-by
- Support for filters (`where`) in nested objects/arrays
- Support for adding custom GraphQL types via track table metadata API
- Support for interface and union types
- Tests for nested objects

### Mongo agent not yet implemented:

- Generate nested object types from validation schema
- Support for aggregates
- Support for order-by
- Configure agent port
- Build agent in CI
- Agent tests for nested objects and MongoDB agent

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7844
GitOrigin-RevId: aec9ec1e4216293286a68f9b1af6f3f5317db423
2023-04-11 01:30:37 +00:00
Daniel Harvey
99b0139275 chore(server): variable renaming around custom return type permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8624
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 901db6df865ce0433399731f878c6f3a10cf6e87
2023-04-10 14:17:20 +00:00
Puru Gupta
c54697b958 server: enable remote schema to remote schema relationship for unauthenticated context
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8562
GitOrigin-RevId: 2b1e2241fd2dbe379d5f9e40224e1245f1188475
2023-04-10 13:35:38 +00:00
Karthikeyan Chinnakonda
ddf34d9ffa Miscellaneous scheduled triggers fixes
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8618
GitOrigin-RevId: f9e3eb0d3d8b2ba36344b9ce0739c6a51e77f59e
2023-04-10 12:27:21 +00:00
Vishnu Bharathi
eabbb917ed ci: tag release v2.22.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8681
GitOrigin-RevId: 79762246e1115f6495d9f4b06d2ec9f43254b5e2
2023-04-07 11:15:45 +00:00
Naveen Naidu
2814735a20 server: fix dirty read of schema cache
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8677
GitOrigin-RevId: 615bfb4dc8d22a46a87ceb76c5f89d608e88f97d
2023-04-07 09:23:03 +00:00
Antoine Leblanc
0476331136 small cleanups of pro's init
### Description

(This PR is better reviewed commit by commit.)

This PR is an aggregation of small incremental changes to Pro's init:
- it deletes some dead code,
- it starts reorganizing the code of that file by sections, similar to OSS' init,
- it extracts and cleans up license key cache init (groups several blocks of code in one separate function)
- makes some changes to a service class to reduce the dependency on `_acAppStateRef`

This PR is a first step: our goal is to move the schema cache build _in_ the app monad, in order to achieve #8344. To do so, we will need to remove `_acAppStateRef` from Pro's `AppContext`. There are two different paths we can take from here, which is why i cut this PR here:
- the first would be to change the different instances we implement on `AppM` to take as an argument the parts of the schema cache they depend on, rather than reading them from `_acAppStateRef`; as of this PR, `MetricsConfig` is the only such field;
- the second would be to apply the same strategy we already used for the TLSAllowList, and use a `IORef` that can be updated after the schema cache is built; this change would have a smaller footprint, but introduces one new `IORef` per such field, which feels something we don't want to generalize

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8655
GitOrigin-RevId: 809697d460bdb5c83ef7d30a2e835f589bcd80a6
2023-04-06 15:37:15 +00:00
paritosh-08
774075a709 server: add code field to warning object in metadata API responses
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8601
GitOrigin-RevId: 7034c0a04b87c44731680917aa3946084b705959
2023-04-06 02:41:24 +00:00
Tom Harding
3cef692dd7 feature(server): Get _all_ source tables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8649
GitOrigin-RevId: 4bb9311d1d7ab4e8ee641bde5df2babcb1b8b306
2023-04-05 20:16:14 +00:00
Philip Lykke Carlsen
41a5092b97 refactor(tests): Support componentised Postgres fixtures, port SimpleObjectSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8607
GitOrigin-RevId: b068f7308fa8fa4b626aa2f9352da3965b03fa34
2023-04-05 18:05:37 +00:00
Vishnu Bharathi
60afce2b94 ci: tag release v2.23.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8641
GitOrigin-RevId: e4395099602829a41d66c47e2c821b7a8912acef
2023-04-05 12:27:36 +00:00
Antoine Leblanc
d00f4ef497 Always flush the loggers without explicitly relying on onException
### Description

This PR makes use of the fact that the `LoggerSet` is created in a `ManagedT` context to guarantee that we flush it when the `ManagedT` context terminates, which is guaranteed even when an exception is thrown since `allocate` is implemented using `bracket`.

This allows us to remove several manual calls to `flip onException flushLoggers`, and avoids having to manually perform that check everywhere.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8629
GitOrigin-RevId: 47657b910dc1bb7cfc0594f02e6cce9893ae3439
2023-04-05 11:07:14 +00:00
Rishichandra Wawhal
c6d65508b2 [feature branch] EE Lite Trials
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8208
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
Co-authored-by: Solomon <24038+solomon-b@users.noreply.github.com>
Co-authored-by: gneeri <10553562+gneeri@users.noreply.github.com>
GitOrigin-RevId: 454ee0dea636da77e43810edb2f427137027956c
2023-04-05 08:59:09 +00:00
Daniel Chambers
fde4c0fae5 Enhance insert table schema with extra info and remove need for cached schema usage in Super Connector mutations
[GDC-643]: https://hasurahq.atlassian.net/browse/GDC-643?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8560
GitOrigin-RevId: 0e965da447eb6a5acf5a0f291f9e205882630e6e
2023-04-05 02:23:20 +00:00
Antoine Leblanc
e6a8bcb1c9 Make flag value a part of the cache's dynamic config.
### Description

If i understand correctly, the _value_ of a feature flag **can** change at runtime. Since this has an impact on how the schema cache is built, this PR makes the value of the flag a part of the cache's "dynamic" config, therefore making it an arrow-ish argument for the incremental framework. It also removes `CheckFeatureFlag` from the static config, now obsolete.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8631
GitOrigin-RevId: 2ca898e4193e8552c40d2b21a819d3dd414601fe
2023-04-04 19:39:39 +00:00
Antoine Leblanc
306162f477 Remove ServerConfigCtx.
### Description

This PR removes `ServerConfigCtx` and `HasServerConfigCtx`. Instead, it favours different approaches:
- when the code was only using one field, it passes that field explicitly (usually `SQLGenCtx` or `CheckFeatureFlag`)
- when the code was using several fields, but in only one function, it inlines
- for the cache build, it introduces `CacheStaticConfig` and `CacheDynamicConfig`, which are subsets of `AppEnv` and `AppContext` respectively

The main goal of this is to help with the modularization of the engine: as `ServerConfigCtx` had fields whose types were imported from several unrelated parts of the engine, using it tied together parts of the engine that should not be aware of one another (such as tying together `Hasura.LogicalModel` and `Hasura.GraphQL.Schema`).

The bulk of this PR is a change to the cache build, as a follow up to #8509: instead of giving the entire `ServerConfigCtx` as a incremental rule argument, we only give the new `CacheDynamicConfig` struct, which has fewer fields. The other required fields, that were coming from the `AppEnv`, are now given via the `HasCacheStaticConfig` constraint, which is a "subset" of `HasAppEnv`.

(Some further work could include moving `StringifyNumbers` out of `GraphQL.Schema.Options`, given how it is used all across the codebase, including in `RQL.DML`.)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8513
GitOrigin-RevId: 818cbcd71494e3cd946b06adbb02ca328a8a298e
2023-04-04 16:01:42 +00:00
Tom Harding
794690f30c Implement get_source_tables command for all backends
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8619
GitOrigin-RevId: 5e1b2c11775d801a77dc6d92de4c5abc1c9b8c60
2023-04-04 15:27:19 +00:00
Gil Mizrahi
352d8ff09c validate logical models custom return type against postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8563
GitOrigin-RevId: 462a608e0e90d1923bc1d735257f4506825f5db1
2023-04-04 14:02:59 +00:00
Puru Gupta
8a6a8459ab server: zero-downtime env vars update on cloud
[GS-232]: https://hasurahq.atlassian.net/browse/GS-232?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8475
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
GitOrigin-RevId: fb47f02f4e0d6d889c0348abc50fd46382f1bd5e
2023-04-04 13:26:21 +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
Antoine Leblanc
0177510b8f Fix haskell error in example code block
Fix trivial error in documentation.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8620
GitOrigin-RevId: 1b8410ae213b1e5f0954bdf4e957d29f1a668696
2023-04-04 11:28:35 +00:00
Antoine Leblanc
e9ae080d28 Add ManagedT deep dive.
### Description

This small documentation PR explains why and how we use `ManagedT`, and how it solves problems we would have with `Managed`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8615
GitOrigin-RevId: 5b7710a8cb6373fefb69bb4e9e8eda389c14c2da
2023-04-04 10:34:58 +00:00
Tom Harding
4854d3ca21 Add extremely basic support for BigQuery JSON fields
[NDAT-501]: https://hasurahq.atlassian.net/browse/NDAT-501?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8614
GitOrigin-RevId: 24530130499174a1a02e0fb4510859fcfeed207d
2023-04-04 09:45:17 +00:00
Philip Lykke Carlsen
df12c7cf46 fix(api-tests): Ensure the test runner runs the logger cleanup function.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8602
GitOrigin-RevId: 7e07b8b0556a22edf4e058e23ff020cc5e8528f6
2023-04-04 09:01:44 +00:00
pranshi06
e6c8abf7d4 server: add connection_template as an argument in pg_test_connection_template API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8520
GitOrigin-RevId: 525bba9015ad4e143e94124e42ec4518252932cb
2023-04-03 14:27:12 +00:00
Auke Booij
7cc33dd8ec server: refactor Hasura.Metadata.Class
- Remove `MonadMetadataStorageQueryAPI` which was only implemented by a default implementation
- Introduce `TransT` which can be used to easily derive `lift`ing implementations for `MonadBlaBlaBla` classes

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8579
GitOrigin-RevId: 4f804fda7e2de5c9d75ee4df269f500ebd46b8c9
2023-04-03 13:36:50 +00:00
Gil Mizrahi
ed4f3b7406 feature(server): CockroachDB now supports distinct. Document and test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8596
GitOrigin-RevId: 3dbc5fccb1d4387041a5a80794158c4f50b70848
2023-04-03 11:51:22 +00:00
Daniel Harvey
cb9f822fc0 chore(server): move user-defined-functions into Hasura.Function.*
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8595
GitOrigin-RevId: b3b7dec8504fe4daf324125e4017fa7d1945b3ca
2023-04-03 10:20:20 +00:00
Tom Harding
7e06b30e4d Add metadata commands for custom return type permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8587
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 660f2eda9cf1c7c612d66745064b3998c77804e0
2023-03-31 16:29:24 +00:00
Daniel Harvey
79682e0598 chore(server): move custom types out of logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8565
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 38bf56cc420a6c818a9ca7d6f846f5018535c808
2023-03-31 15:35:13 +00:00
Auke Booij
79b8a6a07b chore(server): move some query tags code to a sensible place
Also add a `default` implementation for `MonadQueryTags`.

This avoids a bunch of imports on `Hasura.GraphQL.Execute.Backend` which is a big module with lots of (transitive) dependencies.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8571
GitOrigin-RevId: 8ecca452721b77953e6d088c79d8d6f003f2996f
2023-03-30 21:19:38 +00:00
Jesse Hallett
b5ac49d1b5 server: codec for dataconnector ConnSourceConfig
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8271
GitOrigin-RevId: b5aaa86a5e453fecb1e88c2afb223857e50c8b7d
2023-03-30 18:37:51 +00:00
Daniel Harvey
4905dc1675 chore(tests): pass BigQuery service account env var through to HGE
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8532
GitOrigin-RevId: 68e4c846e23369f476fa672b987d6769fad43cbf
2023-03-30 17:59:01 +00:00
Anon Ray
5a81eaa9b6 server: core changes for zero-downtime env vars update on cloud
[GS-232]: https://hasurahq.atlassian.net/browse/GS-232?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7207
Co-authored-by: pranshi06 <85474619+pranshi06@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
GitOrigin-RevId: 90a771036da5275cd277f3daaf410381955c69de
2023-03-30 16:33:39 +00:00
Jesse Hallett
bd9f93eaef server: codecs for backend configs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8269
GitOrigin-RevId: 34330f383ca82fb159842a171a763c178b462788
2023-03-30 15:53:55 +00:00
Daniel Harvey
7227e96278 feature(server): custom return types as discreet metadata entity
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8556
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: b7dcbcf378279c3bf4c8d223174b90c2cb4b9e53
2023-03-30 15:15:11 +00:00
Auke Booij
cfd33e0dba ci(server): fix hlint ignore pragmas
Some fixes as a followup to #8311. In particular, some pragmas were referring to a now-nonexistent hlint rule.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8569
GitOrigin-RevId: 2a180427b3e93a71c47569ff10b6c8b6b407f7a2
2023-03-30 14:31:59 +00:00
hasura-bot
22d9b54eae Support _is_null operator in MSSQL permissions. fix #8479
GITHUB_PR_NUMBER: 9414
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/9414

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7800
Co-authored-by: Nakano as a Service <20109935+NKNaaS@users.noreply.github.com>
GitOrigin-RevId: 9a409bd023a21cbc43c13f028d088bde7a21c62f
2023-03-30 13:46:49 +00:00
Rakesh Emmadi
454fbc7f69 server/pro/cloud: add resolved connection template context in error response in dev mode
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8541
GitOrigin-RevId: 57f97ac336be8e656dcfcf4e339ad2ccc5c62393
2023-03-30 12:09:32 +00:00
Philip Lykke Carlsen
ed813655f6 refactor(tests): late binding of shouldReturnYaml
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8558
GitOrigin-RevId: 5044f4c726b71760fdbb05b71a1fc79e4eaa8a31
2023-03-30 09:05:04 +00:00
paritosh-08
e317c1a53f server: add new metrics for scheduled triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8401
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 0cdec9e7b5e9251bf7c8b710b7552d065d62e195
2023-03-30 05:52:54 +00:00
Philip Lykke Carlsen
e40e89d2d7 refactor(test-harness): Split up and move Harness.Test.Schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8545
GitOrigin-RevId: 9069737c23a286b3cefab59714064beac1465295
2023-03-29 17:40:33 +00:00
paritosh-08
b7bae6dfec server: add new metric for event trigger observability
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8380
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: df7d5c53668fc84e7d70d471e29774136f5d560a
2023-03-29 16:48:19 +00:00
paritosh-08
677a972956 server: improve connection template error message
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8517
GitOrigin-RevId: 3240e569322f3c9bf9376bbf4ea01c5d48218f07
2023-03-29 13:37:33 +00:00
Karthikeyan Chinnakonda
f5ffeeba52 Process scheduled events with a timeout
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8542
GitOrigin-RevId: f6c9300af3d038d17848ac0c001a6044dbafa464
2023-03-29 11:26:12 +00:00
Naveen Naidu
4e3dbed938 server: revert changes to created_at column of 'hdb_catalog.event_log'
This PR reverts the following two commits:
1. https://github.com/hasura/graphql-engine-mono/pull/8287
2. https://github.com/hasura/graphql-engine-mono/pull/8467

We are undoing a migration that was done on `hdb_catalog.event_log` table which was done in d4ae6a517da63f2f43567dc16fda135b3cd1d7e6 . And as such, users who were using event triggers on that version will come across the error:
```json
{"detail":{"info":{"code":"not-supported","error":"Expected source catalog version <= 3, but the current version is 4","path":"$"},"kind":"catalog_migrate"},"level":"error","timestamp":"2023-03-28T10:17:24.289+0530","type":"startup"}
{"code":"not-supported","error":"Expected source catalog version <= 3, but the current version is 4","path":"$"}
```
To fix these errors please run the following SQL on the source where event triggers were created on:
```
UPDATE hdb_catalog.hdb_source_catalog_version SET version = 3, upgraded_on= NOW();
ALTER table hdb_catalog.event_log ALTER COLUMN created_at SET DEFAULT NOW();
ALTER table hdb_catalog.event_invocation_logs ALTER COLUMN created_at SET DEFAULT NOW();
```

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8534
GitOrigin-RevId: b6bbcce0163c8beed80619d3cea056e643b8c180
2023-03-29 10:33:30 +00:00
Vishnu Bharathi
b0643d32d5 ci: tag release v2.22.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8553
GitOrigin-RevId: 48d121b042d66a52cf5a7e6e4d65cde44cc619cd
2023-03-29 09:53:09 +00:00
Gil Mizrahi
4b33b17f93 chore(ci): show bigquery error details when requested
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8525
GitOrigin-RevId: 882f3ee0dbe7776b15d53a66851b2a57b41fad73
2023-03-29 09:03:47 +00:00
Auke Booij
51774be7d6 fix(server): error handling for serving console assets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8222
GitOrigin-RevId: c7f49b35f659fbcd2b4471797b8d25e306aa56e7
2023-03-29 08:31:21 +00:00
Daniel Harvey
bbf71665d3 chore(pg-client: remove flaky running queries test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8530
GitOrigin-RevId: fe4c5dbdb607a808a6de0463433d710d16348ca0
2023-03-28 14:37:41 +00:00
Rakesh Emmadi
bfca9fd986 server/gardening: refactor scMetadataResourceVersion in SchemaCache
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8377
GitOrigin-RevId: 999a5112f8940b267c2765f4bed39bf6151f18f0
2023-03-28 13:27:32 +00:00
Divi
58edd357b8 ci: tag release v2.22.0-beta.2
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8531
GitOrigin-RevId: 3eb2d27b0457b0a1b114148ecefa8158dfeeeb61
2023-03-28 12:19:40 +00:00
Philip Lykke Carlsen
926d5ecdb0 feat: Handle logical models in metadata when the feature is disabled
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8443
GitOrigin-RevId: 4df0f62979dc78103b786b6f0f8ffcde6def0739
2023-03-28 11:57:11 +00:00
Daniel Harvey
2fb455b813 chore(tests): increase BigQuery test retries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8522
GitOrigin-RevId: c412a45ceddd18caed7e5b505cfe4163ec9beb88
2023-03-28 11:20:21 +00:00
Daniel Harvey
913f254a1f chore(tests): explicitly set BigQuery retry limit in py-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8523
GitOrigin-RevId: 52cb1f6c1d7eb61ebb1bf9a8318c9369f4594a30
2023-03-28 10:42:00 +00:00
Samir Talwar
69c238dc95 server/test-manual: A way to start PostgreSQL with a read replica.
This is for local testing. Details are in the README.

[DSF-218]: https://hasurahq.atlassian.net/browse/DSF-218?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8449
GitOrigin-RevId: 758aa9600fe79ed5c2917def3c86ac185267259e
2023-03-28 09:20:51 +00:00
Samir Talwar
d85de6bb6a CI: Get the GHC version from VERSIONS.json for all GitHub workflows.
Ideally, we'd have one place for this.

I have also removed the pinned Cabal version because v3.10 should address the bug we were seeing in the v3.8 series.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8497
GitOrigin-RevId: d0c68792c30e2e28ff2e210dd3ac8d28b83ac851
2023-03-27 18:53:18 +00:00
Antoine Leblanc
7aa341944b Remove HasServerConfigCtx from the schema cache build.
## Description

This PR is a incremental step towards achieving the goal of #8344. It is a less ambitious version of #8484.

This PR removes all references to `HasServerConfigCtx` from the cache build and removes `ServerConfigCtx` from `CacheBuildParams`, making `ServerConfigCtx` an argument being passed around manually instead. This has several benefits: by making it an arrow argument, we now properly integrate the fields that change over time in the dependency framework, as they should be, and we can clean up some of the top-level app code.

## Implementation

In practice, this PR introduces a `HasServerConfigCtx` instance for `CacheRWT`, the monad we use to build the cache, so we can retrieve the `ServerConfigCtx` in the implementation of `CacheRWM`. This contributes to reducing the amount of `HasServerConfigCtx` in the code: we can remove `SchemaUpdateT` altogether, and we can remove the `HasServerConfigCtx` instance of `Handler`. This makes `HasServerConfigCtx` almost **an implementation detail of the Metadata API**.

This first step is enough to achieve the goal of #8344: we can now build the schema cache in the app monad, since we no longer rely on `HasServerConfigCtx` to build it.

## Drawbacks

This PR does not attempt to remove the use of `ServerConfigCtx` itself in the schema cache build: doing so would make this PR much much bigger. Ideally, to avoid having all the static fields given as arrow-ish arguments to the cache, we could depend on `HasAppEnv` in the cache build, and use `AppContext` as an arrow argument. But making the cache build depend on the full `AppEnv` and `AppContext` creates a lot of circular imports; and since removing `ServerConfigCtx` itself isn't required to achieve #8344, this PR keeps it wholesale and defers cleaning it to a future PR.

A negative consequence of this is that we need an `Eq` instance on `ServerConfigCtx`, and that instance is inelegant.

## Future work

There are several further steps we can take in parallel after this is merged. First, again, we can make a new version of #8344, removing `CacheBuild`, FINALLY. As for `ServerConfigCtx`, we can split it / rename it to make ad-hoc structures. If it turns out that `ServerConfigCtx` is only ever used for the schema cache build, we could split it between `CacheBuildEnv` and `CacheBuildContext`, which will be subsets of `AppEnv` and `AppContext`, avoiding import loops.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8509
GitOrigin-RevId: 01b37cc3fd3490d6b117701e22fc4ac88b62b6b5
2023-03-27 17:44:27 +00:00
Daniel Harvey
2d9c8299c2 feature(server): add SQLServer logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8388
GitOrigin-RevId: cbf813d1114cb03816003ba73788d33ac37f1473
2023-03-27 16:56:05 +00:00
Daniel Harvey
77d6058f3e chore(server): add basic Explain test for Logical Models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8502
GitOrigin-RevId: 7cc64139d98155b94c0aadf16f8717881ea2add6
2023-03-27 15:21:42 +00:00
Daniel Harvey
305eebb3ab feature(server): add Logical Models support for CockroachDB
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8500
GitOrigin-RevId: 0205bd207843f50ad4fa12ad6e6c07d1f2740912
2023-03-27 14:00:07 +00:00
Antoine Leblanc
dd635fbbc7 Build the first schema cache in the app monad.
### Description

This PR is one more step towards #8344: it splits `initializeContext` into two parts: the first one builds the `AppEnv`, and the second builds the `AppContext` and its corresponding `AppStateRef`. Splitting it allows us to run the first schema cache build _in the app monad_, which was one of the steps required to remove `CacheBuild`, and ultimately to achieve #8344, which in turn is a blocker for several projects.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8445
GitOrigin-RevId: 0ef9eeec0c941b915da505cc9b1c60f36b108a56
2023-03-27 10:27:25 +00:00
Daniel Chambers
8acd447803 Fix non-determinism in expected ordering in agent test suite test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8493
GitOrigin-RevId: 210b6beb991d806e9a3e4cc901ee922ede0e3c84
2023-03-27 02:22:51 +00:00
Samir Talwar
0256e1da7d nix: Switch to nixpkgs-unstable.
I am making this change for two reasons:

  * We expect to upgrade to GHC 9.2.7 imminently, which is not available on the nixos-22.11 branch.
  * We need to upgrade unixODBC, which has stagnated on nixos-22.11.

While we expect a new NixOS release in a month or two, we can't really afford to wait that long. In addition, we might need to upgrade GHC again soon after that.

I removed `hpack` because we don't actually use it any more.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8483
GitOrigin-RevId: 9a7ef1a97599a218e34dfde1ad4f6a7279d2ba0e
2023-03-24 20:36:48 +00:00
Tom Harding
b2f683f56d Logical Models for BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8447
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: ananya-2410 <107847554+ananya-2410@users.noreply.github.com>
Co-authored-by: Matthew Goodwin <49927862+m4ttheweric@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: ddef9d54bfad6b7d5dc51251dbe47eac43995da3
2023-03-24 15:17:03 +00:00
Brandon Martin
63eabc2374 Add dataset support to Oracle in the Super Connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8469
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 6f2aebc150d7c93490e6da3ada5c282dd3d9a56c
2023-03-24 14:35:30 +00:00
Tom Harding
fe140ee791 Remove Fixture.Options argument from api-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8480
GitOrigin-RevId: a6dd5c6c2cc6274b7bd1694cf1100efa48e6bdbd
2023-03-24 13:59:35 +00:00
Rakesh Emmadi
e12b12c274 server: improve schema-sync logs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8386
GitOrigin-RevId: a90a792389576dcfda493ab96aed279459c60d92
2023-03-24 09:41:36 +00:00
Antoine Leblanc
9e8c06e971 Split catalog migration and cache build, and solve the manager chicken-egg problem.
### Description

This PR is the logical continuation of #8343 and #8357, and replaces both.

One core problem that this PR addresses: we had to create temporary a `HTTP.Manager` to initialize both the OSS and the Pro app: a manager is required to build the schema cache, but the dynamic TLS allow list is read from the schema cache... This PR solves this, by introducing the `TLSAllowListRef`, based on @abooij 's idea: it allows us to create a valid `HTTP.Manager` as soon as we have the metadata list, and then update the ref at a later point to make it point to the schema cache, allowing us to only build one and only one `HTTP.Manager`.

This paves the way towards building the schema cache _in the app monad_ and deprecating `CacheBuild`. Towards this, and also to clean the code, this PR also splits the catalog migration and the first schema cache build into two distinct functions. This doesn't result in a change of behaviour, as the transaction to update the catalog would always be done before attempting to build the schema cache.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8421
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
GitOrigin-RevId: 0e0402122b4fc008c1932bccbdbadf11878e27eb
2023-03-23 16:42:53 +00:00
Antoine Leblanc
068b5e4523 Rename and clean CE app monad.
### Description

This small PR is on top of #8440. It continues the cleanup of `Hasura/App` by grouping together all instances on the app monad, renaming the app monad, and removing its `m` parameter.

See [this commit](cb6ecba3d4) to see the diff in isolation.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8441
GitOrigin-RevId: 7abb6524a160bcb4f75e729e726ce2af69643998
2023-03-23 15:52:48 +00:00
Anon Ray
14fcaafa43 server: pass a partially applied function instead of passing AppStateRef to http handlers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8464
GitOrigin-RevId: b9dff36d2c560a093a6aff669315fe4fbc18b3f6
2023-03-23 14:33:29 +00:00
pranshi06
bc75136019 pro, server: fix event trigger log cleanup regression in Postgres event triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8460
GitOrigin-RevId: 17e7b73d3b92459ff9149391ecd46ccb9a0846e5
2023-03-23 13:56:11 +00:00
Gil Mizrahi
c8c0fd200f Allow running read-only run_sql queries in read-only mode
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8409
GitOrigin-RevId: f7e92c0ba03d5b2b1d6a9d8060a49b351c56bd52
2023-03-23 13:05:02 +00:00
Daniel Harvey
e6da837dbf chore(tests): move postgres-specific queries to own Logical Model tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8462
GitOrigin-RevId: 4032a2eb6dbb63d04688747e28ad293c6963e696
2023-03-23 12:25:34 +00:00
Puru Gupta
3758b8ae26 server: consolidate schema cache and app context into a single IORef
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8370
GitOrigin-RevId: ad79849fc78ce98d060a569b2cbc3625c9588a05
2023-03-23 11:31:01 +00:00
ananya-2410
45decbeb89 ci: tag release v2.22.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8453
GitOrigin-RevId: e721250920b47b367026243b06eef3c37547bdcd
2023-03-23 06:38:09 +00:00
Antoine Leblanc
d7309b811e Partial cleanup of Hasura/App, refactor of GlobalCtx
### Description

As part of another project (the continuation of #8421), i have started a cleanup of `Hasura.App`, focusing on deleting old code and grouping together things that belong together. This quickly grew into a refactor of `GlobalCtx`, now renamed into `BasicConnectionInfo`. This small refactor adds comments, and aims at making clear what the purpose of those types and functions is.

Furthermore, it also changes the way the default postgres connection info is created, by making that part of the process of creating the `BasicConnectionInfo`, to deduplicate similar effort across different files.

This is expected to be a no-op.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8440
GitOrigin-RevId: 412c5b1905f629beb9c6cd262b9798cb31c93bdb
2023-03-22 21:41:53 +00:00
Daniel Harvey
ebb571ef39 feature(server): metadata for SQLServer logical model
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8444
GitOrigin-RevId: 86cfd7adbf326560a0ec72034de3dcd9dcb5124c
2023-03-22 17:11:19 +00:00
Daniel Harvey
7e437fc32b feature(server): ordered columns in Logical Model return type
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8434
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 4ebd569bef868e01b15583e4af90d583d6713da7
2023-03-22 16:35:56 +00:00
Philip Lykke Carlsen
34e40e6caf refactor: newtype alias for action checking feature flags
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8429
GitOrigin-RevId: e543b608a91e0c39c39f06b772a7d43f360d5dc3
2023-03-22 10:48:22 +00:00
Philip Lykke Carlsen
a763eeeeb2 refactor: Componentizing Fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8428
GitOrigin-RevId: 8295a85b4a42dc3821d100371de1f350ed97cda3
2023-03-22 09:55:48 +00:00
pranshi06
f194c47156 server: fix value of created_at for postgres event triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8287
Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com>
GitOrigin-RevId: d4ae6a517da63f2f43567dc16fda135b3cd1d7e6
2023-03-22 07:32:42 +00:00
Daniel Chambers
08f05d45cf Include SQLite agent in Remote Joins HSpec API tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8382
GitOrigin-RevId: 6e264b4b3e49c1072b042b69ee256817a105c470
2023-03-22 03:30:02 +00:00
Solomon
cca1a92399 Simplify Transformable Requests Module
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8400
GitOrigin-RevId: 10728012c3d74e178c34b926e13d3627d514ce17
2023-03-22 00:01:07 +00:00
Tom Harding
e3d76a8fe5 Implement logical models metadata commands for BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8415
GitOrigin-RevId: d972abb9a0763f036c8b1d58feca34967abfac5f
2023-03-21 18:47:49 +00:00
Tom Harding
dba32d91c2 Generalise logical model test return types across backends
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8411
GitOrigin-RevId: b2c2c761415ed5e6fae172d1ccdc72afb0d01574
2023-03-21 17:41:53 +00:00
Tom Harding
6651e9b60d Use DerivingStrategies in BigQuery.Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8405
GitOrigin-RevId: ef3cd6cba009cb18e9441aabef146b060963dc65
2023-03-21 16:27:57 +00:00
Antoine Leblanc
e6b8b16478 Further remove explicit AppEnv threading in favour of askAppEnv
### Description

This PR continues some of the work done in #8392, and makes use of `HasAppEnv` to reduce the amount of explicit env passing in init functions, including removing it from the setup hook.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8408
GitOrigin-RevId: 4d6c906f78fbcc303571f9aac16d163d68b77e41
2023-03-21 15:51:30 +00:00
Antoine Leblanc
1d76015629 delete ExecutionCtx in favour of explicit argument passing
### Description

This small PR removes `ExecutionCtx`: it was only used as a `Reader` argument for `runGQ`, and two of its wrappers. Explicit argument passing removes one additional small record, and one more `runReaderT`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8397
GitOrigin-RevId: cdf65f643283be37d493d483d46a586f0f9ef885
2023-03-21 12:37:21 +00:00
pranshi06
ea691b3c06 server: improve logging around 'Internal Exception' errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8369
GitOrigin-RevId: 22160a2c8a17d571ceeda0bf3e9b672bea31b8f9
2023-03-21 12:00:00 +00:00
Antoine Leblanc
0a1628c0cc Clean AppEnv and AppContext passing, remove RunT, reduce ServerConfigCtx uses
## Description

This PR does several different things that happen to overlap; the most important being:
- it removes `RunT`: it was redundant in places where we already had `Handler`, and only used in one other place, `SchemaUpdate`, for which a local `SchemaUpdateT` is more than enough;
- it reduces the number of places where we create a `ServerConfigCtx`, since now `HasServerConfigCtx` can be implemented directly by `SchemaUpdateT` and `Handler` based on the full `AppContext`;
- it drastically reduces the number of arguments we pass around in the app init code, by introducing `HasAppEnv`;
- it simplifies `HandlerCtx` to reduce duplication

In doing so, this changes paves the way towards removing `ServerConfigCtx`, since there are only very few places where we construct it: we can now introduce smaller classes than `HasServerConfigCtx`, that expose only a relevant subset of fields, and implement them where we now implement `HasServerConfigCtx`.

This PR is loosely based on ideas in #8337, that are no longer applicable due to the changes introduced in #8159. A challenge of this PR was the postgres tests, which were running in `PGMetadataStorageAppT CacheBuild` 🙀

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8392
GitOrigin-RevId: b90c1359066d20dbea329c87762ccdd1217b4d69
2023-03-21 10:45:56 +00:00
awjchen
4f6240fb04 server: refactor ConnectionTemplateResolver
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8381
GitOrigin-RevId: 5286c384bb8c739170c90960a9b4a324a629c43b
2023-03-20 21:56:20 +00:00
Puru Gupta
5ec4d6e91b server: always add query type in http-log logs (whenever available)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8353
GitOrigin-RevId: f7a2f8ab033043ed331c15b861218547de6f2744
2023-03-20 16:14:25 +00:00
Daniel Harvey
fb562883f0 chore(ci): use ScalarType in LogicalModels tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8378
GitOrigin-RevId: afd4ac325dde8459ecd1ef8eb0bed855354327c2
2023-03-20 09:55:15 +00:00
Daniel Chambers
e9c697aaa9 Fix "limit" from permissions being incorrectly applied to aggregates in Data Connectors
[GDC-1064]: https://hasurahq.atlassian.net/browse/GDC-1064?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8345
GitOrigin-RevId: 9ef91944ba6408e1030a47de58f3271145433ee2
2023-03-20 04:02:23 +00:00
Jesse Hallett
1ad37eff31 server: codecs for network config, graphql introspection
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8132
GitOrigin-RevId: 6b800f35a76b6d38817862a4678644b8bf230a95
2023-03-17 17:46:16 +00:00
Auke Booij
29f0660dee chore(server): remove some unused function arguments
These didn't trigger GHC warnings because their name starts with an underscore.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7954
GitOrigin-RevId: 6898b165f073e70aad06e1a2aa5f703ac385f9ed
2023-03-17 15:51:33 +00:00
Daniel Harvey
8d92c48c3c chore(server): logical models in Citus
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8356
GitOrigin-RevId: 98cb2dcaebe45b98d506279bc7a363b8d2696cd8
2023-03-17 11:28:31 +00:00
Puru Gupta
c437a42f6d server: rename SchemaCacheRef to AppStateRef and add AppContext to it
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8159
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: a57f6dc8b3e992d86490e5c51508827f00151dfe
2023-03-17 10:30:38 +00:00
Tom Harding
3c683b0852 chore(api-tests): talk about permissions, not explicit roles
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8359
GitOrigin-RevId: 5f0f106c8479b03bc3dbf445116c545bc43a2891
2023-03-16 16:49:53 +00:00
Tom Harding
ec24ea7182 Split permissions into Types and Metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8358
GitOrigin-RevId: 2684c01a5ce2808577920fa6f8a53ee4c13b5f4e
2023-03-16 16:09:48 +00:00
Daniel Harvey
01636a9cfb chore(server/tests): use more Logical Model test helpers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8348
GitOrigin-RevId: c9e168125696993a39ea816459c588108a880710
2023-03-16 15:02:15 +00:00
Tom Harding
97d655240c chore(api-tests): Move withPermissions out of Permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8351
GitOrigin-RevId: c1728269a415f5b77f38277edbdd8b28cd9211a5
2023-03-16 14:23:25 +00:00
Tom Harding
080fbe8c5c Remove postMetadata permission command calls
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8336
GitOrigin-RevId: 588e0e46177ec18ee851a507cadba0f8f95ab457
2023-03-16 12:06:23 +00:00
Daniel Harvey
8d21bf207e chore(pg-client): don't explode test if we can't stop all the running Postgres jobs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8330
GitOrigin-RevId: 6e3b51bccc85116e49149300023114ce15170e75
2023-03-16 11:25:45 +00:00
Gil Mizrahi
021e769235 Logical models: check that specified named columns are returned from query
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8312
GitOrigin-RevId: fc7c7a14115c0b228abc2f48d3cfac51d2852277
2023-03-16 10:45:46 +00:00
Tom Harding
d60112c873 Generalise 'setupPermissionsAction'
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8335
GitOrigin-RevId: 106050f84339d2b97bc7cb69cefc312178cf5c26
2023-03-15 18:56:16 +00:00
Daniel Harvey
c441fa4a7f feature(server): allow untracking Logical Model when feature is off
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8339
GitOrigin-RevId: 20d4bfa465fa1ad6d1b2c630973e9c59a9d6178e
2023-03-15 18:20:58 +00:00
Daniel Harvey
95f5553af6 chore(server): split new statistics log from QueryLog
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8326
GitOrigin-RevId: 02ee652302de5328e63054a6448dca10de7b5c1b
2023-03-15 13:06:47 +00:00
Vishnu Bharathi
a3197745f1 ci: tag release v2.21.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8328
GitOrigin-RevId: ff76bbcf5ef1c360118f7119204af0ef5b408259
2023-03-15 12:17:08 +00:00
Rakesh Emmadi
9b6d403809 multitenant: enhancements to resize pools logs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8190
GitOrigin-RevId: 34ffbd2b79033850c3652d58fbf6b119e94c92ca
2023-03-15 10:30:48 +00:00
Daniel Harvey
cca883ab86 chore(tests): logical model test helper
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8314
GitOrigin-RevId: fc74d0c0bccea0368a41f1b88c9d8a599c93dcc8
2023-03-15 09:46:40 +00:00
paritosh-08
91552a1a05 server: move apollo-federation to GA
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8163
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: d971720e79d5e08d1e68b31f7475c0eb6f06cac8
2023-03-15 08:15:51 +00:00
Daniel Chambers
0b63b0b6b1 Fixed queries with no column fields and only introspection fields in Data Connectors
[GDC-1063]: https://hasurahq.atlassian.net/browse/GDC-1063?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8249
GitOrigin-RevId: 9d6dec3b4ef38fd7972bd0b9d3cfdfece1dcdcb5
2023-03-15 05:16:32 +00:00
Gavin Ray
af0c9417c4 super-connector: Mutations support for MySQL
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7669
Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com>
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 0e3e764b0e10fc0065752503952b57fb9a67f29a
2023-03-15 03:14:39 +00:00
Jesse Hallett
17a96a0fc6 server: codecs for open telemetry configuration
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8317
GitOrigin-RevId: 36dbe374164712167d7a4a31ea0509850060df36
2023-03-15 02:19:51 +00:00
Jesse Hallett
583e59fbe2 server: codecs for api limits
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8065
GitOrigin-RevId: 4a14f72fa4f832f1cc6cb7f5be8d146b4f00dd44
2023-03-15 01:38:52 +00:00
paritosh-08
b36971f637 server: webhook auth token caching
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7925
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: eae1f4023a9e9144c9eb230529c214cb4327e44f
2023-03-14 18:28:56 +00:00
Auke Booij
88488362e0 chore(server): various code cleanups
- Derive a few `instance`s
- Delete some dead code (methods and types)
- Delete some `INLINE` pragmas that are unlikely to have a big effect
- Monomorphize Postgres `LISTEN` code to avoid effect juggling
- Generalize some methods in `pg-client` so that others can be simplified
- Handle errors differently for `TxET` to deduplicate code
- Use `hoist` instead of specialized combinators such as `mapActionT`

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8130
GitOrigin-RevId: bc1e908b6c0869f440a214a76744e92d40fea1e6
2023-03-14 17:47:49 +00:00
Tom Harding
a119260a5d chore(server): tidy up the FromJSON Job instance
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8303
GitOrigin-RevId: bfdbb47ed1dd545df79f7e8604138d575489a0b9
2023-03-14 13:57:16 +00:00
pranshi06
b4157f58e8 server: fix scheduled events not showing up on console when the payload construction is failed
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8154
GitOrigin-RevId: ce3e4df13a55a260bc7b684818181c7ec156632c
2023-03-14 12:28:49 +00:00
Tom Harding
2124fa0f08 feature(server): make execution statistics available through logging
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8286
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 72de592c08778649693d8ff0a0555b16fb28c4bd
2023-03-14 11:33:45 +00:00
Rakesh Emmadi
b98a51c644 server/multitenant: addressing review comments in #8146
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8297
GitOrigin-RevId: caf82e358eed6ca6f94b2388e7bb4b75135b2793
2023-03-14 05:54:19 +00:00
Naveen Naidu
14f177862d server: remove redundant ExitCodes
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8280
GitOrigin-RevId: 20142da0dc8059d31442b41f2deb02c176dd395c
2023-03-14 05:18:25 +00:00
Rakesh Emmadi
0c3244c2c0 multitenant: switch schema sync listener to polling mechanism
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8146
GitOrigin-RevId: 7fe82899ca8ef9eba526fe4b298b0ffbce32be82
2023-03-14 04:39:34 +00:00
Philip Lykke Carlsen
1bad75e3d8 feat(logical models): Add validation of types and parameters
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8267
GitOrigin-RevId: 827852edf074eb72c95ac379fe3ac5d095fd26ab
2023-03-13 18:15:27 +00:00
Antoine Leblanc
cf531b05cb Rewrite Tracing to allow for only one TraceT in the entire stack.
This PR is on top of #7789.

### Description

This PR entirely rewrites the API of the Tracing library, to make `interpTraceT` a thing of the past. Before this change, we ran traces by sticking a `TraceT` on top of whatever we were doing. This had several major drawbacks:
- we were carrying a bunch of `TraceT` across the codebase, and the entire codebase had to know about it
- we needed to carry a second class constraint around (`HasReporterM`) to be able to run all of those traces
- we kept having to do stack rewriting with `interpTraceT`, which went from inconvenient to horrible
- we had to declare several behavioral instances on `TraceT m`

This PR rewrite all of `Tracing` using a more conventional model: there is ONE `TraceT` at the bottom of the stack, and there is an associated class constraint `MonadTrace`: any part of the code that happens to satisfy `MonadTrace` is able to create new traces. We NEVER have to do stack rewriting, `interpTraceT` is gone, and `TraceT` and `Reporter` become  implementation details that 99% of the code is blissfully unaware of: code that needs to do tracing only needs to declare that the monad in which it operates implements `MonadTrace`.

In doing so, this PR revealed **several bugs in the codebase**: places where we were expecting to trace something, but due to the default instance of `HasReporterM IO` we would actually not do anything. This PR also splits the code of `Tracing` in more byte-sized modules, with the goal of potentially moving to `server/lib` down the line.

### Remaining work

This PR is a draft; what's left to do is:
- [x] make Pro compile; i haven't updated `HasuraPro/Main` yet
- [x] document Tracing by writing a note that explains how to use the library, and the meaning of "reporter", "trace" and "span", as well as the pitfalls
- [x] discuss some of the trade-offs in the implementation, which is why i'm opening this PR already despite it not fully building yet
- [x] it depends on #7789 being merged first

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7791
GitOrigin-RevId: cadd32d039134c93ddbf364599a2f4dd988adea8
2023-03-13 17:38:39 +00:00
Krushan Bauva
52cacabad0 server: expose server_type information to version API in CE
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8278
GitOrigin-RevId: 245ec64544c67e1fdfd52203ff827af17c04a626
2023-03-13 16:06:30 +00:00
Anon Ray
58fc87e3e6 Revert "server/benchmarks: update the postgres version to 15"
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8290
GitOrigin-RevId: 8192f8dd5859acd82a93199c2c2408cbe5885782
2023-03-13 15:27:38 +00:00
pranshi06
823fca2d1c multitenant, server: throw a warning if user sets a time limit greater than the system limit
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7315
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 639a99fc0651b74f187108613be3086bc52e3a65
2023-03-13 11:45:45 +00:00
Anon Ray
120f413cd1 server/benchmarks: update the postgres version to 15
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8256
GitOrigin-RevId: 5285280cd8be9785e7d615ef444afcba42880abd
2023-03-13 11:09:21 +00:00
Jesse Hallett
83104b2c57 server: codecs for computed field definitions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8270
GitOrigin-RevId: a0954d79c1fecb7eeba4eb47983e65d3637a23c3
2023-03-09 23:46:41 +00:00
Jesse Hallett
3ee6b54962 server: codecs for metrics, roles, allow list
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8114
GitOrigin-RevId: 1a1f8b6360edbdddad5cf364b533a255c15e2f4a
2023-03-09 23:11:08 +00:00
Tom Harding
c18c36db62 Add a debugger function for testing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8268
GitOrigin-RevId: 52db2dabc168da5fef56ecc989ff47336c3ee5f1
2023-03-09 18:35:16 +00:00
Vishnu Bharathi
2ed20bae74 ci: tag multiple releases
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8263
GitOrigin-RevId: 051548dd1b179d9d4d5838a9eb794375cb2a382f
2023-03-09 14:47:25 +00:00
Gil Mizrahi
413d8d2bb4 name conflicts for logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8236
GitOrigin-RevId: e8edc914b34f362ee3391f0a70bfcbea6d6fa11f
2023-03-09 07:02:41 +00:00
Tom Harding
d0037e0f79 Remove redundant basic object query pytests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8240
GitOrigin-RevId: 1e700613b96c78805318519ca5593eca61b4a088
2023-03-08 17:07:38 +00:00
Daniel Chambers
1727b5236a Block adding remote relationships where they are not supported by the Data Connector agent
[GDC-1015]: https://hasurahq.atlassian.net/browse/GDC-1015?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8232
GitOrigin-RevId: 0cc3b7b1f17b2e6d4cdfa713b1581357de62f359
2023-03-08 06:01:04 +00:00
Samir Talwar
650e17df3c CI: Add commentary on how the Python integration test scripts work.
And links to documentation for the various Buildkite plugins, while we're at it.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8099
GitOrigin-RevId: ead112ffbb0c04278b586520f1f349a5a8afbd99
2023-03-07 20:59:31 +00:00
Samir Talwar
1cd2891407 CI: Upgrade server-pytest-runner's dependencies.
Part of [NDAT-561](https://hasurahq.atlassian.net/browse/NDAT-561).

It's time for a refresh.

This upgrades Python and all the other dependencies. We mostly care about the Google Cloud CLI, as it's crashing sometimes.

I also upgraded the Python integration test dependencies themselves, as otherwise the image fails to build. I didn't look too much into it.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8216
GitOrigin-RevId: ce48a89df7e0ede2fbcf686b71e96182dc91ee58
2023-03-07 17:41:00 +00:00
Tom Harding
061c6aa0f9 Test all simple queries with websockets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8228
GitOrigin-RevId: a4aacb08892e489d5209aaf8efce8c7f3adb5b80
2023-03-07 15:50:24 +00:00
Daniel Harvey
8064d6fe2b chore(server): fix logical models tests to parse raw number values
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8223
GitOrigin-RevId: 3a0b0b26b4295f00d84b0032e3c098502a295239
2023-03-07 10:49:23 +00:00
Daniel Harvey
e93d3d2735 feature(server): allow nullability in Logical Model arguments
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8214
GitOrigin-RevId: 1ecf4c9c362aad9eabad2134a70266ff1170577b
2023-03-07 10:04:58 +00:00
Daniel Chambers
116c290288 Added remote relationship target support to SQLite agent
[GDC-1010]: https://hasurahq.atlassian.net/browse/GDC-1010?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8218
GitOrigin-RevId: b0173d1dbeb4f71b079a90cbabd6ce48d05c1858
2023-03-07 07:16:40 +00:00
Daniel Chambers
dc83352863 Support for using Data Connectors as the target of remote relationships
[GDC-487]: https://hasurahq.atlassian.net/browse/GDC-487?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[GDC-488]: https://hasurahq.atlassian.net/browse/GDC-488?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8182
GitOrigin-RevId: 712953666e1a5ea07500f1e1aed669f27650f7a4
2023-03-07 01:33:26 +00:00
Daniel Harvey
ba5753e0cb feature(server): select permissions for Logical Models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8049
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 0e51ebfbf01e408f9a7a343edb5b3d9a7183140a
2023-03-06 16:40:48 +00:00
Tom Harding
df11036367 Resolve LogicalModelMetadata permissions into LogicalModelInfo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8191
GitOrigin-RevId: e7969b7dcbe70381fb227a5008eb75e4cdcbda51
2023-03-06 15:08:08 +00:00
Divi
c591f1b7a4 ci: catalog version update for v2.11.4 release
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8205
GitOrigin-RevId: cbb29ca609ec412e6eae8a27a35c12a508987c64
2023-03-06 13:55:47 +00:00
paritosh-08
96549b272b server: fix naming convention bugs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8016
GitOrigin-RevId: f3166f52a2b70d6998d71ebdcd222a7e008495fd
2023-03-06 06:23:20 +00:00
Tom Harding
769c25c7f3 Drop a logical model from the metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8189
GitOrigin-RevId: f82dbeaef8bd88ac2065e43661bb1480b340fea1
2023-03-03 17:59:57 +00:00
Tom Harding
16dac48f0c chore(server): Factor out logical model metadata existence check
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8187
GitOrigin-RevId: c18b593c8dec68b655af369e83756c37a36f53f1
2023-03-03 16:46:07 +00:00
Tom Harding
6385b4b968 feat(server): Add metadata command to create logical model permissions in metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8184
GitOrigin-RevId: b38a39812acd4a0a5ced93945b476acf8480c792
2023-03-03 15:29:16 +00:00
Tom Harding
a8f1af21ca Remove incoherent pragmas in Network.URI.Extended
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8179
GitOrigin-RevId: 66a1c8d26ef2a4eecba8a49f906582e5f9eb871c
2023-03-03 06:02:57 +00:00
Tom Harding
1574125f10 Separate the metadata and cache representations of logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8176
GitOrigin-RevId: a1ead98ea9d07b30ee09298e7f27a139d87711fa
2023-03-02 16:04:18 +00:00
Gil Mizrahi
60bd355a99 test: logimo validation prepared statement is deallocated
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8175
GitOrigin-RevId: 35ec7e69b616ebd7a4a30760b1698bd379e07d74
2023-03-02 15:30:35 +00:00
Philip Lykke Carlsen
8d02c88c1a refactor(github, hlint): Add hlint white-list of modules that can import backend instances
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8133
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 2c8aded4e77003d176931432e33e6d4c8cccfc6c
2023-03-02 14:45:57 +00:00
Tom Harding
66c8b2d2c6 Encode logical models in ToJSON SourceInfo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8172
GitOrigin-RevId: cb8d5c8efa9017e725bba96de747a29909736eb8
2023-03-02 13:30:57 +00:00
Tom Harding
25a470b2fd Rename the logical model test example root fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8170
GitOrigin-RevId: fffa3f82f92326661b48d82144fe9fd8331916fe
2023-03-02 12:18:17 +00:00
Tom Harding
9091248a3a Run the API tests with WebSockets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7802
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: hasura-bot <30118761+hasura-bot@users.noreply.github.com>
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
Co-authored-by: gneeri <10553562+gneeri@users.noreply.github.com>
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com>
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com>
Co-authored-by: Nicolas Inchauspe <710410+nicoinch@users.noreply.github.com>
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
Co-authored-by: Julian@Hasura <118911427+julian-mayorga@users.noreply.github.com>
Co-authored-by: Solomon <24038+solomon-b@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 547786fa9ff8635aec6d62f9198df185f4ff6473
2023-03-02 11:36:55 +00:00
Philip Lykke Carlsen
b70b847207 feat: Add nullability and descriptions to custom return types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8135
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: cdde3795b32d56103c0bf5ebb31af2eab60665f2
2023-03-02 10:57:39 +00:00
Divi
a53a2115dc ci: tag release v2.20.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8155
GitOrigin-RevId: 61672266190411c792c77d8fddd25dc3bac47c01
2023-03-01 08:09:54 +00:00
Daniel Chambers
81ffaafe6f Fixed unstable ordering in Data Connector agent test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8143
GitOrigin-RevId: 4926e95f327123e8925340fed35c24687bd8189e
2023-03-01 01:30:44 +00:00
Krushan Bauva
5319fe6bfc server: redact sensitive fields from multitenant logs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8085
GitOrigin-RevId: acf23c6eaaf84fa3218898be6484431ccc646ee9
2023-02-28 14:32:52 +00:00
Daniel Chambers
6b19069c37 Only load the schema once for all schema tests in the Data Connector agent test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8142
GitOrigin-RevId: 1e2340fa5670a9c11e424e85045dc18f5286cff7
2023-02-28 13:52:30 +00:00
Gil Mizrahi
7872be0e82 feature(server): support subscriptions in logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8076
GitOrigin-RevId: 84a3e89d97bdb81c02803b644f417dfe51834405
2023-02-28 11:18:43 +00:00
Puru Gupta
4e7fbbc2d6 server: use only server context and app env for dependent functions (remove passing of ServeOptions)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7920
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 6ebc4d0429fdfecf93950879b69e8b5f8f56b502
2023-02-28 09:11:27 +00:00
Puru Gupta
50f0e1df51 server: centralize various application state (introducing AppContext and AppEnv)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8108
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: 4a1f1ba960be4e0d4838188645d10162c73ecf06
2023-02-24 18:11:05 +00:00
Tom Harding
318cf1b692 Boolean expressions should talk about fields, not tables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8098
GitOrigin-RevId: 93b6e5b675a9421e6079ca344e308e7362839bc1
2023-02-24 12:32:38 +00:00
Daniel Harvey
fbab8cd755 Revert "server: centralize various application state (introducing AppContext and AppEnv)"
The Postgres integration tests failed [here](https://buildkite.com/hasura/graphql-engine-mono/builds/30176#01867eb5-9635-4aaf-a147-44d43df03cbd), yet this merged. Looks like a missing required check. Have resolved that, but in the meantime, we should revert this PR until the test can be fixed.

Reverts hasura/graphql-engine-mono#7905

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8107
GitOrigin-RevId: 6ea329bc54f42d8c8686c5d26f0b2dbd43f991cf
2023-02-24 11:27:16 +00:00
Philip Lykke Carlsen
1af8d53c6f refactor(hlint): Demote Environment-from-OS to a suggestion
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8092
GitOrigin-RevId: 042aec936638fcb7890ecaa8cb368ed442100904
2023-02-23 21:44:44 +00:00
Puru Gupta
f45928b03b server: centralize various application state (introducing AppContext and AppEnv)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7905
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: 74ce763b266dc053c10888767d5b4a0d9692508a
2023-02-23 14:45:24 +00:00
Daniel Chambers
6f50261274 Additional tests for mutations in the Data Connector agent test suite
[GDC-719]: https://hasurahq.atlassian.net/browse/GDC-719?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8080
GitOrigin-RevId: 2e35dd72723e0e9fc63426dc90b1a89aedbe4774
2023-02-23 13:54:37 +00:00
ananya-2410
36db970a34 ci: tag release v2.20.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8081
GitOrigin-RevId: 0e13f833e881a5acf648f43ce16358a13945f5c3
2023-02-23 06:52:12 +00:00
Daniel Chambers
190e429eef Add tests for delete mutations to the Data Connector agent test suite
[GDC-721]: https://hasurahq.atlassian.net/browse/GDC-721?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8067
GitOrigin-RevId: bf5b7e7c20c6011d438888be6017331def7063bf
2023-02-22 23:41:47 +00:00
Antoine Leblanc
6e574f1bbe harmonize network manager handling
## Description

### I want to speak to the `Manager`

Oh boy. This PR is both fairly straightforward and overreaching, so let's break it down.

For most network access, we need a [`HTTP.Manager`](https://hackage.haskell.org/package/http-client-0.1.0.0/docs/Network-HTTP-Client-Manager.html). It is created only once, at the top level, when starting the engine, and is then threaded through the application to wherever we need to make a network call. As of main, the way we do this is not standardized: most of the GraphQL execution code passes it "manually" as a function argument throughout the code. We also have a custom monad constraint, `HasHttpManagerM`, that describes a monad's ability to provide a manager. And, finally, several parts of the code store the manager in some kind of argument structure, such as `RunT`'s `RunCtx`.

This PR's first goal is to harmonize all of this: we always create the manager at the root, and we already have it when we do our very first `runReaderT`. Wouldn't it make sense for the rest of the code to not manually pass it anywhere, to not store it anywhere, but to always rely on the current monad providing it? This is, in short, what this PR does: it implements a constraint on the base monads, so that they provide the manager, and removes most explicit passing from the code.

### First come, first served

One way this PR goes a tiny bit further than "just" doing the aforementioned harmonization is that it starts the process of implementing the "Services oriented architecture" roughly outlined in this [draft document](https://docs.google.com/document/d/1FAigqrST0juU1WcT4HIxJxe1iEBwTuBZodTaeUvsKqQ/edit?usp=sharing). Instead of using the existing `HasHTTPManagerM`, this PR revamps it into the `ProvidesNetwork` service.

The idea is, again, that we should make all "external" dependencies of the engine, all things that the core of the engine doesn't care about, a "service". This allows us to define clear APIs for features, to choose different implementations based on which version of the engine we're running, harmonizes our many scattered monadic constraints... Which is why this service is called "Network": we can refine it, moving forward, to be the constraint that defines how all network communication is to operate, instead of relying on disparate classes constraint or hardcoded decisions. A comment in the code clarifies this intent.

### Side-effects? In my Haskell?

This PR also unavoidably touches some other aspects of the codebase. One such example: it introduces `Hasura.App.AppContext`, named after `HasuraPro.Context.AppContext`: a name for the reader structure at the base level. It also transforms `Handler` from a type alias to a newtype, as `Handler` is where we actually enforce HTTP limits; but without `Handler` being a distinct type, any code path could simply do a `runExceptT $ runReader` and forget to enforce them.

(As a rule of thumb, i am starting to consider any straggling `runReaderT` or `runExceptT` as a code smell: we should not stack / unstack monads haphazardly, and every layer should be an opaque `newtype` with a corresponding run function.)

## Further work

In several places, i have left TODOs when i have encountered things that suggest that we should do further unrelated cleanups. I'll write down the follow-up steps, either in the aforementioned document or on slack. But, in short, at a glance, in approximate order, we could:

- delete `ExecutionCtx` as it is only a subset of `ServerCtx`, and remove one more `runReaderT` call
- delete `ServerConfigCtx` as it is only a subset of `ServerCtx`, and remove it from `RunCtx`
- remove `ServerCtx` from `HandlerCtx`, and make it part of `AppContext`, or even make it the `AppContext` altogether (since, at least for the OSS version, `AppContext` is there again only a subset)
- remove `CacheBuildParams` and `CacheBuild` altogether, as they're just a distinct stack that is a `ReaderT` on top of `IO` that contains, you guessed it, the same thing as `ServerCtx`
- move `RunT` out of `RQL.Types` and rename it, since after the previous cleanups **it only contains `UserInfo`**; it could be bundled with the authentication service, made a small implementation detail in `Hasura.Server.Auth`
-  rename `PGMetadaStorageT` to something a bit more accurate, such as `App`, and enforce its IO base

This would significantly simply our complex stack. From there, or in parallel, we can start moving existing dependencies as Services. For the purpose of supporting read replicas entitlement, we could move `MonadResolveSource` to a `SourceResolver` service, as attempted in #7653, and transform `UserAuthenticationM` into a `Authentication` service.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7736
GitOrigin-RevId: 68cce710eb9e7d752bda1ba0c49541d24df8209f
2023-02-22 15:55:54 +00:00
Gil Mizrahi
625e41cd77 rename naqi to logimo part 3 - data types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8068
GitOrigin-RevId: 435527a98e645ed69c9be484ff0bd21af8181d69
2023-02-22 13:46:54 +00:00
Gil Mizrahi
2b0e9ea14c rename NativeQuery module hierarchy to LogicalModel
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8063
GitOrigin-RevId: 0ed0cee7fb1d77f166770caae21cc05d5dd30b75
2023-02-22 09:23:54 +00:00
Daniel Chambers
72e319e486 Add tests for update mutations to the Data Connector agent test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8054
GitOrigin-RevId: 6869e8938e7a70128770f959bf34e3a291074d14
2023-02-22 04:19:16 +00:00
Gil Mizrahi
b761add3c4 rename naqi to logimo part 1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8037
GitOrigin-RevId: 4839410ba836d4b69fd1ee30875bca9b46decc66
2023-02-21 13:46:44 +00:00
Krushan Bauva
2b1d5be10a server: catch TimeoutThread and InvalidRequest exceptions in websocket connections
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8014
GitOrigin-RevId: eef2d1ce99ec87bb239584c3ca4a9f056131b5cc
2023-02-21 11:55:54 +00:00
Rakesh Emmadi
39f3e90be8 server: accept "strict" param in healthz API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8009
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: f535a84dc8aa35f60aaeab15ec5b54ba6f80ef6b
2023-02-21 09:13:44 +00:00
Jesse Hallett
37100138b6 server: codecs for rest endpoint definitions in metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8030
GitOrigin-RevId: 0980502c535ab308e2458a98cebfd166fa55f8b6
2023-02-20 18:37:55 +00:00
Philip Lykke Carlsen
e979a39f6d chore: Fix all outstanding hlint hints
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8042
GitOrigin-RevId: 87c718fa7b09f375ea0e7c2465788ac49f575290
2023-02-20 17:43:28 +00:00
Jesse Hallett
99a982d4dd server: codecs for the metadata Action type
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7898
GitOrigin-RevId: 4211854f656ab02bb058b2d0831637477b3d4767
2023-02-20 17:10:19 +00:00
paritosh-08
17c3d25b1b server: warning in replace_metadata API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7575
GitOrigin-RevId: 0171514056f725cb7a86dc7856eb57c674937c83
2023-02-20 14:20:38 +00:00
Philip Lykke Carlsen
384bb1b9d4 refactor(server): Add HLint rules discouraging getEnvironment
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7959
GitOrigin-RevId: c3189553a7f419a46510463dad7985f2953ef3c3
2023-02-20 13:45:24 +00:00
Daniel Harvey
2720f0a25a chore(server): store Native Queries as ordered map
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8027
GitOrigin-RevId: bfcf4001d82970e25e0a85e6cd720b2b3a52a5be
2023-02-20 11:48:16 +00:00
Jesse Hallett
8640346b4f server: codecs for cron triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8029
GitOrigin-RevId: c26308782618c760921a0eff3e4bd87702bd3eb2
2023-02-20 02:52:00 +00:00
Solomon
316c2cc4e1 Remove suffix from source kind display name
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7788
GitOrigin-RevId: 17eea4c8de746daab120d8bd1e7fce43ac6618bf
2023-02-17 23:18:54 +00:00
Gil Mizrahi
0054a6feca add basic naqi telemetry
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8026
GitOrigin-RevId: d82fa3ce10a40b9f8ead0e40400295a17eb66d25
2023-02-17 13:58:48 +00:00
Gil Mizrahi
f57786a22d remove .ToSource.hs.swp
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8025
GitOrigin-RevId: d041fa09cf2faacb12a4b5e3bdd238fdde8d1957
2023-02-17 10:19:38 +00:00
Solomon
fd0ba0013d Adds Agent availability check to dc_add_agent metadata action
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7792
GitOrigin-RevId: 5ba1669b27078a45a4efe2ba736908a4929a2a50
2023-02-17 01:30:51 +00:00
Philip Lykke Carlsen
ecd0e7c3f4 fix, Sql Server: Properly quote delimited identifiers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7929
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 4ed630dcf6851a92980571c8041273512c69c622
2023-02-16 11:20:11 +00:00
Daniel Chambers
ac475fa02e Added weird table edge-case insert mutation tests to agent test suite
[GDC-719]: https://hasurahq.atlassian.net/browse/GDC-719?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7964
GitOrigin-RevId: d3077aafd29f3b5553e00bf6bba4c1ff9966485d
2023-02-16 07:51:36 +00:00
Solomon
b3553ac88d GDC Mysql integration tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7603
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 651bc2fb59a46449e2a4325a4c7af57592e53845
2023-02-16 06:30:51 +00:00
Jesse Hallett
b235e94e28 ci: fix an error in a recently-added buildkite test script
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8001
GitOrigin-RevId: 12f7d66772eb6d9b011b7a77a85544ffeb6ec270
2023-02-15 21:07:52 +00:00
Daniel Harvey
3b42e704dd [server] Custom types prototype
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7807
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: ee3c644b92aa71a236d247a0cfc5deb7846f91c2
2023-02-15 17:56:58 +00:00
Tom Harding
565176c155 Remove NativeQueryMetadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7980
GitOrigin-RevId: caadc019cc1f7824a65de10b20415ff736b1aafb
2023-02-15 16:27:47 +00:00
Vishnu Bharathi
3eb1be0acb ci: tag release v2.19.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7996
GitOrigin-RevId: 45b08009c4e669c2b20c473bb7bdf896160b6e10
2023-02-15 13:11:28 +00:00
Varun Choudhary
ea76e01b0f console: support suffix for tls allow list
[GS-392]: https://hasurahq.atlassian.net/browse/GS-392?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7745
Co-authored-by: Krushan Bauva <31391329+krushanbauva@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 72c9a2eef1cfaaefa30a7d53764b1c3688b38ae7
2023-02-15 10:26:41 +00:00
Gil Mizrahi
7a3c1489ad set omit_request_id to true by default
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7978
GitOrigin-RevId: 7e359979b304ff63b8e582e460c7668f8207fe75
2023-02-15 09:53:19 +00:00
awjchen
2df8589097 server: fix race condition in metadata update
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7984
GitOrigin-RevId: edd4a581a5b785e7a09b2d4c8b2a5c6ccc7f8b63
2023-02-15 06:12:59 +00:00
Vijay Prasanna
9900027a8e feature (console): remove the GDC experimental feature flag
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7942
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
Co-authored-by: Julian <843342+okjulian@users.noreply.github.com>
Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com>
GitOrigin-RevId: 643c02d36f71b3e25060ddbb723bf57f31dd4318
2023-02-15 04:52:54 +00:00
Gil Mizrahi
20e72ddb29 reject untrack naqi when naqi does not exist
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7975
GitOrigin-RevId: e56385e7396c3980d78b53acc6e9b3656fd9909d
2023-02-14 14:40:15 +00:00
Philip Lykke Carlsen
fed36dadc7 Fix: Unable to use environment variable for CockroachDB connection string in Cloud
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7883
GitOrigin-RevId: b1f515c4de3b5f345991a0fad1152f42169f9d0d
2023-02-14 12:15:58 +00:00
Lyndon Maydwell
630bf277c1 SQLite Mutations
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7573
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 7807368faaa4bac5c0726c2dab041f8180a3fc31
2023-02-14 11:20:36 +00:00
Samir Talwar
2df5b80063 server/tests-py: Run in parallel on all PostgreSQL versions in CI.
If this works, we can start knocking out running in the old, sequential mode.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7909
GitOrigin-RevId: 4cda5b52b3c385dd3286ba1f58d5cd7c62b87314
2023-02-13 23:39:28 +00:00
Auke Booij
334660d906 server: refactor FromJSON FromIntrospection instances
- Inline a few instances to avoid code duplication
- Use `(<$>)` to avoid `let`
- Improve error reporting when types of invalid kind are specified in `possibleTypes` or `interfaces`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7540
GitOrigin-RevId: 954fb710f94a275daff938b9a6e58765c4286d0c
2023-02-13 07:50:12 +00:00
Karthikeyan Chinnakonda
958a5e1a33 Include cron trigger's name in the error message
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7914
GitOrigin-RevId: 7bce2788ac154e7673402022414ab1fff653340d
2023-02-13 07:11:57 +00:00
Daniel Chambers
2ced1f2676 More tests for insert mutations for Data Connector agents
[GDC-719]: https://hasurahq.atlassian.net/browse/GDC-719?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7901
GitOrigin-RevId: b7f28c4b9604c0ca78c528deb2923e8519fae56a
2023-02-13 01:03:18 +00:00
Lyndon Maydwell
5a3f10363d Fixing omit_tracked argument to suggest_relationships API to be more granular
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7900
GitOrigin-RevId: 2116875b866ffc79ce5e3604751c62b8ac9c37e3
2023-02-10 01:53:30 +00:00
Antoine Leblanc
dec8579db8 Allow backend execution to happen on the base app monad.
### Description

Each Backend executes queries against the database in a slightly different stack: Postgres uses its own `TXeT`, MSSQL uses a variant of it, BigQuery is simply in `ExceptT QErr IO`... To accommodate those variations, we had originally introduced an `ExecutionMonad b` type family in `BackendExecute`, allowing each backend to describe its own stack. It was then up to that backend's `BackendTransport` instance to implement running said stack, and converting the result back into our main app monad.

However, this was not without complications: `TraceT` is one of them: as it usually needs to be on the top of the stack, converting from one stack to the other implies the use `interpTraceT`, which is quite monstrous. Furthermore, as part of the Entitlement Services work, we're trying to move to a "Services" architecture in which the entire engine runs in one base monad, that delegates features and dependencies to monad constraints; and as a result we'd like to minimize the number of different monad stacks we have to maintain and translate from and to in the codebase.

To improve things, this PR changes `ExecutionMonad b` from an _absolute_ stack to a _relative_ one: i.e.: what needs to be stacked on top of our base monad for the execution. In `Transport`, we then only need to pop the top of the stack, and voila. This greatly simplifies the implementation of the backends, as there's no longer any need to do any stack transformation: MySQL's implementation becomes a `runIdentityT`! This also removes most mentions of `TraceT` from the execution code since it's no longer required: we can rely on the base monad's existing `MonadTrace` constraint.

To continue encapsulating monadic actions in `DBStepInfo` and avoid threading a bunch of `forall` all over the place, this PR introduces a small local helper: `OnBaseMonad`. One only downside of all this is that this requires adding `MonadBaseControl IO m` constraint all over the place: previously, we would run directly on `IO` and lift, and would therefore not need to bring that constraint all the way.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7789
GitOrigin-RevId: e9b2e431c5c47fa9851abf87545c0415ff6d1a12
2023-02-09 14:40:04 +00:00
ananya-2410
c681771192 ci: tag release v2.19.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7911
GitOrigin-RevId: 154a508058b5f3dc8c4901fb6a22ab00009adc19
2023-02-09 12:24:28 +00:00
Auke Booij
8e0e778cd5 server/tests: ensure that all responses have a Content-Type header
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7850
GitOrigin-RevId: 5e3ec3907177bd35974d5dd9a990dca399904139
2023-02-09 10:28:19 +00:00
kodiakhq[bot]
b01d3a45de server: dev build modes
Add some configurations for modern profiling modes, and integration into dev.sh

These require cabal 3.8 due to the use of `import`

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7671
GitOrigin-RevId: f793f64105cfd99fb51b247fa8bc050f6d4bd23e
2023-02-08 22:43:00 +00:00
Tom Harding
89bbb24c54 Monomorphise NativeQueryName
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7865
GitOrigin-RevId: 6c26edeb40f3b523053ffc45220a3c1046585de3
2023-02-08 15:48:12 +00:00
Samir Talwar
23f78a05b1 server/tests-py: Enable TLS tests in parallel mode on CI.
Part of [NDAT-257](https://hasurahq.atlassian.net/browse/NDAT-257).

* Run the TLS tests on CI.
* Run non-TLS tests even when a TLS certificate is provided; just ignore it.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7806
GitOrigin-RevId: d705e2e5131a674070a98a893323a7b98a92f688
2023-02-08 14:42:27 +00:00
Samir Talwar
fa53a70631 server/tests-py: Run TestSubscriptionBasicNoAuth in the new mode.
This test _cannot_ run without an admin secret, so we need a new marker just for that.

This also fixes the Docker Compose file so that _run.sh_ works again. Apparently it was not used much.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7831
GitOrigin-RevId: 1cb9449a20c7cbe56fbd1ba0f12337f056683624
2023-02-08 11:51:54 +00:00
Daniel Chambers
0d5badba09 Initial tests for insert mutations for Data Connector agents
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7875
GitOrigin-RevId: 793501685124e41edfd83c6be4a2a9c7ae7f9267
2023-02-08 08:36:58 +00:00
Anon Ray
85a7e03526 docs: add explanation of livequery-poller-log (GS-284)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7372
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 75fd9300749417695941fe552f3f06bb08c55c10
2023-02-08 07:23:49 +00:00
Solomon
4d3e80a0b5 [Gardening] Eliminate boolean blindness in rsoWebSocketCompression
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7818
GitOrigin-RevId: cb3b8b8ebf7bd296c88c782c8bc457397a88f8ea
2023-02-08 04:15:01 +00:00
Solomon
9b6b44c888 [Gardening] Eliminate boolean blindness in soAllowList
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7815
GitOrigin-RevId: 6768abb39e7ab6b12be8989702223500119169de
2023-02-08 03:36:45 +00:00
Solomon
97dc0408d1 [Gardening] Eliminate boolean blindness in soDevMode
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7814
GitOrigin-RevId: 593b8e764a8dca5aa9b4a9008d341a5d814f28fc
2023-02-08 02:58:32 +00:00
Solomon
807be5f2bf [Gardening] Eliminate Boolean Blindness in soEnableTelemetry option
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7812
GitOrigin-RevId: 0b25624cb600a6d9976737b524c8cd60d160f174
2023-02-08 01:47:56 +00:00
Solomon
caad80ab7f [Gardening] Eliminate boolean blindness in so soWsReadCookie
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7813
GitOrigin-RevId: 6aae2eda1765e302a08c676988b6a7f9432e9977
2023-02-08 00:57:41 +00:00
pranshi06
12e276cbc6 server: fix nullable field omitted from action response when omitted in the webhook response
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7795
GitOrigin-RevId: d0c3dc7e092af3b8dc8ad18a97462d0fea4e74f3
2023-02-07 15:34:07 +00:00
Rakesh Emmadi
e6c5a9505b server: log when cron triggers are fetched from database for generating events
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7725
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 8dd2b07c769392e057400c5e60e40e7fc56ac26f
2023-02-07 12:23:42 +00:00
Auke Booij
36a9de5215 server: reintroduce Content-Type header for errors
Fix regression introduced by hasura/graphql-engine-mono#7444.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7827
GitOrigin-RevId: 468f2a53f44b732c09f09ca71a3a2c4b38e4e360
2023-02-07 11:27:28 +00:00
Vishnu Bharathi
5f9e70a527 ci: tag release v2.18.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7853
GitOrigin-RevId: 02d56a41be3a521fdaba3b959f9bba1969ad72b2
2023-02-07 10:11:24 +00:00
Solomon
7027af5a05 [Gardening] Eliminate Boolean Blindness in soEnableConsole option
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7810
GitOrigin-RevId: 69f84d52e5f61e88b668abb3898344ccfbc0d26d
2023-02-07 05:59:45 +00:00
Jesse Hallett
2d513ace63 server: codecs for CustomTypes
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7838
GitOrigin-RevId: 09a9be0cee748226321f0cf09401b18c2f31e930
2023-02-07 03:47:35 +00:00
David Overton
98af923df5 MongoDB Data Connector prototype agent
Basic MongoDB agent. This is intended as a starting point for playing with nested documents in a MongoDB back end. Currently supports basic queries with projections, where expressions, limit and offset. No support for joins, aggregates or mutations.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7840
GitOrigin-RevId: 3f03b8416c95acf2b68da1db56cbe36a513a4bde
2023-02-07 02:57:06 +00:00
Daniel Chambers
2e8fc69394 Adds an agent test for ordering by a single column aggregate function
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7820
GitOrigin-RevId: 8455c2ba032173ade474f2744b43d1259f88c9b2
2023-02-06 23:45:56 +00:00
Solomon
d8ff0329a0 Eliminate Template Haskell from Hasura.RQL.Types.Common
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7819
GitOrigin-RevId: bf5d1616a90a771e1c72321b64b38d9c153b0e94
2023-02-06 22:03:02 +00:00
Solomon
bf4e514ebf [Gardening] Remove where clause from mkServeOptions and add haddocks.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7809
GitOrigin-RevId: 3a440eaa397045c95fcff4316ef3c0438a754c7c
2023-02-06 19:15:06 +00:00
Auke Booij
bc9bafbecf server: delete unused benchmarking code
As far as I know, and the people who touched this, this is dead code.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7830
GitOrigin-RevId: 2530783951af97033545faf65ad282fd9cdbc3b3
2023-02-06 15:11:10 +00:00
Daniel Chambers
7a4bde9652 Added result_type property to SingleColumnAggregate
[GDC-756]: https://hasurahq.atlassian.net/browse/GDC-756?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7793
GitOrigin-RevId: b8201615984a71a9f41bed4195e2435e362cf383
2023-02-06 04:20:17 +00:00
Gil Mizrahi
f90373b1ca NaQI - validate against the database - infra and check syntax
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7778
GitOrigin-RevId: c8366ad7261d9c120dc0612bedb96fa5ae59eda3
2023-02-03 16:29:22 +00:00
Daniel Harvey
d3d2d967d2 [server/tests] test server health with /healthz endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7759
GitOrigin-RevId: 952b64b258a0566a8c393f70e8341e8eccb8d7a4
2023-02-03 15:20:42 +00:00
Samir Talwar
710a33bf45 CI: Run the Python tests in the "new" mode, one HGE per test class.
Part of [NDAT-257](https://hasurahq.atlassian.net/browse/NDAT-257).

This runs the Python tests in parallel, all at once, with each test class spinning up HGE and configuring it appropriately. Once we are confident this works, we can remove most of the old jobs, drastically reducing the number of machines we need to run the Python tests.

For now we are only running on PostgreSQL 15. Once this is merged, we can expand to all supported PostgreSQL versions, and then Citus, MS SQL Server, and BigQuery.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7780
GitOrigin-RevId: 174511fc3e3bcd4ea968e3ade6c867c3aa84096a
2023-02-03 14:09:29 +00:00
Auke Booij
e6db044ecc server: fix some hspec tests
- One test suite wasn't getting picked up due to it not satisfying the [criteria](https://hspec.github.io/hspec-discover.html) for `hspec-discover`
- One test was broken ever since it was introduced in hasura/graphql-engine-mono#5181. This wasn't picked up due to the module not satisfying `hspec-discover`'s criteria until more recently.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7801
GitOrigin-RevId: fd5c31ccf12d6d0c4be0dc7bf99f14d63caccc83
2023-02-03 14:09:19 +00:00
paritosh-08
775bdc8026 server: move event trigger schedule cleanup logic
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7606
Co-authored-by: Krushan Bauva <31391329+krushanbauva@users.noreply.github.com>
GitOrigin-RevId: 95819347aff4e6a86b2bc9acf214222e05dba496
2023-02-03 12:30:00 +00:00
Daniel Harvey
d32e734310 [server] Pass parameters to native queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7727
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: ddca3d962c05024913ce6ec4c6b4ea4a0f4a6a8c
2023-02-03 11:16:29 +00:00
Samir Talwar
416f4e8f1e server/api-tests: Port a test for empty roots from the Python tests.
More for practice than anything else.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7760
GitOrigin-RevId: 3af769e704b25e5cc97ab5905b6f5311f731bbce
2023-02-03 10:00:21 +00:00
Solomon
621a346ca7 Simplify SourceKindInfo ToJSON instance
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7787
GitOrigin-RevId: f481c7b3dadbbd9b97655187a486954e0e17ae4f
2023-02-03 01:47:02 +00:00
Antoine Leblanc
e99f9a2f57 Remove MetadataStorageT, clean up error handling.
## Description

This PR removes `MetadataStorageT`, and cleans up all top-level error handling. In short: this PR changes `MonadMetadataStorage` to explicitly return a bunch of `Either QErr a`, instead of relying on the stack providing a `MonadError QErr`. Since we implement that class on the base monad *below any ExceptT*, this removes a lot of very complicated instances that make assumptions about the shape of the stack.

On the back of this, we can remove several layers of ExceptT from the core of the code, including the one in `RunT`, which allows us to remove several instances of `liftEitherM . runExceptT`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7689
GitOrigin-RevId: 97d600154d690f58c0b93fb4cc2d30fd383fd8b8
2023-02-03 01:05:09 +00:00
Solomon
29a75e36f9 Reorganize Hasura.Prelude module and add haddocks.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7790
GitOrigin-RevId: 9ad68061d58c7d8763fefeba3f3fe9ddd29d443c
2023-02-02 23:38:01 +00:00
Auke Booij
aeff6e162a server: fix cabal and warnings for arrows related packages
#7730 added `package` stanzas for all our internal Haskell libraries, so that `-Werror` was switched on for all of them. However, #7534 was developed simultaneously, and merged shortly after, so that we missed `package` stanzas for `hasura-incremental` and `arrows-extra`. Then #7761 added one for `hasura-incremental`. This PR fixes one warning for a test suite there, and adds the missing `package` stanza for `arrows-extra`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7770
GitOrigin-RevId: 5f5c3fb5d4852c88ed2e14a3fa83fe264aec895b
2023-02-02 19:53:13 +00:00
Daniel Harvey
e953efeb40 [ci] test the libraries in server/lib
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7758
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 311f6c4a5c629c18a55d75a5d5a74f826078e86d
2023-02-02 17:32:48 +00:00
Tom Harding
64f79daa3f Allow pg_run_sql as well as run_sql to remove some string-bodging
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7465
GitOrigin-RevId: 754866121fbd631273ae00a2305c8ddbba286596
2023-02-02 14:04:52 +00:00
Lyndon Maydwell
9a54849985 Fixing issues with SQLite FKs in Schema and Suggest Relationships API Docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7729
GitOrigin-RevId: 4ae48019ce71f6ceb3f6d06524302bdd11ca1ed4
2023-02-02 11:37:32 +00:00
Philip Lykke Carlsen
69ae616ae5 Bump autodocodec to 0.2.0.3, ditch Data.Voidable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7753
GitOrigin-RevId: c5dce6cf125b6bc53fd5ac7b689d1ed71fd6257b
2023-02-02 10:54:59 +00:00
Samir Talwar
5dbca897c6 api-tests: If a GET request fails with the wrong status code, print the response.
It's pretty frustrating to see an error in CI and not know the actual cause, because we just dropped the information.

This adds the actual status code and body to the error message.

Previously, `getWithStatus` was only used by the `healthCheck'` function. This also refactors `get_` to use the same function, so we don't have to duplicate the error-handling logic.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7752
GitOrigin-RevId: 474e4c02ad6c5b676abc311b90b21998b4a93d94
2023-02-02 09:18:27 +00:00
Daniel Chambers
67bc017cf3 Gardening: Enable and fix warnings in dc-api package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7765
GitOrigin-RevId: 7dd6b1c065cc68ab413736ca49e5957a7697566b
2023-02-02 05:48:25 +00:00
Daniel Chambers
b012f2ebc7 Use Dataset Clones for all SQLite tests
[GDC-718]: https://hasurahq.atlassian.net/browse/GDC-718?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7743
GitOrigin-RevId: 6c3577c1d4ffd2212a72b6e1a24e0e384f2db046
2023-02-02 04:27:57 +00:00
Antoine Leblanc
1fe7fe43b8 Fix all warnings in internal libraries and enable -WError everywhere
### Description

This PR:
- fixes the package names in dev-sh.project.local (the config was using the names of the folders, not the names of the packages)
- adds similar options to CI: we also want to build with CI and in parallel there
- fixes all warnings

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7761
GitOrigin-RevId: ef1d78db8c94f5e74c18443aa517544f6a6f5a10
2023-02-01 23:32:19 +00:00
Antoine Leblanc
30e772d3fa add content-length header.
## Description

Adds a content-length response header to all endpoints. This PR tests this feature by checking the content-length of every request we send in the tests.

## Changelog ✍️

__Component__ : server

__Type__: enhancement

__Product__: community-edition

### Short Changelog

add a content-length response header to all endpoints

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7444
Co-authored-by: Manas Agarwal <5352361+manasag@users.noreply.github.com>
GitOrigin-RevId: a0a811852053c5dde4b11b71ba11a7d456c84d76
2023-02-01 21:32:50 +00:00
Tom Harding
a425c97e1e Remove redundant Backend constraints
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7757
GitOrigin-RevId: b5bc017b0ee3a9daeca78437278525be17a33f4f
2023-02-01 19:48:21 +00:00
Tom Harding
e41654b133 Reject MonadUnique, embrace IO
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7751
GitOrigin-RevId: 3edc4dee10d58afac911c9862e3b55a4c458a293
2023-02-01 18:57:46 +00:00
Samir Talwar
ac985c2235 server/api-tests: Move tests that test errors into their own directory.
Named "Test.Queries.Errors".

This also sorts the test list in _api-tests.cabal_.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7755
GitOrigin-RevId: 3b015a50e6de54c6573444b460b7977897f59738
2023-02-01 16:19:52 +00:00
Daniel Harvey
52317930fe Fix make ghcid-api-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7738
GitOrigin-RevId: 1576bfb51b20cdc8a67924533e4da03ec2f1f3af
2023-02-01 12:34:59 +00:00
Tom Harding
18b346bf44 Extract Hasura.Incremental into lib/hasura-incremental
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7534
GitOrigin-RevId: 85863cee836d348e8e314f8af1b50bb5cd912b46
2023-02-01 12:25:33 +00:00
Daniel Harvey
4418d294f9 [server] parse native query in metadata call
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7731
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 96d60c72da05970f5b34f310f9fe71d9f67387a1
2023-02-01 08:46:19 +00:00
Auke Booij
a5325d6aea server: fix cabal files; apply ghc warnings more strictly
- In a previous PR we made more use of `common` stanzas, but these require `cabal-version: 2.2` (so some of those stanzas were not functional before this PR). This just bumps the `cabal-version`s straight to 3.6, which is the latest version we support in CI, where we build with cabal 3.6.
- This `cabal-version` upgrade required fixing a few `license` fields, from `BSD3` to `BSD-3-Clause`. I've also added `default-language` fields where appropriate, although this is perhaps optional.
- Using cabal's [syntax for applying options to all _local_ packages](https://cabal.readthedocs.io/en/3.8/cabal-project.html#package-configuration-options), we unify the cabal configuration, and apply `-Werror` to all local packages, which wasn't the case until now.
- Applying `-Werror` to all local packages required a few additional exceptions to the warnings that were switched on in hasura/graphql-engine-mono#7614.
- Deleted SCM links to the original pool library.

Overall, the effect of this PR is:
- more warnings
- stricter compilation
- ~~less cabal configuration~~

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7730
GitOrigin-RevId: 592e9e46d103bcc8726df5b745306bd9f77f7efc
2023-01-31 18:25:42 +00:00
Karthikeyan Chinnakonda
0406cd2ef0 server: refactor the clear_metadata and the replace_metadata API handler
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7631
GitOrigin-RevId: 69a05f175f7fda1ed6a2dfb311b3f331b209a5aa
2023-01-31 17:41:09 +00:00
Daniel Harvey
17dbc7bc32 [server] parser for interpolated SQL queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7726
GitOrigin-RevId: 4b6ad28aa8a4d75bfcf6ce1ec4d89324f7f1ae74
2023-01-31 12:54:11 +00:00
Gil Mizrahi
cabb6ada1c naqi arguments field is optional
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7712
GitOrigin-RevId: c45a94c16fd9b7b0f3d40085949c4571ac31ca09
2023-01-31 10:55:02 +00:00
Auke Booij
cdd0ea7236 server: improve phrasing for "conflicting type definitions" error
Typo (repeated "the the"). Also emphasize that this is about GraphQL types.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7553
GitOrigin-RevId: 60a75a11c66d470217d132df5be50e49c87dee7f
2023-01-31 09:07:03 +00:00
Solomon
59a1fc2102 Re-enable Optimizations in Hasura.Server.Init Module
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5306
GitOrigin-RevId: 8ae8184abbaabc06a25c4977f19f2fd19cf12bf4
2023-01-31 00:28:58 +00:00
Gil Mizrahi
e7d5b989ab add omit_request_id flag
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7697
GitOrigin-RevId: 6716b263526fd97609f33cd78ec254a24c14b679
2023-01-31 00:28:50 +00:00
Philip Lykke Carlsen
70c8bc8700 Integrating Native Query metadata and schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7657
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: d5047559e3560f5d7870eac6e07c89704146ccab
2023-01-30 16:06:34 +00:00
Vishnu Bharathi
54d5039180 ci: tag release v2.18.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7709
GitOrigin-RevId: 7a8397078d0d65f416214cff9c508c9ea0627ea0
2023-01-30 13:45:59 +00:00
Samir Talwar
3c470211fc test-harness: Use the default PostgreSQL port if none is specified.
This means we don't need to include the port in the connection string.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7683
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 3f6fb3fe4cb246a2fc593a2aea3820cf2c0e0e2c
2023-01-30 12:49:55 +00:00
Auke Booij
c36c085016 server: enable all the warnings (that we can)
See [Enable all the warnings](https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3). This PR follows that approach, except that it re-disables those warnings that would prevent a successful build.

There are some newer warning flags that older GHC versions don't recognize. So this also updates some of our CI routines to the GHC version that we're currently using for `graphql-engine` itself, namely 9.2.5. I don't see a reason to keep testing those libraries against older GHC versions.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7614
GitOrigin-RevId: d48a6db09dab29616e273549d0045f98ecb4586f
2023-01-30 11:24:49 +00:00
Daniel Chambers
0abfc97df7 Implemented datasets support in Data Connector agent test suite
[GDC-718]: https://hasurahq.atlassian.net/browse/GDC-718?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7654
GitOrigin-RevId: 1d036cd39f717fce1ce0176103e40a1309ded3af
2023-01-30 07:00:26 +00:00
Rakesh Emmadi
ab99215828 server: log when events of scheduled & event triggers are fetched from database for delivery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7651
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 3149dae41c6a8a16caa1d44fbc0606451d6d2cfa
2023-01-30 06:08:08 +00:00
Solomon
7842bc34ee Refactor/move namingcase default into arg merging
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5289
GitOrigin-RevId: 39c5a5b839534dc5416d62ca20c5051ae4d8ef57
2023-01-30 05:00:54 +00:00
Jesse Hallett
b5e6f48d99 server: codecs for query collections
This is the complete set of codecs to cover the top-level `query_collections` field of `Metadata`.

Ticket: https://hasurahq.atlassian.net/browse/GDC-523

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7351
GitOrigin-RevId: 7a1a46e5006e1c5e25fba6ea4775270c70bc2785
2023-01-28 00:07:20 +00:00
Antoine Leblanc
503fc6d7ae Fix libs' test config.
### Description

This fixes the libs' test config: without that line, hspec fails to run at build time. I haven't tried actually running the tests now that they build, fwiw.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7694
GitOrigin-RevId: 03d7bc969c4bd195e84080d50f1f6441a1d8d50f
2023-01-27 16:32:45 +00:00
Daniel Harvey
4b0c737f0b [server] re-add native sql output
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7692
GitOrigin-RevId: c4e8d6ff2defe6c0ecd96a7233636fe0ebae1a85
2023-01-27 14:38:07 +00:00
Samir Talwar
cf3da2cec7 test-harness: Remove unnecessary indentation in runApp.
Not sure why there was so much nesting, but I did not like it.

Just a bit of cleanup while I was nosing around.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7684
GitOrigin-RevId: a17c94561fe1688d35a51afa5dfda37a7ea35d25
2023-01-27 11:15:11 +00:00
Daniel Harvey
4c20c46bdd [server]: revert native sql output
Reverts hasura/graphql-engine-mono#7617 whilst we look at server upgrade / downgrade tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7690
GitOrigin-RevId: e6e48f1bd90a8db36f372bf9f09c26e43d123ce5
2023-01-27 10:05:16 +00:00
Vishnu Bharathi
e20925850f ci: tag release v2.17.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7688
GitOrigin-RevId: 247e9b8e4299114064497be429f62aecbb20e747
2023-01-27 09:00:09 +00:00
Daniel Harvey
b80113912c server: generate native access sql
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7617
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 48e0ccdda50a09bcbad1a86b7015a02f883889ab
2023-01-26 18:02:44 +00:00
Daniel Harvey
ab9c56b343 [server] allow feature flags to be overwritten by env vars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7659
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 2a64ff09118aa0b5cbf494c45e4b178de366236b
2023-01-26 09:41:39 +00:00
Abby Sassel
221af57e53 server: add troubleshooting advice for make test-sqlserver failure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7663
GitOrigin-RevId: dfdfbcc0d36e67b6cb3b3b859d03c87f1153a980
2023-01-25 17:02:31 +00:00
Nicolas Beaussart
2c3d91b033 frontend: switch cli and server to use the new nx assets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7533
GitOrigin-RevId: 8adde90a90115c2782dc77b9f30297499f22acab
2023-01-25 12:07:01 +00:00
Rakesh Emmadi
f2a5d7cef3 server/pro/multitenant: Postgres connection routing using kriti templates
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6822
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Sooraj <8408875+soorajshankar@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 61cfc00a97de88df1ede3f26829a0d78ec9c0bc5
2023-01-25 07:14:31 +00:00
Solomon
6c7882aa3e GDC Snowflake Integration Tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7528
GitOrigin-RevId: f90ee61899349735dc2fc0fbe6ed499614630a0f
2023-01-25 05:54:31 +00:00
awjchen
12fdac004f server: fix tracing bug where some errors prevent spans from being emitted
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7450
GitOrigin-RevId: 23f6c9cfea8e7ca64b39866d15d2e6187aaaa0d9
2023-01-25 03:38:21 +00:00
Lyndon Maydwell
615fd64c04 Add constraint_name key to *_suggest_relationships Metadata API and increase sensitivity of tables argument
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7625
GitOrigin-RevId: d764f1664b63abbe4a4ff166e0bc7224bcb0dc57
2023-01-24 10:27:35 +00:00
Daniel Chambers
b3a4855fbb Data Connectors Delete Mutations Support [GDC-714]
[GDC-714]: https://hasurahq.atlassian.net/browse/GDC-714?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7623
GitOrigin-RevId: 676682343bc9aa54e1ed6553ebdf39756cfd7b5d
2023-01-24 04:18:47 +00:00
Abby Sassel
85cda65261 server: introduce Native Query Interface prototype feature flag
[NDAT-490]: https://hasurahq.atlassian.net/browse/NDAT-490?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[NDAT-491]: https://hasurahq.atlassian.net/browse/NDAT-491?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[NDAT-468]: https://hasurahq.atlassian.net/browse/NDAT-468?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7487
Co-authored-by: Solomon <24038+solomon-b@users.noreply.github.com>
GitOrigin-RevId: ba679fc69df4b669fc7936cd359b8268e8e1a23a
2023-01-23 13:37:13 +00:00
Daniel Chambers
0b35798fa7 Fix get_source_tables integration data connector config transformation test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7605
GitOrigin-RevId: 02b33784375888854c3f663c3cf0a84b049682a6
2023-01-23 01:06:56 +00:00
awjchen
cc5ee8474a server: always validate the open telemetry metadata configuration
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7446
GitOrigin-RevId: a66bcf654f3b973da0ab1a6f4b956446cd7a10d0
2023-01-22 03:42:20 +00:00
Auke Booij
83ea4a254d server: plumb StoredIntrospection while building the Schema Cache
We'd like to be able to build a Schema Cache from only serializable data. We already have Metadata. The data that's missing to build a Schema Cache is referred to as "stored introspection", and this includes:
- DB introspection
- User-defined enum values (i.e. contents of specific DB tables)
- Remote schema introspection

This PR introduces a new `StoredIntrospection` container that holds that data, and plumbs it through to the right parts of the schema cache building process, so that stored introspection can be used as a substitute for fresh introspection requests against live data sources.

The serialization of `StoredIntrospection` is intended to be straightforward: just take the serialized source introspection results, and put them in an appropriate JSON object. Though I don't think that this PR achieves that entirely.

In order for `StoredIntrospection` to be deserializable (through `aeson` instances), while keeping the required code changes low, this piggy-backs off of the `ResolvedSource` data type. `ResolvedSource` is _almost_ exactly what we want, and _almost_ deserializable, so this PR brings it across the finish line by moving a few things out of that type, and adding a `FromJSON (RawFunctionInfo b)` context to the `Backend` type class.

[PLAT-270]: https://hasurahq.atlassian.net/browse/PLAT-270?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[PLAT-270]: https://hasurahq.atlassian.net/browse/PLAT-270?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[PLAT-276]: https://hasurahq.atlassian.net/browse/PLAT-276?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[PLAT-276]: https://hasurahq.atlassian.net/browse/PLAT-276?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7053
GitOrigin-RevId: 5001b4ea086195cb5e65886747eac2a0a657b64c
2023-01-20 14:52:36 +00:00
pranshi06
ae5f3fe593 server: fix next_retry_at for MSSQL event triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7376
Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com>
GitOrigin-RevId: 3a287271320fbb489dbabcd163b1b474fa5132b6
2023-01-20 11:16:30 +00:00
Daniel Harvey
0270dbf4b4 [server/tests] use fresh HGE for stringify numeric types tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7582
GitOrigin-RevId: 7c7832d322024b01987f1568a87793a7c0a969db
2023-01-20 10:40:01 +00:00
Daniel Chambers
d6cbbe3e49 Data Connectors update mutations support [GDC-713]
[GDC-713]: https://hasurahq.atlassian.net/browse/GDC-713?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7604
GitOrigin-RevId: e0d496b425bed48f2d53a66584f4c7ecd40b485e
2023-01-20 06:17:59 +00:00
Rikin Kachhia
ded69b361e server: serve local console assets even if console is disabled
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7568
GitOrigin-RevId: ef1548c80280f91aabd94075b658de7d04b8b7a3
2023-01-19 20:08:44 +00:00
Philip Lykke Carlsen
cd5186be90 Implement Schema Parsers for Native Query Interface
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7574
GitOrigin-RevId: 0cb4638a7dd79abf6ccb05092c0c663c84675bbd
2023-01-19 11:27:24 +00:00
Daniel Harvey
0dfeea2c5a [server/tests] de-dupe Postgres harness code
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7581
GitOrigin-RevId: 09f83190e0095d471d7aca6025c43026270d7b58
2023-01-19 10:09:30 +00:00
Lyndon Maydwell
f1328393b9 Return availability information with agents in list_source_kinds API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7564
GitOrigin-RevId: f05400faab4a261a2992bb4baef39e209db49edb
2023-01-19 05:20:31 +00:00
Daniel Chambers
354f7593d9 Custom update column operator support for Data Connectors [GDC-688]
[GDC-688]: https://hasurahq.atlassian.net/browse/GDC-688?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7548
GitOrigin-RevId: 861638d6cc69803776640b50ffe1646b3cf0a7db
2023-01-19 04:22:58 +00:00
Daniel Harvey
40bcd5545b [server/tests] make useHge work with Fixtures
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7560
GitOrigin-RevId: 370e5b3ee4d508e7ca5eea426886bf6c82d0cde9
2023-01-18 15:53:01 +00:00
Vishnu Bharathi
6133f1c1da ci: tag release v2.17.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7567
GitOrigin-RevId: b3eaf2fc506fb1b1bbb06c3a829915d56b47409f
2023-01-18 07:59:39 +00:00
Daniel Chambers
c104ffdb51 Fix SQLite agent including built-in comparison operators as custom operators
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7565
GitOrigin-RevId: 83a8868a80a124aee05b8dd42a4ffa15489891ae
2023-01-18 07:36:00 +00:00
Daniel Harvey
611bd0363f [server] make Custom SQL metadata commands admin-only
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7549
GitOrigin-RevId: a87f4e083b3e3dfeb51fd6e1fbb3158fb4ac2edf
2023-01-17 16:09:58 +00:00
Anon Ray
139aca3a25 server: add kind field to livequery-poller-log (GS-329)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7394
GitOrigin-RevId: 34663eb7c0c312b735c77e1855de32dd3a3fba5f
2023-01-17 13:55:16 +00:00
Tom Harding
9052208b6c Add a "roles and permissions" deep dive
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7467
GitOrigin-RevId: 915a963d3a237a7f95bed757e3cc5a5bf6c8134b
2023-01-17 09:41:36 +00:00
Daniel Chambers
308d310d62 Refactor Mock Data Connector Agent Integration Tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7531
GitOrigin-RevId: b5111a46ba42c22b110a021b8d0404b114edaba7
2023-01-17 06:44:48 +00:00
Lyndon Maydwell
8d6b9f70f1 Datasets implementation for dataconnectors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7502
GitOrigin-RevId: 7ca9a16aa2b27f4efb1263c6415e5a718ca8ced8
2023-01-17 05:49:10 +00:00
Daniel Chambers
bfdeaf0334 Data Connectors insert mutations support [GDC-609]
[GDC-609]: https://hasurahq.atlassian.net/browse/GDC-609?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7513
GitOrigin-RevId: cb401e3ed84c5b60ec59b63dc478a1162b360135
2023-01-17 00:35:22 +00:00
Daniel Harvey
06b284cf33 [server] metadata API for native access
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7476
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 781c29666e92004dc82918c2292fdacc27fded4c
2023-01-16 17:21:22 +00:00
Samir Talwar
4175b53395 server/api-tests: Add a Docker Compose file for the API tests.
We were previously using the Docker Compose file in the root directory
for manual testing _and_ the server API tests.

This splits them so we can e.g. add Yugabyte for easy manual testing.

In the future, this will also allow us to use ephemeral ports for API
test databases, while keeping the fixed ports for manual testing.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7524
GitOrigin-RevId: 7244e296b0ed0ace9782b6f44f321933a9d9a49d
2023-01-16 16:44:10 +00:00
Jesse Hallett
d6a354b71d server: codec for SourceCustomization
Small PR with a few easy codecs

Ticket: https://hasurahq.atlassian.net/browse/GDC-585

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7325
GitOrigin-RevId: 2495ad1a17e86625ac037a681beebb99f377eb03
2023-01-12 20:57:20 +00:00
Solomon
f786101922 Gardening: Code cleanup around config transformations for dataconnector backends
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7481
GitOrigin-RevId: d1605b8a03e65cd16fc98aa4bc046c0b21b370cc
2023-01-11 23:13:26 +00:00
David Overton
a9f77acb32 Remove builtin scalar types from Data Connector backend
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7167
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 926e7282b908e3a9669ac39d625aa54971e11c37
2023-01-11 02:37:26 +00:00
Gil Mizrahi
7393c152e3 add a temporary static flag for pqnp
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7485
GitOrigin-RevId: 482b0f11f21acb67c9fa95a93b88ac2e45df9430
2023-01-10 13:00:32 +00:00
Naveen Naidu
99fb6ac22f server/mssql: fix handling of special language characters in event trigger payload
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7448
GitOrigin-RevId: d87357fe2a54d755c893938db5fb6193316b0b79
2023-01-10 08:50:52 +00:00
ananya-2410
cccc0dc309 ci: update catalog version for v2.17.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7483
GitOrigin-RevId: af9a79e69a7a679ee4eea0756e58ec770bf7d7df
2023-01-10 07:28:40 +00:00
Daniel Chambers
57607f5295 Refactor Update IR to generalize Update vs Update Many across backends - compositional approach [GDC-687]
[GDC-687]: https://hasurahq.atlassian.net/browse/GDC-687?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[GDC-687]: https://hasurahq.atlassian.net/browse/GDC-687?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7355
GitOrigin-RevId: fa02a83c0c594abe05c1071d0de5054478c32e56
2023-01-10 01:56:14 +00:00
Auke Booij
d96203f602 server: bring graphql-parser-hs GHC options in line with main code
This is mainly about removing `StandaloneKindSignatures`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7428
GitOrigin-RevId: 9b28c9b119f50c49a1b5c48391d537f1575700b4
2023-01-09 15:31:20 +00:00