Commit Graph

4813 Commits

Author SHA1 Message Date
Samir Talwar
b856d96989 server/tests-py: Factor out service URLs as environment variables.
Making it easier to inject different ones later.

I also included a change to _.prettierignore_ so Visual Studio Code doesn't keep trying to reformat the JavaScript or YAML files in `server/tests-py`, as it can cause diffs to balloon for no obvious benefit.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5456
GitOrigin-RevId: bc6d548708160a328e1e61a00e19be8e124da025
2022-08-15 14:59:05 +00:00
Samir Talwar
a0176c215f server/tests-py: Set up postgis extensions using a fixture.
Let's put it in one place.

This is a precursor to moving database provisioning into the Python
integration tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5453
GitOrigin-RevId: 5920b0b1177d94496485fcb4e178b946534ee4eb
2022-08-15 14:30:42 +00:00
Daniel Harvey
57025ef3b3 tests: Rename DoNotTruncateSessionVariables regression test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5485
GitOrigin-RevId: 4e29e05516e716958febcee03f21862944d5dd88
2022-08-15 13:58:14 +00:00
Samir Talwar
a4c3fb3ff0 server/tests-py: A little bit of tidying up.
Small, benign changes, extracted from #5449. Very boring.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5450
GitOrigin-RevId: f6da8bc9770b47471079518d599eef0cb4d203c1
2022-08-15 13:16:39 +00:00
Samir Talwar
061b2be9f1 server/tests-py: Fail fast and log more when HTTP requests hang.
`requests` does not set a default timeout, so tests can hang forever if you get something wrong.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5457
GitOrigin-RevId: 379d97705d6b52b019213cd46f92f3892dc8a46b
2022-08-15 12:40:17 +00:00
Tom Harding
147927e060 Mark RequestHeadersSpec explicitly as a regression test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5364
GitOrigin-RevId: cef9a8c5c59e428c5c9b08af3a10b9f7012fa7cf
2022-08-15 11:38:16 +00:00
awjchen
1a4e3ae001 server: add event trigger metrics for Prometheus
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5346
GitOrigin-RevId: 0db925f85e06e99b636995887c0e19a49fe9be2d
2022-08-15 05:34:04 +00:00
Gil Mizrahi
e626d87a3c server/postgres: Long identifiers in insert with parameters
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5466
Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com>
GitOrigin-RevId: dbc028529081de6257cc24acd1a5bfde8b39d057
2022-08-12 00:27:31 +00:00
Philip Lykke Carlsen
6fe8b42798 Simplify instance boilerplate
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5412
GitOrigin-RevId: 19755ee2502758616d67ce42df7295424b61b6cf
2022-08-11 16:32:41 +00:00
Abby Sassel
26bbe2be34 server/tests: bigquery scalar type tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5405
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: fc0a509500068331f9d80d58b411f144e011f094
2022-08-11 15:37:07 +00:00
Gil Mizrahi
0922a3bb24 server/tests-hspec: delete Context and using NonEmpty for Fixtures
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5451
GitOrigin-RevId: 8847af09a83293c619326d22209289397911bc5a
2022-08-11 15:04:11 +00:00
Auke Booij
a96e0c33cd Refactor EncJSON: fewer footguns, better syntax
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5408
GitOrigin-RevId: 077afebc09e6aed6f201d5ed686d6f6e7050bf24
2022-08-11 14:19:29 +00:00
Sean Park-Ross
a94ae64e35 Docs: Add admin secret info to authentication, queries, mutations, subscriptions section
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5396
GitOrigin-RevId: 05f6a8156ba5dc5e23edd4b9df71c08e929f38ca
2022-08-11 13:11:48 +00:00
Nicolas Beaussart
6c88b96b21 platform(console): prepare oss codebase for migration
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5445
GitOrigin-RevId: a659d1f82d73466e2d8ffeb6a32e6586f066d352
2022-08-11 13:06:54 +00:00
Auke Booij
4d5ee4c17e Inline a whole bunch of nothing for BackendSchema
This makes it easier to refactor `BackendSchema`, because if the type of a type class method is changed, it's easier to update the corresponding dummy implementations.

