Commit Graph

6025 Commits

Author SHA1 Message Date
Divi
62708ca6bd ci: update catalog version for v2.16.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7271
GitOrigin-RevId: a7978ae1c0dd4d402f6293a74cf45acba560a456
2022-12-14 07:14:24 +00:00
Vijay Prasanna
6648621fbe fix(console): update read replica payload to contain ssl_configuration, isolation_level and use_prepared_statements
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7253
GitOrigin-RevId: d55fb3e6fbd98ce8f1031fa2292e030057b6b8f7
2022-12-14 05:40:03 +00:00
Mohd Bilal
62d997a590 cli: add support for opentelemetry in metadata
closes https://hasurahq.atlassian.net/browse/PLAT-297

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7267
GitOrigin-RevId: d35f50b8abdc726446ee583a4abfabde2a496721
2022-12-14 04:23:12 +00:00
Daniel Harvey
2e7ea7e780 [pro/tests] add sample tests for api-tests-pro
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7180
GitOrigin-RevId: 65f8b5fefbb2341dad0cf73e6b1d2e9d604e6bfb
2022-12-14 03:47:32 +00:00
Brandon Simmons
3b0ad30757 server: don't compress small responses
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7216
GitOrigin-RevId: 20a94267eca42edf8e79470711766a3fecac0f50
2022-12-13 17:50:01 +00:00
paritosh-08
3397c041bc server: fix MSSQL event trigger next_retry_at
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7173
GitOrigin-RevId: 862ab4136e0df6b7fa1e2db2c3edfffa318452de
2022-12-13 15:18:23 +00:00
Marion Schleifer
5b38518a64 docs: update yarn version in docs wiki
## Description

Tim (Head of Security) made me aware that we're linking to an [old version of yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) in our [docs wiki](https://hasura.io/docs/wiki/contributions/#mise-en-place). This PR updates to the [most recent docs](https://yarnpkg.com/getting-started/install).

## Quick links

