Commit Graph

6623 Commits

Author SHA1 Message Date
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
Luca Restagno
9143d9443a Fix MySQL mutations
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8482
GitOrigin-RevId: 0cdbc081abee6d139c8132a00cae4e268239fd22
2023-03-27 09:05:04 +00:00
Mohd Bilal
de128e726a cli: add support for sources.logical_models in metadata
[PLAT-394]: https://hasurahq.atlassian.net/browse/PLAT-394?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8426
GitOrigin-RevId: a9480c4b77a0ab016b7d5c66e589301bc03740ac
2023-03-27 08:00:27 +00:00
Daniel Chambers
8acd447803 Fix non-determinism in expected ordering in agent test suite test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8493
GitOrigin-RevId: 210b6beb991d806e9a3e4cc901ee922ede0e3c84
2023-03-27 02:22:51 +00:00
Samir Talwar
042046bba7 nix: Bake the ODBC configuration path into unixODBC.
The previous method seems to be failing; we're not finding the drivers. Rather than using environment variables to tell unixODBC where to find odbcinst.ini, we can instead just configure it to point to the correct location and bake it into the binary.

This means we need to build unixODBC ourselves, but it's pretty quick, so doesn't seem like much of an issue.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8491
GitOrigin-RevId: 7d331c4205d412b7757c0f1efd5b6a00a10e2ad4
2023-03-25 20:55:47 +00:00
Samir Talwar
e238e0f295 nix: Upgrade msodbcsql18 to the latest minor version.
That'd be v18.2.1.1.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8492
GitOrigin-RevId: e6d30954003ff4169bd961aa365ae80539383c9e
2023-03-25 20:23:25 +00:00
Samir Talwar
0256e1da7d nix: Switch to nixpkgs-unstable.
I am making this change for two reasons:

  * We expect to upgrade to GHC 9.2.7 imminently, which is not available on the nixos-22.11 branch.
  * We need to upgrade unixODBC, which has stagnated on nixos-22.11.

While we expect a new NixOS release in a month or two, we can't really afford to wait that long. In addition, we might need to upgrade GHC again soon after that.

I removed `hpack` because we don't actually use it any more.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8483
GitOrigin-RevId: 9a7ef1a97599a218e34dfde1ad4f6a7279d2ba0e
2023-03-24 20:36:48 +00:00
Matthew Goodwin
3d071f96b9 console: Reset track tables search on input clear button [dsf-231]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8485
GitOrigin-RevId: 7b17c41c294b2ddffcdf6981e25196e79214777d
2023-03-24 19:25:42 +00:00
Tom Harding
b2f683f56d Logical Models for BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8447
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: ananya-2410 <107847554+ananya-2410@users.noreply.github.com>
Co-authored-by: Matthew Goodwin <49927862+m4ttheweric@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: ddef9d54bfad6b7d5dc51251dbe47eac43995da3
2023-03-24 15:17:03 +00:00
Brandon Martin
63eabc2374 Add dataset support to Oracle in the Super Connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8469
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 6f2aebc150d7c93490e6da3ada5c282dd3d9a56c
2023-03-24 14:35:30 +00:00
Tom Harding
fe140ee791 Remove Fixture.Options argument from api-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8480
GitOrigin-RevId: a6dd5c6c2cc6274b7bd1694cf1100efa48e6bdbd
2023-03-24 13:59:35 +00:00
Rakesh Emmadi
e12b12c274 server: improve schema-sync logs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8386
GitOrigin-RevId: a90a792389576dcfda493ab96aed279459c60d92
2023-03-24 09:41:36 +00:00
Erik Magnusson
e8adb259d3 console: fixed stale permissions UI after failed mutation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8458
GitOrigin-RevId: 2c47575465274fdfb5b6d2420ab56b202b86a8ab
2023-03-24 08:56:40 +00:00
Vijay Prasanna
ef7d8b7d31 console: UI improvements to snowflake & Athena tracking section
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8424
Co-authored-by: Julian <843342+okjulian@users.noreply.github.com>
GitOrigin-RevId: 8b514a8e40c10c4546a1d3d454daea7217c9cd3b
2023-03-24 08:25:28 +00:00
Samir Talwar
5e6c93e7aa nix: Add a couple of LSP servers to shell.nix.
This adds:

  * [Pyright](https://github.com/microsoft/pyright), for Python
  * [TypeScript Language Server](https://github.com/typescript-language-server/typescript-language-server), for JavaScript and TypeScript

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8465
GitOrigin-RevId: 502a3f27c7b1a74a830ad69b27c365c0de786088
2023-03-23 21:29:46 +00:00
Julian@Hasura
af5884d83e Refactor permissions string test DSF-225
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8448
Co-authored-by: Julian <843342+okjulian@users.noreply.github.com>
GitOrigin-RevId: 174eb8330a47e1f2b0dd1269d9999981c36a18f2
2023-03-23 20:11:07 +00:00
Antoine Leblanc
9e8c06e971 Split catalog migration and cache build, and solve the manager chicken-egg problem.
### Description

This PR is the logical continuation of #8343 and #8357, and replaces both.

One core problem that this PR addresses: we had to create temporary a `HTTP.Manager` to initialize both the OSS and the Pro app: a manager is required to build the schema cache, but the dynamic TLS allow list is read from the schema cache... This PR solves this, by introducing the `TLSAllowListRef`, based on @abooij 's idea: it allows us to create a valid `HTTP.Manager` as soon as we have the metadata list, and then update the ref at a later point to make it point to the schema cache, allowing us to only build one and only one `HTTP.Manager`.

This paves the way towards building the schema cache _in the app monad_ and deprecating `CacheBuild`. Towards this, and also to clean the code, this PR also splits the catalog migration and the first schema cache build into two distinct functions. This doesn't result in a change of behaviour, as the transaction to update the catalog would always be done before attempting to build the schema cache.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8421
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
GitOrigin-RevId: 0e0402122b4fc008c1932bccbdbadf11878e27eb
2023-03-23 16:42:53 +00:00
Antoine Leblanc
068b5e4523 Rename and clean CE app monad.
### Description

This small PR is on top of #8440. It continues the cleanup of `Hasura/App` by grouping together all instances on the app monad, renaming the app monad, and removing its `m` parameter.

See [this commit](cb6ecba3d4) to see the diff in isolation.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8441
GitOrigin-RevId: 7abb6524a160bcb4f75e729e726ce2af69643998
2023-03-23 15:52:48 +00:00
Samir Talwar
17855bf65a make: Add make targets for formatting and linting frontend code.
This adds linting and formatting of frontend code when running `make lint`, `make format`, or any of the variations.

I am adding this because I didn't know how to check the code and so I had to wait for CI to fail, which I found irritating.

In order to make this reasonable, I factored out `make` targets for building *frontend/node_modules*, so I could depend on them.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8463
GitOrigin-RevId: 71882ec90490efbf87d428d08eaec2ae849a0a36
2023-03-23 15:16:14 +00:00
Anon Ray
14fcaafa43 server: pass a partially applied function instead of passing AppStateRef to http handlers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8464
GitOrigin-RevId: b9dff36d2c560a093a6aff669315fe4fbc18b3f6
2023-03-23 14:33:29 +00:00
pranshi06
bc75136019 pro, server: fix event trigger log cleanup regression in Postgres event triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8460
GitOrigin-RevId: 17e7b73d3b92459ff9149391ecd46ccb9a0846e5
2023-03-23 13:56:11 +00:00