Commit Graph

168 Commits

Author SHA1 Message Date
Tom Harding
70f5b04ea2 Update InsertVarcharColumnSpec test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5353
GitOrigin-RevId: 74f6e0a9322aa8926a162f8cfaae112669003f0b
2022-08-08 12:21:21 +00:00
Tom Harding
59d5853a95 Move EnumSpec into the Schema directory
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5324
GitOrigin-RevId: 50aa48c1ef42ee73b76742ab934ab90c5153b855
2022-08-08 10:56:35 +00:00
Evie Ciobanu
72cfb7fc9b server/nada: test mkUpdateCTE
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5341
GitOrigin-RevId: 39db14cc2d2329d8cadb7a6080b1e2361eba1fb5
2022-08-05 21:42:19 +00:00
Tom Harding
a61741fbf5 Migrate the GatheringUniqueConstraintsSpec test to the new structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5350
GitOrigin-RevId: ae622a859af4c308daf1aacc2825657ec7f0f8ab
2022-08-05 12:22:57 +00:00
Puru Gupta
2ca81b37e8 multitenant: fix dubious config status updates during tenant start
## Description ✍️
This PR fixes the config status update when the `Service configured successfully` message is written before the server is actually spawned. Now the status is updated only when the server is spawned successfully. To be specific, this change posts the status closer to where we log `starting API server`.

### Related Issues ✍
#2751

### Solution and Design ✍
We update the status inside `runHGEServer` function. This helps in adding the message only when the server is started. If any exception is thrown before the server is spawned, only that message is written to `config_status` table instead of the `Service configured successfully` message.

## Affected components ✍️

-  Server

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5179
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: 7860008403aa0645583e26915f620b66a5bbc531
2022-08-05 11:51:13 +00:00
Daniel Harvey
6f5416db3e tests: move yaml expectations out of yaml quoter file
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5295
GitOrigin-RevId: 66239be3f2b7c83721af174dc72a1e0796211842
2022-08-05 09:36:03 +00:00
Solomon
07e4a49e5e Consolidate Arg/Env Parser Defaults and cleanup arg merging code
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5262
GitOrigin-RevId: 2501e44a8fe0a57b13141c307d2dd44b028052b6
2022-08-05 00:29:52 +00:00
Tom Harding
d8a4f2cf9b Update HelloWorldSpec to reflect the usual test structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5325
GitOrigin-RevId: 85b5aabcdf9fbca51d31eaa36e8a81dfac0a40d1
2022-08-04 14:34:28 +00:00
Daniel Chambers
c209b60239 server: Support the namespacing of table names in Data Connectors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5329
GitOrigin-RevId: 5cf492bc2b09fef6250f4dd50f74f750f55ebe6a
2022-08-04 08:35:52 +00:00
Tom Harding
bbafd0339c Add the HelloWorldSpec link back in the README
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5326
GitOrigin-RevId: 567c852117f5873f948c2cbbb7b62e467ceba171
2022-08-04 07:17:25 +00:00
Philip Lykke Carlsen
b658df1c43 Spike attempt at adding logging to the hspec test-suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4772
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 5c6c9056952574462d5b309774331a909a7eac6d
2022-08-03 14:19:53 +00:00
Tom Harding
c6ff297c71 Port the ColumnPresetsSpec test to the new structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5291
GitOrigin-RevId: 4106229cfd1c0d83df8d689b271e060fcbf9cc47
2022-08-03 09:14:50 +00:00
Gil Mizrahi
6dc1eab513 server/tests: Porting Context to Fixture - add custom options
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5270
GitOrigin-RevId: a0f2e401f681e5df0f6cbb6c138686537e3605ee
2022-08-02 18:02:43 +00:00
Tom Harding
4d478e78cf Migrate InsertEnumColumnSpec to the new structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5296
GitOrigin-RevId: 99e3f403a2b51cf0dfafbfb3330c931ca909ef9b
2022-08-02 16:25:50 +00:00
Daniel Harvey
4d74bb79ab tests: interpolateYaml quasiquoter for string interpolation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5162
GitOrigin-RevId: 5b4efb6fe2d8445eb9fad428c1fb0da6d0ac604c
2022-08-02 12:52:58 +00:00
Samir Talwar
349ccd3296 Use docker compose, not docker-compose.
Docker Compose is now a plugin for Docker, bundled by default in Docker Desktop and many Linux distribution packages. The standalone `docker-compose` binary has been deprecated since Docker Compose v2.