Partially addresses hasura/graphql-engine-mono#2971, in the sense that this aids refactors.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5443
GitOrigin-RevId: 65e169d01415a04e7c419a628cf32e743448543d
2022-08-11 11:58:40 +00:00
Daniel Harvey
c41fbfbb49 tests: tests-hspec docs to use Fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5448
GitOrigin-RevId: 87b54feaef9dcf1139d64e85303797a9a273bda3
2022-08-11 11:02:02 +00:00
Evie Ciobanu
80cbf3ae33 server/nada: add unit test infrastructure for Postgres delete SQL generation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5434
GitOrigin-RevId: 839a45a1469272def9d28c0f3e7454a5bf506f35
2022-08-11 10:46:49 +00:00
Daniel Harvey
99509da1f2 tests: convert EventTrigger hspec tests to use Fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5432
GitOrigin-RevId: 402aa785255333bc90b6df6a398eefb09611dee0
2022-08-11 10:12:56 +00:00
Auke Booij
8888e06bbb Spell out the TH in Hasura.SQL.{Tag,AnyBackend}
The module `Hasura.SQL.AnyBackend` was introduced (in #751) to centralize the logic for case-switching behavior that depends on the particular flavor of relational DB backend (Postgres vs MSSQL vs BigQuery vs MySQL vs DataConnectors). This allows us to write a bunch of code in a backend-agnostic way, even if runtime behavior does depend on the chosen backend. At the same time, it allows us to write backend-specific code without having to care (too much) about the existence of other backends.

In #851 this module was rewritten to use Template Haskell.

I've heard that one of the reasons for the use of TH was that this would make it easier to keep backends out of the compilation product entirely. This would allow customers, especially on OSS, to benefit from simpler software licensing.

However:
1. This conditional compilation never materialized.
2. It's not clear whether writing this particular module based on TH would be sufficient for conditional compilation. And in any case, it can be done using CPP pragmas as well.
3. The TH code is extraordinarily complex. Since its introduction, it has been documented extraordinarily well, but it's still very difficult to maintain and/or refactor, due to its non-idiomatic nature.
4. Hasura's company objectives are now Cloud-oriented, so that software licensing issues work differently, and in particular, do not depend on what's part of the compilation product.

So this PR reverts on #851 by spelling out the code generated by TH. This is a net-negative diff size. IOW we used to generate less code than the size of the code doing the generating. This makes the code readable and maintainable.

The generated code has been modified in one way, which I'll now describe.

In the scenario that support for a new backend is introduced, a constructor is added to the `BackendType` type. This would then cause `liftTag` to be partial, thus raising a compiler warning. Resolving this requires adding corresponding constructors to the `BackendTag` and `AnyBackend` types. This would then require amending **almost** all other methods.

The exceptions are `composeAnyBackend` and `unpackAnyBackend`. These methods test whether two values are compatible, i.e. belong to the same backend. Both have a default case that in one way or another ignores the input values. Using TH here ensures that all values that belong together are caught. But after spelling out the TH, the presence of the default case means that no compiler warning is thrown for a missing match of matching values. So in the default case, we now do an explicit check for equality. If there _is_ an equality, that means that there is a missing `case`. So this is reported as an `error` (which is very crude, but it should be).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5333
GitOrigin-RevId: 5aaf0a93394bd740aa7371526d3175c8142b3541
2022-08-11 09:11:07 +00:00
Luca Restagno
fe88cfed3d console: removed beta label from BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5442
GitOrigin-RevId: 27e72fba777b5baeccef7f666d579c8a81882e11
2022-08-11 08:39:26 +00:00
Antoine Leblanc
3b7cfcd10a move strictness where it is needed
### Description

This PR moves some strictness annotations to a concrete use site, rather than putting `seq` in an helper function.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5436
GitOrigin-RevId: 1f279e05333ab80167ad2e18d09b8792eddc52c3
2022-08-11 07:53:44 +00:00
Gil Mizrahi
51ceff71f7 server/tests-hspec: port Context to Fixture - DisableRootFields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5430
GitOrigin-RevId: f31a692c0f2ac4dd6c88b2c60c9aeb26d6f5bfae
2022-08-11 07:25:39 +00:00
Vijay Prasanna
c3545f7a89 fix(console): warnings for un-exported actions in TableReducer
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5437
GitOrigin-RevId: 7eedfd8450660d20ada2ac238a5557b41c3decb9
2022-08-11 05:33:54 +00:00
Daniel Chambers
4d9aa3a78d Fix SQLite Agent port conflict with Data Connector mock agent
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5440
GitOrigin-RevId: 1872c9021d641407abc8ce2a9e8693dbcf1adb1e
2022-08-11 03:22:32 +00:00
Solomon
7ae2a491ec Gardening: Cleanup Metadata Types Module
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5416
GitOrigin-RevId: 1d2d29da825942f9a0a472d034e68f0eb09a5c26
2022-08-10 23:19:25 +00:00
Gil Mizrahi
c08bb5377f server/tests-hspec: porting more tests to fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5404
GitOrigin-RevId: 0be4f50b17765a8f0b1fb37944777ead7ec6bfc9
2022-08-10 20:38:39 +00:00
Solomon
3855efa9a5 Move soEventsHttpPoolSize and soEventsFetchInterval defaulting into arg parser
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5284
GitOrigin-RevId: f2302b3219f3aa9ebde623b4efa7f3ee8a97c031
2022-08-10 19:18:11 +00:00
Daniel Harvey
2bdc54ebb4 tests: convert RemoteRelationships hspec tests to use Fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5424
GitOrigin-RevId: 0b23ba62aa0e2d279d8238aecd6c84ef8994097e
2022-08-10 16:45:19 +00:00
Daniel Harvey
548edcc6e6 tests: convert InsertDefaults Context test to Fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5382
GitOrigin-RevId: 3964dda7307bde6e294be36791a76c8e459afa25
2022-08-10 16:16:49 +00:00
Sooraj
712e3aeddd console: support extensions_schema on postgres connect/edit DB form
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5422
GitOrigin-RevId: c88e84530ca40f788b2f47cba4f6282f6a5ca6ff
2022-08-10 14:46:36 +00:00
Vishnu Bharathi
a785c664e5 ci: tag release v2.10.0 and v2.11.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5423
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: c0513156c9527f58bab86e8a67435e7be6ee035d
2022-08-10 13:54:03 +00:00
Stefano Magni
e8cb480b13 test(platform): Add a script to automatically export the E2E test request and responses
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5386
GitOrigin-RevId: 5458dadc7a23f82a1b344fcd19d8c431d6bd8c78
2022-08-10 13:44:37 +00:00
Gil Mizrahi
d5936a0a9b server/tests-hspec: port Context to Fixture - permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5420
GitOrigin-RevId: aaf785b05bf54d8996c3f3c5148dd6c52e6aea5c
2022-08-10 13:09:07 +00:00
Varun Choudhary
be3196432a Console: deprecate _ne from the permissions builder
closes: [#6253](https://github.com/hasura/graphql-engine/issues/6253)

Description:

[rikinsk] removed the option to select _ne from the dropdown while ensuring existing permissions with _ne are still rendered properly

Test:

- [ ]  the `_ne` operator is not showed as an option while creating a permission rule
- [ ] if a permission rule already has `_ne` in it, the permission builder renders it properly

Effected component:

- [x] Console

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/265
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 8c07425aefc5bc0897831e36f429c31c4c87fd2d
2022-08-10 10:27:32 +00:00
Karthikeyan Chinnakonda
f3dd172821 server: accept extensions_schema while adding a source
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5401
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
GitOrigin-RevId: 75b68c439fc68662a8e312f84132126d761dda48
2022-08-10 09:42:09 +00:00
Evie Ciobanu
8cb490d7d4 docs: add docs for multiple updates
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5400
GitOrigin-RevId: b5ec4850025e1a2ed2a76e9d56f1956ed3a27dbb
2022-08-10 08:54:42 +00:00
Matt Hardman
4a792a2054 refactor (console/gdc): clean up the connect DB components + hooks
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5390
GitOrigin-RevId: 7f1f13ca4453c7c436880494576d916403ed974f
2022-08-10 08:24:27 +00:00
Daniel Harvey
7bb5c2760a tests: convert DataConnector hspec tests from Context -> Fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5388
GitOrigin-RevId: d645b360cd6f471c4bcaa18842cb2de2dc7a04d8
2022-08-10 07:54:26 +00:00
Lyndon Maydwell
4b86dfa4ad Adding metrics endpoint to SQLite Data Connector Agent
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5418
GitOrigin-RevId: 28f3b3e14f610ca6b880711d03cf01486413d5ab
2022-08-10 06:38:07 +00:00
Gil Mizrahi
e1d0fbe0ff Fix querying multicolumn relationship in bigquery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5407
GitOrigin-RevId: 21517278991a54a0f06231a10b36b7b69e352608
2022-08-09 18:40:39 +00:00
Rob Dominguez
f132524fed docs: update heroku admonition to link to gh issue
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5398
GitOrigin-RevId: 03f29984071631538a0b005c4503b315c8ab33ed
2022-08-09 12:32:17 +00:00
Divi
ddbfcf5aa3 ci: use pro image as base image for pro cli migration images
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5027
GitOrigin-RevId: 0e5aec72331e06e7a529f65814bb61f92c76e2a3
2022-08-09 12:11:30 +00:00
Karthikeyan Chinnakonda
66caae4a44 server: accept schema name as a target for the graphql-engine to install DB extensions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5362
GitOrigin-RevId: 5e246c3af3bdf2a7b5b2a66e2e09f40abcdfd9c9
2022-08-09 11:43:48 +00:00
Tom Harding
d26b16106f Migrate ViewsSpec to the new structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5337
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: c1056790b42039630d649c96ad7aa2aa5c691ecf
2022-08-09 11:16:30 +00:00
hasura-bot
08e5b815cb [security] Update Debian base image to debian:buster-20220711-slim
GITHUB_PR_NUMBER: 8737
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8737

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5302
Co-authored-by: Andrew Louis <996681+andrewlouis93@users.noreply.github.com>
GitOrigin-RevId: 4b1569ae8c543c49ccb0b6a283b4b20e3c9fe293
2022-08-09 10:45:25 +00:00
Daniel Harvey
f3aefc8418 tests: expose SchemaName from Harness.Test.Schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5389
GitOrigin-RevId: fae69b4f49068bd05d6799f62d56b58bcbb96d06
2022-08-09 09:34:56 +00:00
Luca Restagno
a7fb4b9853 console: upgrade tailwind css to the latest version 3.1.7 (CON-416)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5377
GitOrigin-RevId: 57c945fb6cbcc1998c492b4f1a7196ef05f4e23e
2022-08-09 09:05:29 +00:00
Daniel Harvey
bcd7c01161 tests: Convert more Context -> Fixture in hspec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5384
GitOrigin-RevId: 582583b1722bb9942eda96c6b418eff8a69921d5
2022-08-09 08:21:23 +00:00
Tom Harding
0460d7d6d1 Migrate CustomFieldNamesSpec to the new structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5323
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 612cb72edf61227d8315102cb22eaaa603405b86
2022-08-09 07:26:14 +00:00
Rob Dominguez
796a977950 docs: add admonition for heroku integration
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5387
GitOrigin-RevId: 8d33059dc828930bd91c57e8a6be36f3ae0b6bae
2022-08-08 18:42:34 +00:00