Commit Graph

6743 Commits

Author SHA1 Message Date
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
Erik Magnusson
eb3833516b console: allow support for geometric type columns on the permissions UI
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8457
GitOrigin-RevId: 5c8708523f26e67bacd37a8a2c010c473d9a7a5c
2023-03-30 13:09:33 +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
Stefano Magni
0d078f2aca chore(frontend): Add testing library to the EE E2E tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8498
GitOrigin-RevId: 3168d103907b48514e6044179e81c8602e293b0c
2023-03-30 10:43:03 +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
Rikin Kachhia
16bd34f9c3 console: show PG trigger condition on Table modify page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8555
GitOrigin-RevId: 5cfac5789bee2f61c7be24db20e155bb4f07cb50
2023-03-30 06:59:04 +00:00
Varun Choudhary
a7053fd9b5 console: fix quick add dropdown of add operation from allow-list
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8548
GitOrigin-RevId: 3b90caf1c7d0a36176a2708609b976f833f1be77
2023-03-30 06:27:39 +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
Rob Dominguez
86c9982c51 docs: add pointer to support from policies index
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8481
GitOrigin-RevId: c27a4f6df2b227ca7f5c71e4ae73c85587f7c735
2023-03-29 12:16:49 +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
Matthew Goodwin
f010af3c82 console: fix issue with custom columns names that causes browse rows to error out
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8487
GitOrigin-RevId: f152efa8383ef7fd156f0a62242aacbaa00df113
2023-03-29 04:21:14 +00:00
Nicolas Beaussart
b42d1dd249 frontend: disable a failing test until it's fixed
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8546
GitOrigin-RevId: b654d73751d499739eca15dd0bfde4c3164a37a2
2023-03-28 20:06:28 +00:00
Abhijeet Khangarot
01c6bfdc8b docs: update video player component to accept attribute as props
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8510
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: e46c7923dcf1bdad04a9025a38341cc729d5ef70
2023-03-28 18:07:55 +00:00
Tom Harding
d80f5b0cdd Clean up leftover bigquery datasets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8543
GitOrigin-RevId: 9463e50aa4bf62e12e39b4bebdf551e11c824897
2023-03-28 15:43:08 +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
Vijay Prasanna
bc7225fd1a console: fix issue with JSON columns breaking new browse rows UI
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8455
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: a9c4e111cfbd311fdd13ce52d78f6b0c352e636b
2023-03-28 12:51:13 +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
21839fe7f3 pro/server: Upgrade the LaunchDarkly SDK.
To take advantage of LaunchDarkly's new Contexts feature, we need to upgrade the SDK:
https://docs.launchdarkly.com/sdk/server-side/haskell/migration-3-to-4

This code doesn't change any behavior; it uses the context of "user" to simulate the same as before. We will change this in the near future.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8515
GitOrigin-RevId: 94bc4ee20414a85cf06f6896441755b2224c5eb0
2023-03-28 10:04:20 +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
Stefano Magni
05c935a607 chore(console): Add a note about Heap and data redaction
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8521
GitOrigin-RevId: cd0b148febc510e37da0b0a53af92a7653916648
2023-03-28 08:28:52 +00:00
Samir Talwar
b167aa84d1 console: Add readOnly: true in a few places where necessary.
I set up a local PostgreSQL read replica, loaded the Chinook dataset, and poked around finding bugs here and there. I added `read_only: true` to the relevant SQL queries to mitigate these.

I did not test exhaustively or even that well, and I only tried this with PostgreSQL, so I am sure that I have missed some, but this at least seems to make the console's Data tab usable.

Note that this removes the check for the `READ_ONLY_RUN_SQL_QUERIES` feature flag, which seems pointless, as it's checking whether we're running v1.1.0 of the HGE server or later. I sincerely hope no one is actually running such an old version.

If this change is acceptable, we can probably remove the feature flag logic entirely, but that is not something I want to do here.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8451
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: 5f4ebfa8f44e2921071699085b877db78aaa4e24
2023-03-27 22:57:05 +00:00
Samir Talwar
bdfea39de2 make: Set a base for all nx commands.
I personally avoid having a checked-out `main` branch during development, so that I don't accidentally commit directly to it.

This change makes `nx` commands work without needing a local `main` branch, by referring directly to the origin's branch instead.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8516
GitOrigin-RevId: b81314709b967b3dadd397793b416d9e0b137c98
2023-03-27 22:24:31 +00:00
Julian@Hasura
58d9e8cbea console: set browse as default tab when switching tables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8501
GitOrigin-RevId: 7d639822996f762efcbe94cc3512d3197eda8b22
2023-03-27 19:34:00 +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
Varun Choudhary
71898f602b console storybook: add interaction tests for modify cron trigger component
This PR adds interaction tests for modify the cron trigger page
Closes - https://hasurahq.atlassian.net/browse/GS-447

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8505
GitOrigin-RevId: 2a293970e69a819295781a0a91ab14bc79353bd2
2023-03-27 18:17:17 +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
Tirumarai Selvan
78a129fdd0 docs: move caching to top-level
Things done:

1. Moved Query Response Caching inside Queries to its own top-level position.
2. Change name of Query Response Caching to Caching (or Hasura Caching as appropriate)
3. Minor content changes
4. Connected Caching docs to Enable Caching docs for Enterprise

TODO:

1. Setup redirect from old page to new page if necessary

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8433
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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: bd58e180b49a934f721172a18ff2cf5798a45515
2023-03-27 16:21: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
Varun Choudhary
abcb2b4489 console: e2e snapshot testing for rs-to-x relationships
This PR has e2e snapshot testing for the rs-to-x relationship.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8407
GitOrigin-RevId: 4e288ba5efca3668db638eac1ce8ba1255c7f8e6
2023-03-27 14:33:57 +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
Matthew Goodwin
26bb2b4030 console: Set the new relationships UI as the default UI
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8423
GitOrigin-RevId: a614df40b108c35f8aa8cde67557b117061b5591
2023-03-27 11:48:38 +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
Varun Choudhary
ce93288b94 console: move update columns out of advance setting on create ET form
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8479
GitOrigin-RevId: da159fc2fc94b0e2f7a5f147c90523b0756f0c27
2023-03-27 09:37:18 +00:00