Using the new version directly allows us to write development scripts that do not require `docker-compose` to be installed.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5185
GitOrigin-RevId: c8542b8b2405d1aa32288991688c6fde4af96383
2022-08-02 10:30:57 +00:00
Gil Mizrahi
59d8bc66cc Update tests-hspec readme with m1 and docker compose troubleshooting
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5282
GitOrigin-RevId: 4d8c777a0ce06312485707da2cb77d01c3b6cd02
2022-08-02 08:53:03 +00:00
Daniel Chambers
731dff7558 server: Support min/max aggregates on string-type columns [GDW-206]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5264
GitOrigin-RevId: 6937e4936a2bb5c6cb8814da9ed4529fdfb6072a
2022-08-02 00:23:13 +00:00
Tom Harding
4d123987d6 Refactor the NestedRelationshipsSpec into the new structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5269
GitOrigin-RevId: 0c02d0d2c273b04403972eb3357b9ad8352a8f74
2022-08-01 15:46:28 +00:00
Tom Harding
08c47b7568 Move and refactor the Directives tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5267
GitOrigin-RevId: ec37b8bcea8f50b97fca4008dec7575929ed1841
2022-08-01 12:05:56 +00:00
Tom Harding
0494ef3f2b Remove SerializationSpec, move to BigQuery-specific tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5218
GitOrigin-RevId: 3e14e7cefb02d21aa1c938185043e3af428d5190
2022-07-28 10:18:59 +00:00
Tom Harding
3dc17c3f77 Remove PostgresTypesSpec, create Test.Postgres.TimestampSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5220
GitOrigin-RevId: eb892113ea1a9491c6cb793102ad5f56ae2713fb
2022-07-28 09:42:43 +00:00
Tom Harding
f7392a26e3 Move UpdateManySpec into Test.Mutations.MultiplePerRequest
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5206
GitOrigin-RevId: a3f1d37de38c40c2e08506ed30eb0a56ce3bb45e
2022-07-28 08:54:35 +00:00
Daniel Chambers
94ddf10df6 server: Remove multiple column count aggregate support from Data Connectors [GDW-207]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5224
GitOrigin-RevId: be62ad21ed60cf5c9fb05cda8454b99a0c024866
2022-07-28 07:25:23 +00:00
Daniel Chambers
ac4f3d8ed0 server: Aggregates support for Data Connectors [GDW-187]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5194
GitOrigin-RevId: f0f4f0974710af943b1e47d07d199a277156285d
2022-07-28 05:40:53 +00:00
Tom Harding
63cc498619 Move PrimaryKeySpec into the new test structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5182
GitOrigin-RevId: 26dafbf95ff6d2cf2f7d3e9d9eec2441f2ef02ce
2022-07-27 11:04:16 +00:00
Tom Harding
bd1fde3d8b Create and organise OffsetSpec, remove LimitOffsetSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5186
GitOrigin-RevId: 08687b3e77a6e8663cf0ec59e638aa917a334574
2022-07-27 09:46:55 +00:00
Tom Harding
04887f00de Remove Test.OrderingSpec, create Test.Queries.SortSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5188
GitOrigin-RevId: 8d5ca048a838a29991ca4b4425ce0439c60f94b1
2022-07-27 09:08:20 +00:00
Tom Harding
9a55b50d0e Remove the BasicFieldsSpec module, reorganise its contents
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5189
GitOrigin-RevId: f68baca8cc5c0b52135141191bbbee5771d791e1
2022-07-27 08:33:59 +00:00
Naveen Naidu
b69182f4fe server: delete hasura SQL triggers when tables are untracked
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5130
GitOrigin-RevId: c8bec0c5ac0eb9c576e86a218311b5c0503ee400
2022-07-27 07:58:11 +00:00
David Overton
a6dca587d2 Update autodocodec
Updates to the latest version of autodocodec and uses the new features, in particular `discriminatedUnionCodec`.
This allows us to remove the `ValueWrapper*` types and `sumTypeCodec`. Sum types are now encoded as discriminated unions.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5155
GitOrigin-RevId: 20bfdc12b28d35db354c4a149b9175fab0b2b7d2
2022-07-27 05:28:47 +00:00
Tom Harding
b1bf07db34 Absorb SelectSpec into ObjectQueriesSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5196
GitOrigin-RevId: ee1f2c53225904b63f3bd0c33aeecbdd5cb02f36
2022-07-26 14:18:58 +00:00
Tom Harding
307071840f Add the basic limit query
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5183
GitOrigin-RevId: 76e1f59c3e5212f69b4b13e431627cfff141a8b5
2022-07-26 13:32:16 +00:00
Tom Harding
5cca33611b Remove redundant test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5187
GitOrigin-RevId: 25d711ef42f431d3aa6874581580ce2dad53f3f1
2022-07-26 09:28:31 +00:00
Daniel Chambers
2b9c224170 server: Simplify FieldValue in Data Connector query responses for agents
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5149
GitOrigin-RevId: 4ed438fdd9887b0b4d23a98156e350deb3403465
2022-07-26 02:30:14 +00:00
Tom Harding
15fa2f7b56 Remove HelloWorldSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5178
GitOrigin-RevId: d8c48a01f452b632503ba7b90c9d549167e5c519
2022-07-25 18:07:08 +00:00
Samir Talwar
e1c7767d5e Run both integration test suites against PostgresSQL v14 with Postgis.
Let's be consistent about this.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5177
GitOrigin-RevId: 75a48452984a0762e52ee251a98f086f2ae1b150
2022-07-25 16:37:54 +00:00
Tom Harding
73d8d35df3 Add the Schema.TableRelationshipsSpec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5133
GitOrigin-RevId: 29b749ffc1e47f0d64cc6334bedb265b75fa7aa2
2022-07-25 14:52:42 +00:00
Tom Harding
7b2bb262b8 Add the Queries.SimpleSpec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5138
GitOrigin-RevId: 1328772e5262f4cd4d931bfb40103fe619d39f83
2022-07-25 13:34:47 +00:00
Abby Sassel
77b4b395ef server/bigquery: test row level permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5115
GitOrigin-RevId: 8fa2261cefc3d2932542be6b07499b47df74e9d1
2022-07-25 09:53:14 +00:00
awjchen
227e11d481 server: expose Prometheus metrics from Hasura Pro
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4972
GitOrigin-RevId: fadfcb0981cd9dfe0a316804ead87d7778ece1e9
2022-07-23 21:19:20 +00:00
Gil Mizrahi
ee15c804bc server/postgres: prefix identifiers longer than 63 characters with their md5 hash
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5080
GitOrigin-RevId: 58e5e6aab136617d1bbfc6621c89942da358b04d
2022-07-22 15:29:02 +00:00
Tom Harding
ca218706be Delete WhereSpec, add FilterSearchSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5151
GitOrigin-RevId: 97628540f82bcff7d7fe5acf54586df96acd78f4
2022-07-22 14:51:02 +00:00
Daniel Chambers
2df835624d server: Nodes field support in Data Connector aggregate queries [GDW-187]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5108
GitOrigin-RevId: 2d707abab0ae429e30be620225c4c419b960aa3f
2022-07-22 09:47:32 +00:00
paritosh-08
c562fd41a4 server: fix desc order_by for dataconnector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5144
GitOrigin-RevId: d17e765eaf8cda3630c6339b90aa90eeff5b5cea
2022-07-22 06:36:24 +00:00
Samir Talwar
aaf97834f3 server: Replace forkIO with async in the DC mock agent.
I got a flaky test run recently, in which some Data Connectors tests in
_tests-hspec_ failed. The failure was not very helpful, but the log
output contained this message:

