Commit Graph

4098 Commits

Author SHA1 Message Date
Robert
4cb6f96e22 haskell: remove outdated dependencies from cabal.project.freeze
Result of running `cabal freeze` locally and then removing the flags on local targets.

The context is that I keep seeing unintelligible diffs to `cabal.project.freeze` in PRs that add dependencies. The idea being that we should keep `cabal.project.freeze` in a state where `cabal freeze` (or whichever other way you're meant to update the freeze file) doesn't cause unrelated changes.

See https://github.com/hasura/graphql-engine-mono/issues/3545 for a follow-up ticket primarily aiming at documenting how we update the freeze file.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3538
GitOrigin-RevId: 45a5dadcdfe29d5c831807dc49f877a2380162fc
2022-02-03 15:35:38 +00:00
Solomon
9d78ba5ddd Fixes env var error reporting in Webhook Debug Endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3549
GitOrigin-RevId: c0b48735ea50bf3782bfdcab2a1eeaa582f0c3b6
2022-02-03 14:57:30 +00:00
Philip Lykke Carlsen
e1918adb52 Replace "identity column" with "column mutability" data for all backends
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3373
GitOrigin-RevId: bf08cc9008a4b0b3ece4952528c15c45e57fc74c
2022-02-03 14:15:35 +00:00
Antoine Leblanc
bd2fce3691 Stable sort of extracted notes
## Description

This PR updates the notes-extracting script, to allow for a stable sort across runs:
- files are now treated in alphabetical order of the full file name:
  - within a file, notes are treated in order
  - that order is reflected in the generated index file
- within a note, references are sorted by file, then by line number

Additionally it fixes(?) a note whose format was unexpected.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3352
GitOrigin-RevId: 2b2b57ec0aa2657d75a88e4951e6b19bb2d665e3
2022-02-03 13:33:09 +00:00
Divya Bhushan
53ba2baf1d docs: Capitalize URLs on the read replicas page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3562
GitOrigin-RevId: 654f1410c653009bfd606feebf6b44d252ed1dd9
2022-02-03 07:34:31 +00:00
Auke Booij
b4c56f26e1 Derive a few instances for PGMetadataStorageAppT
Use GHC's "deriving via" mechanism to obtain a few type class instances for free.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3382
GitOrigin-RevId: 43df1e2e3f770d07f8bc7101cc47b80fc7a34915
2022-02-02 17:26:27 +00:00
hasura-bot
8827ba360f docs: update caddy example to use v2 format in digital ocean guide
GITHUB_PR_NUMBER: 7948
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7948

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3169
Co-authored-by: Jeremy Moseley <4382100+jmoseley@users.noreply.github.com>
Co-authored-by: Divya Bhushan <11659160+divyabhushan@users.noreply.github.com>
GitOrigin-RevId: e223e63f3f3bae6358db4d0763cac18b94e903b2
2022-02-02 16:33:19 +00:00
Brandon Martin
b081c8d6f9 Update CHANGELOG with more info for next release
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3548
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: 14c8c95da51b97ea3417b3342582e63699baa457
2022-02-02 13:46:23 +00:00
Vishnu Bharathi
f4007596fb tag release v2.2.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3558
GitOrigin-RevId: b4ba6830be191aac6ce9e8e5bef974bd5322260d
2022-02-02 12:49:55 +00:00
Vijay Prasanna
94eedbe07f console: enable inherited roles by default
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3554
GitOrigin-RevId: 04db7ce07931d390b2c6e507b955c65399edae71
2022-02-02 10:13:39 +00:00
hasura-bot
569af7a1e5 docs: Updating port for using HTTPS in NGINX on Enable HTTPS page
GITHUB_PR_NUMBER: 7184
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7184

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1730
Co-authored-by: Arman ali <29430838+armanism24@users.noreply.github.com>
GitOrigin-RevId: bd0c524a60460cdc787c10191fc866f73f3602bd
2022-02-02 09:16:08 +00:00
Solomon
43ca77f120 Updates metadata api Event and Scheduled Trigger docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3547
GitOrigin-RevId: c9bd90bc7c6658f03cd9f1b2b5a4d690d48db7d7
2022-02-02 08:40:25 +00:00
hasura-bot
5e58e6df37 docs: Updating Caddyfile v2 config in Enable HTTPS file
GITHUB_PR_NUMBER: 6529
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6529

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/489
Co-authored-by: Francis Lavoie <2111701+francislavoie@users.noreply.github.com>
GitOrigin-RevId: 9bc3ff43fbaf0eda8c2cbb2c3dad46ce3a402938
2022-02-01 17:13:33 +00:00
hasura-bot
c25f02ff03 docs: edit the caddy file to exclude websocket on digital-ocean-one-click page
GITHUB_PR_NUMBER: 7179
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7179

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1722
Co-authored-by: Julius Francisco <53907+baldrailers@users.noreply.github.com>
GitOrigin-RevId: 34424445352066a9a01a465da8c4805e21cd7bce
2022-02-01 13:50:00 +00:00
Rikin Kachhia
514779dfb2 console: display version update banner only for oss
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3533
GitOrigin-RevId: 4c575b4d4a118857cc942d6e904d4f5d50ecd618
2022-02-01 12:19:25 +00:00
Robert
0c17f238a2 server: report duplicate entries in metadata lists using ToTxt instead of Show
This change is because in https://github.com/hasura/graphql-engine-mono/pull/2477, errors come out as
```
multiple declarations exist for the following allowlist : [CollectionName {unCollectionName = NonEmptyText {unNonEmptyText = "collection_1"}}]'
```
which is awfully messy. This changes it to
```
multiple declarations exist for the following allowlist: collection_1
```

This should improve error messages across the board -- e.g. `RoleName` has a nice `ToTxt` instance, while we used to use a derived `Show` instances. However, there might just be instances where the `Show` instance was better, bit hard to be sure based on scanning the code since we don't have test coverage for these errors.

Broken out of the allowlist PR since it affects more than just the allowlist.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3470
GitOrigin-RevId: 7a2c29f17d9f15d840cb2f89caefcdd3aae44d25
2022-02-01 11:30:58 +00:00
Varun Choudhary
670e0953fb console: radio input should auto-select on insert and edit row form
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3524
GitOrigin-RevId: 75ca446fea815b03c9a4b4edfff848bb8ce5e0f5
2022-02-01 10:33:48 +00:00
Divya Bhushan
626467fbe8 docs: update pg_untrack_function args in metadata api index
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3531
GitOrigin-RevId: b066920a07abd045cff4d413a00c388d7e208d4d
2022-02-01 09:23:01 +00:00
Divya Bhushan
b0fa87566a docs: move FAQ section to top-level in sidebar + update metadata catalogue details
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3514
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 36f695916a04d3e86796964864aac48a815f3320
2022-01-31 18:03:51 +00:00
Divya Bhushan
149f4b53d5 docs: Add missing image on the Azure container instances page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3517
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: a3b8925cea198a2cf9994062f2741536e4a9ee31
2022-01-31 16:50:08 +00:00
nevermore
84df556e47 docs: initial docs for vercel integration
## Description

This PR includes the initial docs for v1 Vercel Integration ([PR](https://github.com/hasura/lux/pull/3274))

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3284
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 096eddb1a8ead3ef809f161b36254a8f58a10fff
2022-01-31 16:46:12 +00:00
Brandon Martin
ab208a858f Update CHANGELOG.md
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3512
GitOrigin-RevId: e087a034a985e52863e75018f1a079c93c738ca8
2022-01-31 15:30:11 +00:00
Varun Choudhary
01cd14f8e3 console: add select component
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3490
GitOrigin-RevId: 398d3b3ece16f6b279661757c0cc7bbcc2c106f6
2022-01-31 14:24:55 +00:00
Divya Bhushan
cc9dbcd450 docs: Minor editions on the Read replicas page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3341
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 0bd541621421fc8d0da7d45bf8c3bc833328cf11
2022-01-31 13:32:13 +00:00
Antoine Leblanc
3525e60021 Deploy server documentation to github page in CI
_(This PR is on top of #3352.)_

## Description

This PR overhauls our documentation CI steps to push all generated server documentation to the `gh-pages` branch of the OSS repo. The goal of this PR is to arrive in the situation where `https://hasura.github.io/graphql-engine/server/` is automatically populated to contain the following:
  - all the markdown files from `server/documentation`, copied verbatim, no transformation applied
  - all the notes, collected from the code by the `extract-notes.sh` script, in `server/notes`
  - the generated haddock documentation for each major release or branch in `server/haddock`.

To do so, this PR does the following:
  - it includes the script to extract notes from #3352,
  - it rewrites the documentation checking CI step, to generate the notes and publish the resulting "server/documentation" folder,
  - it includes a new CI step to deploy the documentation to the `gh-pages` branch

Of note:
  - we will generate a different haddock folder for each main branch and release; in practice, that means the _main_, _stable_, _alpha_, _beta_ branches, and every build tagged with a version number
  - the step that builds the haddock documentation checks that ALL projects in the repo build, including pro, but the deploy only deploys the graphql-engine documentation, as it pushes it to a publicly-accessible place

## Required work

**DO NOT MERGE THIS PR IT IS NOT READY**. Some work needs to go into this PR before it is ready.

First of all: the `gh-pages` branch of the OSS repo does NOT yet contain the documentation scaffolding that this new process assumes. At the bare minimum, it should be a orphan branch that contains a top-level README.md file, and a _server_ folder. An example of the bare minimum required can be previewed [on my fork](https://nicuveo.github.io/graphql-engine/server/).

The content of the `server/documentation` folder needs to be adjusted to reflect this; at the very least, a `README.md` file needs to be added to do the indexing (again, see the placeholder [on my fork](https://nicuveo.github.io/graphql-engine/server/) for an example).

This way of publishing documentation must be validated against [proposed changes to the documentation](https://github.com/hasura/graphql-engine-mono/pull/3294). @marionschleifer what do you think?

~~The buildkite code in this branch is currently untested, and I am not sure how to test it.~~

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3380
GitOrigin-RevId: b24f6759c64ae29886c1f1b481b172febc512032
2022-01-31 13:16:29 +00:00
Varun Choudhary
182d96ad75 console: add hooks for useRemoteSchemaRelationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3444
GitOrigin-RevId: df93c994c3a9c08250a94f0b88954f8ede883cf4
2022-01-31 10:50:17 +00:00
Daniel Chambers
3c74f91a1c Add default User-Agent header for Action requests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3505
GitOrigin-RevId: fe74349d1ca699dc0edca1e5a829fd658226a5ee
2022-01-31 06:50:13 +00:00
Daniel Chambers
e5f35c8051 Fixed HeaderValue title, missing ResponseTransformation anchor in docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3522
GitOrigin-RevId: 5525c72479866863f5025bb949b57ef6bf0561a2
2022-01-31 05:56:53 +00:00
Chris Done
e97f93e02e server/tests: run Haskell integration tests in CI
This PR introduces a BuildKite pipeline step to run the new hspec tests in CI.

Closes https://github.com/hasura/graphql-engine-mono/issues/2866

Relates to https://github.com/hasura/graphql-engine/issues/7760

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2987
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
Co-authored-by: Kirill Zaborsky <70110+qrilka@users.noreply.github.com>
GitOrigin-RevId: 48cea2b81394ff1c4b19bd178ca10bbcb200f33e
2022-01-28 12:22:09 +00:00
Rikin Kachhia
eb427aaf3d console: update graphiql height and remove extra scrollbars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3473
GitOrigin-RevId: 20ad5759790e04342bf8531097a7f511a3fdd74f
2022-01-28 11:16:24 +00:00
hasura-bot
3796fd354d console: fix custom field names sort (fix #7974, #8021)
GITHUB_PR_NUMBER: 8037
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8037

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3379
Co-authored-by: arjunyel <11153289+arjunyel@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: f561b7a0ac5b85a7ca8cdae1cc8f1ad50d61eb0c
2022-01-28 10:31:23 +00:00
Vijay Prasanna
e50c0c0a0c console: enable support for insert & delete permissions for mssql
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3376
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
GitOrigin-RevId: 5ad23803a7326e64f17dac88e2d1caa5f7276c5f
2022-01-28 09:51:08 +00:00
Daniel Chambers
4d9417fac4 server: Refresh JWKs maximum once per second
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3429
GitOrigin-RevId: 123fe33f026a36282ee1137eeefd612191ff4844
2022-01-28 00:18:56 +00:00
Antoine Leblanc
d66d2d81fd server: use placeholder to prevent empty query roots
### Description

The GraphQL spec has to conflicting requirements:
1. an object must contain at least one field: the schema may not contain empty objects
2. the _query_root_ must always be present

Given _1_, the schema generation code removes from the schema all fields that would result in empty objects, such as a table for which a user does not have select permissions. But, as a result, our code also potentially removes _query_root_ if it is empty, breaking _2_.

This PR introduces a dummy "placeholder" field in the query root if it's empty, to ensure we never remove it from the schema.

### Remaining work

- [x] changelog entry
- [x] tests

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/148
GitOrigin-RevId: bfd6bfcc2f3de92900b6ba566012f093399ca037
2022-01-27 18:08:11 +00:00
Antoine Leblanc
a023a3259d Prevent uses of unsafeMkName whenever possible.
### Description

This PR is the result of a discussion in #3363. Namely, we would like to remove all uses of `unsafeMkName`, or at the very least document every single one of them, to avoid similar issues. To do so, this PR does the following:
- it adds a hlint suggestion not to use that function:
  - suggestions don't mark the PR as failed, but will be shown at review time
  - it is possible to disable that hint with `{- HLINT ignore myFunction "unsafe" -}`
- wherever possible, it removes uses of `unsafeMkName` in favour of `mkName`
- it adds a comment with a tracking issue for the two remaining uses:
  - #3478
  - #3479

### Remaining work

- discuss whether this hint should make the linter step fail, since the linter step isn't required to merge anyway, and there is a way to disable the hint wherever we think the use of that function is acceptable
- check that none of those uses were load-bearing and result in errors now

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3480
GitOrigin-RevId: 0a7e3e9d1a48185764c04ab61e34b58273af347c
2022-01-27 15:13:37 +00:00
Antoine Leblanc
81d9071948 Fix remote relationship invalid type name issue (fix hasura/graphql-engine#8002)
## Description

When setting up a remote relationship to a remote schema, values coming from the left-hand side are given as _arguments_ to the targeted field of the remote schema. In turn, that means we need to adjust the arguments to that remote field; in the case of input objects, it means creating a brand new input object in which the relevant fields have been removed.

To both avoid conflicts, and be explicit, we give a pretty verbose name to such an input object: its original name, followed by "remote_rel", followed by the full name of the field (table name + relationship name). The bug there was introduced when working on extending remote relationships to other backends: we changed the code that translates the table name to a graphql identifier to be generic, and use the table's `ToTxt` instance instead. However, when a table is not in the default schema, the character used by that instance is `.`, which is not a valid GraphQL name.

This PR fixes it, by doing two things:
- it defines a safe function to translate LHS identifiers to graphql names (by replacing all invalid characters by `_`)
- it doesn't use `unsafeMkName` anymore, and checks at validation time that the type name is correct

## Further work

On this PR:
- [x] add a test
- [x] write a Changelog entry

Beyond this PR, we might want to:
- prioritize #1747
- analyze all calls to `unsafeMkName` and remove as many as possible

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3363
GitOrigin-RevId: fe98eb1d34157b2c8323af453f5c369de616af38
2022-01-27 14:34:01 +00:00
Gil Mizrahi
084a9f2f7b Reorganize Harness.Quoter.Yaml and add shouldReturnOneOfYaml
- I've made some stylistic changes to `Harness.Quoter.Yaml` so that the exposed API will appear at the top
- I've added a new expectation `shouldReturnOneOfYaml`, which can be helpful in testing non-deterministic results (by specifying all the possible valid results). Can be useful for https://github.com/hasura/graphql-engine-mono/issues/3458

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3492
GitOrigin-RevId: 71c1fe490f8a0717f2729efa2750d5d0034cec86
2022-01-27 13:15:28 +00:00
Karthikeyan Chinnakonda
56e40e1d0e server: add a new metadata API to return all the cron triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3464
GitOrigin-RevId: 97b043ec0b4194cde83f2d78c3dc963cf0414c29
2022-01-27 06:44:37 +00:00
Daniel Chambers
bd6f7cd756 Fixed GQL aliases not being respected in the OpenAPI schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3484
GitOrigin-RevId: 0f49dd7f64e80dfe6940d673afa76f12f6599126
2022-01-27 05:55:55 +00:00
Gil Mizrahi
9d2ac22365 tests-hspec - custom finally and readme toc
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3471
GitOrigin-RevId: 4a1477b7e7f175bf7b4c81405747588980c43d7b
2022-01-26 12:18:22 +00:00
Vijay Prasanna
4cfc1eea59 console: add hooks for useTableColumns and useRemoteDatabaseRelationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3441
GitOrigin-RevId: eac2da4adddbdff184fabd1137cf70f551c86f21
2022-01-26 10:51:05 +00:00
Antoine Leblanc
dfe9a046f6 Factor backends' metadata in hspec tests.
## Description

This PR adds a `defaultSourceMetadata` expression to each backend's harness file, and introduces `setSource` and `setSources` to factor out all the calls to `replace_metadata` in the tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3425
GitOrigin-RevId: 5eacb156ffa198123262759eb2bbdebe8ab09fd7
2022-01-25 16:35:44 +00:00
Antoine Leblanc
472d5df5ae Add documentation scaffolding for first sync-up.
## Description

This PR adds a basic README file to `server/documentation`, in order to get something somewhat decent when we run the first automatic sync.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3468
GitOrigin-RevId: 10c3afc1ea02ee3eb914009e3b9ad22065c1db50
2022-01-25 13:18:22 +00:00
Alberto Francesco Motta
576c539bcb console: add CardedTable component
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3398
GitOrigin-RevId: f0c6bc8f95a49a6544216c0764fa633ac724e5c6
2022-01-25 10:49:46 +00:00
Abby Sassel
a091110364 server/tests: ephemeral BigQuery projects for CI test jobs
_Problem_
We currently run teardown/`DELETE` statements on the same, shared `hasura_test` dataset. This is not ideal as parallel test runs can and do affect each other, resulting in nondeterministic CI failures.

Closes https://github.com/hasura/graphql-engine-mono/issues/2521

_Solution and design_
This PR introduces ephemeral, isolated projects for each test run _in CI only_. Projects are created within [the Google Cloud Platform `data-sources-test-bigquery` directory](https://console.cloud.google.com/iam-admin/settings?folder=704256416468&orgonly=true&supportedpurview=organizationId) on each test run, and destroyed afterwards.

I've only introduced this change in CI for the time being:
  1. this isn't as much of an issue locally because we're less likely to run bigquery tests in parallel.
  2. to more quickly unblock https://github.com/hasura/graphql-engine/issues/7929.
  3. to limit the number of new projects created until we have a better idea of our usage vs GCP quota/limits.

Also updated the [internal wiki here](https://github.com/hasura/graphql-engine-mono/wiki/Testing-BigQuery) with this info.

_To verify_
- CI: [this job](https://buildkite.com/hasura/graphql-engine-mono/builds/3770#89e5bac6-16fe-447e-bcda-85cd47ea1b77) successfully runs all tests on a temporary project & dataset
- local: follow [these steps](https://github.com/hasura/graphql-engine-mono/wiki/Testing-BigQuery#ci--optional-dedicated-gcp-project-for-tests) to try the same setup locally

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3240
GitOrigin-RevId: d88d9cb7922266bfa962cfcb481e0272b8929a5d
2022-01-25 08:28:06 +00:00
Daniel Chambers
c861f0b09d Fix REST endpoints with path segments not showing correctly in the OpenAPI spec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3443
GitOrigin-RevId: 92ab7ccc004fedb149f336b0585e6f002e08e2a9
2022-01-25 06:28:47 +00:00
Rikin Kachhia
613a80c82d console: fix action/remote schema permissions edit icons
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3460
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 90e46a39bdaab1386a2ff3c5dfbcfadd7526ef4f
2022-01-25 05:09:51 +00:00
Robert
5df40cc65b multitenant tests: reduce reliance on env vars, use fake cabal run
There's two major parts to this change:

1. cut down on environment variables needed to run the tests:
  - lux parameters that don't change are now in code
  - most remaining parameters have reasonable defaults
  - the only variable that is still required to be set is HASURA_MULTITENANT_SPEC_DB_URL
  - env.sh is no longer needed
2. find a better work-around for the problems running graphql-engine-multitenant
  via cabal run (https://github.com/haskell/cabal/issues/7914), by adding a shell
  script that implements a more correct version of cabal run.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3461
GitOrigin-RevId: 0939a79cc45cd3c1c103719552b12099678850dd
2022-01-24 18:15:25 +00:00
Robert
63f1a93b54 tests: break out flag tests into separate step
`test-server.sh` is largely concerned with running the python test suite in `server/tests-py`.
However, there are two odd test sets in there which don't belong, and make `test-server.sh`
awkward to work with.

One is `haskell-tests` (the "postgres" part of server unit tests), which we're not touching here.
The other is `test-server-flags`, which runs some shell script based tests against the command
line interface.

This commit moves `test-server-flags` out of `test-server.sh`, and into a separate buildkite step.
Reasons are largely:
- it doesn't belong with the python tests
- it doesn't need to run against various backends

The larger scope within which I'd place this change is that we
should aim to move the logic that's in test-server.sh to live closer
to server/tests-py and be shared between the local dev setup and
CI. There shouldn't be this much logic in CI scripts at all
(choosing with what flags to run graphql-engine, choosing which
arguments to pass to pytest, etc.).

This change hardly gets us there, but the way that test-server.sh
mixes concerns is one obstacle in ever getting away from the
current state.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3300
GitOrigin-RevId: a15300a1dd276fa9f0cc29ddbf4ba7497919a6ec
2022-01-24 09:55:32 +00:00
David Overton
8eca322b94 Fix for customized remote schema input object types in query variables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3417
GitOrigin-RevId: a4d3e59f5177f971a64a2b9e62fd1acaa8079a6b
2022-01-24 04:46:46 +00:00