[docs/wiki/contributions](https://ae91bccf.hasura-docs-mono.pages.dev/docs/wiki/contributions/#mise-en-place)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7239
GitOrigin-RevId: f48ef559a6f56dde0f35a444a8e3c92c8454b170
2022-12-13 13:11:08 +00:00
Gil Mizrahi
570e16efe7 Revert "[server/test] create new HGE per test"
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7255
GitOrigin-RevId: c971e9e227263b0956069c0687acacf4d3ff90a9
2022-12-13 12:37:27 +00:00
Auke Booij
51fc104793 server: don't let query collection validation prevent engine startup
Generate more Metadata Inconsistencies instead of startup failures. Specifically this means that
- errors retrieving the main query of an executable GraphQL document, and
- errors during fragment inlining

no longer fail irrecoverably.

This also makes more parts of `buildSchemaCacheRule` into pure code, which is always nice.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7234
GitOrigin-RevId: aebf636c2fb1aad1c2df9a37f7d0b67c1ee40c42
2022-12-13 09:56:27 +00:00
Rob Dominguez
5d4337778e docs: fix cloud db links
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7244
GitOrigin-RevId: 351b0fcd2544c7b4b018b435698499d7540a4d57
2022-12-13 08:20:34 +00:00
Vijay Prasanna
941179bfee fix (console): handle case sensitive SQL generation for table schema and names
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7224
GitOrigin-RevId: cbfa88a278282bcf12a5d19219093a34d93c830c
2022-12-13 08:08:41 +00:00
Aravind K P
fbfea5437c cli: support metrics_config metadata object
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7225
GitOrigin-RevId: e0d6f940d4b62b520948ca179cac39474f4d6d84
2022-12-13 02:48:11 +00:00
Matthew Goodwin
bffdc2f930 console: refactor modify tab metadata hooks [GDC-666]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7165
GitOrigin-RevId: b46408b3395198ac84f62eeae31a6bde3133c65f
2022-12-12 18:47:22 +00:00
Daniel Harvey
ed190d6cb6 [server/tests] drop old postgres database better, and use less connections
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7227
GitOrigin-RevId: d7b3b313440d3f3c91d4ecb550513b53cbf2e92e
2022-12-12 17:46:12 +00:00
kodiakhq[bot]
3ad81d18c8 [tooling] import hasura/pool into monorepo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7226
Co-authored-by: Bryan O'Sullivan <23374+bos@users.noreply.github.com>
Co-authored-by: Falko Peters <41595+informatikr@users.noreply.github.com>
Co-authored-by: Bas van Dijk <576355+basvandijk@users.noreply.github.com>
Co-authored-by: Ozgun Ataman <13820+ozataman@users.noreply.github.com>
Co-authored-by: Michael Snoyman <49415+snoyberg@users.noreply.github.com>
Co-authored-by: Kim Altintop <6163+kim@users.noreply.github.com>
Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com>
Co-authored-by: Evie Ciobanu <1017953+eviefp@users.noreply.github.com>
Co-authored-by: Robert <132113+robx@users.noreply.github.com>
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
GitOrigin-RevId: c99a93563f9b1aa25e69ecc030f8dc526df4fb6b
2022-12-12 16:10:25 +00:00
Mohd Bilal
c35add2a9c Revert "cli: refactor migrate/migrate.go to use internal/errors"
Reverts hasura/graphql-engine-mono#7005

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7228
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: d35202ee97b51db61c4598bb1a42e9551b1a89e3
2022-12-12 14:04:28 +00:00
Rikin Kachhia
8eb24229f9 console: move header navbar tooltips to bottom
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7193
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: a2002d9f58e3b2a7f3f873caa34e9a1da24b5393
2022-12-12 13:29:15 +00:00
Mohd Bilal
a2fb3de1ce cli: refactor migrate/migrate.go to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7005
GitOrigin-RevId: ee70ef351ed1915adef5b865773a2210c7dd1073
2022-12-12 12:48:49 +00:00
Luca Restagno
5e0bbc80de console: support alloydb
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6764
Co-authored-by: Erik Magnusson <32518962+ejkkan@users.noreply.github.com>
GitOrigin-RevId: 091525fd86342df5371e8545bba6ebff31132d53
2022-12-12 12:13:44 +00:00
Daniel Chambers
a26ecbc2b0 Enable mutations root field parsing for Data Connectors [GDC-665]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7221
GitOrigin-RevId: 88da78cd758bc8c2273b0d71a79d5fe46a4bc565
2022-12-12 04:42:56 +00:00
Divi
1f29cb504a ci: connect gcp jobs directly to cloud release pipeline
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6856
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: a1324e21fa842748145f9d453da42302f9395907
2022-12-12 03:08:13 +00:00
timothy-hasura
08a1165a7b docs: update security disclosures page with bug bounty information
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7215
Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
GitOrigin-RevId: 00da79b7fd2b315ab8f361eb82136856fb8d2f55
2022-12-10 09:36:27 +00:00
Sooraj
df5c946174 console: import generated types in actions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6313
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: Daniele Cammareri <5709409+dancamma@users.noreply.github.com>
GitOrigin-RevId: f522eef50e37412f2ae84f63efa08c32848ccc93
2022-12-09 18:13:39 +00:00
Brandon Simmons
6451d9c9ce server: refactor Hasura.Server.Compression for clarity/correctness
context: This is  foundation work, before we change how the server chooses to compress or not
part of effort: #5518

-----

Prior to this change it was difficult to understand how the functionality in this module related to the semantics of Accept-Encoding. We also didn't correctly handle directives with qvalues.

After this change certain technical infelicities are called out without modifying the behavior of the server; for instance we continue to fall back to identity (no compression) in the case where technically we're supposed to return 406, and we also  continue to treat `*` conservatively as meaning “use no compression”.

The only external change here is `gzip;q=x.y` now results in a zipped response.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7213
GitOrigin-RevId: 1910ffd70d29f1ab8825c601f1bd998be70ceeeb
2022-12-09 06:08:27 +00:00
Brandon Martin
c0aa2e8773 super-connector: Add display_name to super-connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7182
GitOrigin-RevId: 30c896a7ef52c44e90c324a4b2bb9fc5668863fa
2022-12-08 21:24:54 +00:00
pranshi06
8dab7df169 server: fix error in metadata APIs with inconsistency
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6669
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 1b004074b41ccb6512123cdb1707b39792e97927
2022-12-08 16:04:55 +00:00
Samir Talwar
f430e5b599 dev.sh: Fix mssql_wait to use mssql-tools to run sqlcmd.
On macOS, we use the `azure-sql-edge` image, which doesn't contain
`sqlcmd`. To work around this, we can use another container which _does_
contain the `sqlcmd` binary to verify that MS SQL Server is up.

This was also broken on Linux anyway.

This also updates the PostgreSQL image, in line with _databases.yaml_.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7204
GitOrigin-RevId: ad974cd353c348ec055a153cbba5cb39d85e0967
2022-12-08 10:00:28 +00:00
Daniel Harvey
e37b91a25a [server/tests] limit capabilities in matrix tester using RTS opts
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7202
GitOrigin-RevId: c2b6ff37a0b5839726d02c04c69fadeff4465022
2022-12-08 08:45:34 +00:00
Samir Talwar
2ee0dbf8eb server: Fix permissions when running an update_table_many query.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6969
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 4c6f6959dd69ff861a0333619f7ad90a013ed6ef
2022-12-08 08:04:08 +00:00
Lyndon Maydwell
e9dcbf6491 Adding custom scalar types to SQLite DC Agent - GDC-610
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6783
Co-authored-by: David Overton <7734777+dmoverton@users.noreply.github.com>
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: ee53c20b0090b6b3c88792ddc98b8287872fe0f3
2022-12-08 06:50:08 +00:00
Daniel Chambers
c14fd3ba4c Add mutability properties to the Data Connector schema API [GDC-664]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7190
GitOrigin-RevId: ce602b5e5cc5aee8716ff3f7a036b18b3bf47188
2022-12-08 02:07:01 +00:00
Daniel Harvey
1dd9e19b69 [server/test] create new HGE per test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7111
GitOrigin-RevId: 6d3e88cb29ca3e98cbd16141c9f924aa36fa6b43
2022-12-07 17:06:42 +00:00
Vijay Prasanna
e1064c34e0 feature (console): View browse rows relationships for GDC tables (WIP)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6875
GitOrigin-RevId: d905d84c3cf21790415ec22294e1efabaf93f185
2022-12-07 14:53:13 +00:00
Daniel Harvey
d3ee6d46a9 [tooling] add make py-tests command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7196
GitOrigin-RevId: 1507285bb42734a04bfb130f0cd1a0c28be2f3ca
2022-12-07 14:13:22 +00:00
Gil Mizrahi
f5ea45060a docs: cockroachdb and citus support subscriptions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7194
GitOrigin-RevId: 48550ec78541a0ac1c834cef2ca83195636951ce
2022-12-07 14:02:21 +00:00
Krushan Bauva
c540f803a6 server: add server_type information to version API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7141
GitOrigin-RevId: e1d1c780e6b588f0868003eb6d40019960246aba
2022-12-07 11:30:20 +00:00
Daniel Harvey
a7c6fd65f5 [ci] fix matrix test setup
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7195
GitOrigin-RevId: 75494d1bb4cb9060f03a918626135cd6f6191744
2022-12-07 09:27:26 +00:00
kodiakhq[bot]
3f3b19c565 server: tune builder runners, for ByteStrings we're about to send
`toLazyByteString` is a little deficient in two ways:

- It allocates relatively large chunks (4KB + 32KB +32KB, etc…) which is wasteful for small ByteStrings
- It shrinks each chunk (Copying the data to a new chunk of exactly the right size) if it's not more than half filled. If we're running the builder right before we send it over the wire, this copy is totally extraneous (we simply end up with more work for the next GC)

part of the effort: https://github.com/hasura/graphql-engine-mono/issues/5518

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7187
GitOrigin-RevId: b499cd49c33da6cfee96be629a36b5c812486e39
2022-12-07 06:01:08 +00:00
Mohd Bilal
00f5df3e47 cli: expose hasura migrate delete command as an API
Closes https://hasurahq.atlassian.net/browse/PLAT-292

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6955
GitOrigin-RevId: 41d77ebbe830b29e0ba0cdf6c3a67527e5580bdf
2022-12-07 03:02:14 +00:00
Lyndon Maydwell
3d5fb984b0 Fix metadata defaults bug - Defaults serialised into metadata table - GDC-647
## Description

There is a bug in the metadata defaults code, see [the original PR](https://github.com/hasura/graphql-engine-mono/pull/6286).

Steps to reproduce this issue:

* Start a new HGE project
* Start HGE with a defaults argument: `HASURA_GRAPHQL_LOG_LEVEL=debug cabal run exe:graphql-engine -- serve --enable-console --console-assets-dir=./console/static/dist --metadata-defaults='{"backend_configs": {"dataconnector": {"mongo": {"display_name": "BONGOBB", "uri": "http://localhost:8123"}}}}'`
* Add a source (doesn't need to be related to the defaults)
* Export metadata
* See that the defaults are present in the exported metadata

## Related Issues

* Github Issue: https://github.com/hasura/graphql-engine/issues/9237
* Jira: https://hasurahq.atlassian.net/browse/GDC-647
* Original PR: https://github.com/hasura/graphql-engine-mono/pull/6286

## Solution

* The test for if defaults should be included for metadata api operations has been extended to check for updates
* Metadata inconsistencies have been hidden for `/capabilities` calls on startup

## TODO

* [x] Fix bug
* [x] Write tests
* [x] OSS Metadata Migration to correct persisted data - `server/src-rsr/migrations/47_to_48.sql`
* [x] Cloud Metadata Migration - `pro/server/res/cloud/migrations/6_to_7.sql`
* [x] Bump Catalog Version - `server/src-rsr/catalog_version.txt`
* [x] Update Catalog Versions - `server/src-rsr/catalog_versions.txt` (This will be done by Infra when creating a release)
* [x] Log connection error as it occurs *(Already being logged. Requires `--enabled-log-types startup,webhook-log,websocket-log,http-log,data-connector-log`)
* [x] Don't mark metadata inconsistencies for this call.

## Questions

* [ ] Does the `pro/server/res/cloud/migrations/6_to_7.sql` cover the cloud scenarios?
* [ ] Should we have `SET search_path` in migrations?
* [x] What should be in `server/src-rsr/catalog_versions.txt`?

## Testing

To test the solution locally run:

> docker compose up -d

and

> cabal run  -- exe:api-tests --skip BigQuery --skip SQLServer --skip '/Test.API.Explain/Postgres/'

## Solution

In `runMetadataQuery` in `server/src-lib/Hasura/Server/API/Metadata.hs`:

```diff
-        if (exportsMetadata _rqlMetadata)
+        if (exportsMetadata _rqlMetadata || queryModifiesMetadata _rqlMetadata)
```

This ensures that defaults aren't present in operations that serialise metadata.

Note: You might think that `X_add_source` would need the defaults to be present to add a source that references the defaults, but since the resolution occurs in the schema-cache building phase, the defaults can be excluded for the metadata modifications required for `X_add_source`.

In addition to the code-change, a metadata migration has been introduced in order to clean up serialised defaults.

The following scenarios need to be considered for both OSS and Cloud:

* The user has not had defaults serialised
* The user has had the defaults serialised and no other backends configured
* The user has had the defaults serialised and has also configured other backends

We want to remove as much of the metadata as possible without any user-specified data and this should be reflected in migration `server/src-rsr/migrations/47_to_48.sql`.

## Server checklist

### Catalog upgrade

Does this PR change Hasura Catalog version?
-  Yes

### Metadata
Does this PR add a new Metadata feature?
-  No

### GraphQL
-  No new GraphQL schema is generated

### Breaking changes
-  No Breaking changes

## Changelog

__Component__ : server
__Type__: bugfix
__Product__: community-edition

### Short Changelog

Fixes a metadata defaults serialization bug and introduces a metadata migration to correct data that has been persisted due to the bug.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7034
GitOrigin-RevId: ad7d4f748397a1a607f2c0c886bf0fbbc3f873f2
2022-12-06 22:35:19 +00:00
Nicolas Inchauspe
fec3707e2e GraphiQL style bugs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7172
GitOrigin-RevId: 8381852fd0c9ac22dce22911d933b446f6e8de59
2022-12-06 19:30:22 +00:00
Rob Dominguez
6446c798ab docs: remove heroku one-click and references
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7164
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: e0fb2af227f323f82a401c81135a18f813cb3ce3
2022-12-06 18:08:19 +00:00
Sameer Kolhar
dc065cb98d console: hotfix minor issues in Check Database Latency feature
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7176
GitOrigin-RevId: 8f86ee64d44c67bbea0ccfead14d0bc2cd92b03a
2022-12-06 17:28:08 +00:00
Gil Mizrahi
a948e3460a add ci scripts for produce-feature-matrix
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7144
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: ab4e2e62ee2e347dfbbe08c16688b2ddfa3a1b1c
2022-12-06 16:42:39 +00:00
Adron Hall
bb5c935e59 Adding snowflake
## Description

First draft of the Snowflake getting started documentation.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6936
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 8500e81111f3200634ee9183d710718f0463f419
2022-12-06 16:01:36 +00:00
paritosh-08
3d4c66041f server: add event_processing_time metric
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6987
GitOrigin-RevId: 4f5948a225b18e2db59572482d2a608117fbb7d0
2022-12-06 15:11:04 +00:00
Julian@Hasura
4aee57b174 console: Use custom display name for drivers in dropdown - GDC-653
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7098
Co-authored-by: Julian <843342+okjulian@users.noreply.github.com>
GitOrigin-RevId: cf92d6c9c5d5116ce5b0ce972e859308afe886c2
2022-12-06 12:59:05 +00:00
surendran82
6acb7152cb community sample apps: image broken link update for SEO
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7170
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 145831d1056922af70150f8193c7f868de756f8f
2022-12-06 11:04:21 +00:00
Varun Choudhary
d10591daf3 console: add negative badge to show inconsistent remote schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7067
GitOrigin-RevId: 6eeae6945639e98fda9ab90ff05a6af5fc668454
2022-12-06 10:57:46 +00:00
Rishichandra Wawhal
7f0e4b2092 console: hide onboarding for users who onboarded before onboarding was launched
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7168
GitOrigin-RevId: 8e119129b2a910fefd692e93a19007cdfd564bf5
2022-12-06 06:10:34 +00:00