> Network.Socket.bind: resource busy (Address already in use)

I _think_ this was caused by killing the Data Connectors mock agent
thread, but not waiting for the server to stop. `Async.cancel` should
handle this, as it waits for the thread to stop.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5121
GitOrigin-RevId: 3419dce2fc5ff52e3a6f2d452ea44dd85b326452
2022-07-21 04:57:27 +00:00
Daniel Chambers
c1380e1daf server: Data Connectors aggregation agent API contract [GDW-95]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5069
GitOrigin-RevId: acd80975c162935d5594e55db47228cf689e5fd7
2022-07-20 05:21:54 +00:00
Daniel Harvey
dd122217de tests: use GraphqlString class to interpolate variables in GraphQL quasiquoter
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5062
GitOrigin-RevId: a8fdad5bc87093b8117541dd39499065e2b4370f
2022-07-19 15:43:39 +00:00
Naveen Naidu
38a10bebb7 server: delete hasura SQL triggers when MSSQL source is dropped
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5060
GitOrigin-RevId: 377df03697d973cdaa643999b213697d7a368dee
2022-07-19 11:40:50 +00:00
Lyndon Maydwell
2107c70e17 Kriti Transform of the DataConnectors Configuration [GDW-144]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4996
GitOrigin-RevId: 26d367ab83df4b161f58133afab2788c6f0c9746
2022-07-19 01:52:50 +00:00