Commit Graph

5529 Commits

Author SHA1 Message Date
awjchen
5150920fc2 docs: Correct histogram buckets for event queue time
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6108
GitOrigin-RevId: d8668acc003425c10432dcd45df23e9ddae4e68c
2022-09-29 12:18:24 +00:00
Samir Talwar
60f81023db server/tests-py: Run the auth hook inside the test harness.
This teaches `hge_server` how to run more tests, thanks to `hge_env`.

It also simplifies the logic a bit more.

I have also modified _run.sh_ and _docker-compose.yml_ so we can run multiple test suites, one after another.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6105
GitOrigin-RevId: eff009362eb6bb90c07cedaf96dfe6ec9336ff32
2022-09-29 10:44:03 +00:00
Varun Choudhary
4894154be5 console: UI changes for the Try it feature
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6111
GitOrigin-RevId: e37407c36e4213f664584b552255a3463f78abfb
2022-09-29 10:10:02 +00:00
Rishichandra Wawhal
077e0cf563 console: show onboarding wizard only for cloud console
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6109
GitOrigin-RevId: 231d6fa1ffd4128c6c8d7cf5d46bc2cc9985c368
2022-09-29 07:45:26 +00:00
Naveen Naidu
2d1027c307 pro/multitenant: remove vault token from vault error logs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6096
GitOrigin-RevId: 45924400be3235d1f1643254ed42f5213b018c2e
2022-09-29 06:58:41 +00:00
Abhijeet Khangarot
efac6a718a console: add useInstallTemplate hook
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6077
GitOrigin-RevId: 635477024d968edf37fc4bd1749a320ed9fafe40
2022-09-29 05:12:51 +00:00
Abhijeet Khangarot
0a72b8edd0 console: update root component for onboarding to have cloud console check
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6093
GitOrigin-RevId: ba8ba274d4a7da7745926cefa63fab2989dfaba0
2022-09-29 03:19:48 +00:00
Jesse Hallett
d32dc881e3 server: fix MySQL connection pool settings getting swapped on parse
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6063
GitOrigin-RevId: 90f6f8485aa6a9d073edc56dcba5530f5cf787c4
2022-09-28 21:11:26 +00:00
Samir Talwar
cbdacd1c6c CI: Fix all shellcheck warnings in test-server.sh
* Add `source=` directives.
* Quote variables.
* Don't export variables that can fail to assign; instead, export afterwards.
* Write HGE stderr to the log file.
* Fix warnings around the PIDs.
* Disable a couple of false positives.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6097
GitOrigin-RevId: ed1c696b8735cd5d63ba30b3105040a0a9eca63c
2022-09-28 16:08:15 +00:00
Samir Talwar
93e8803d3e Reload sources when applying metadata.
If we don't do this, we might end up applying metadata with a stale schema cache.

Following the principle of least surprise, replacing the metadata should probably compute inconsistencies with regards to the actual state of the database.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6026
GitOrigin-RevId: ff7469d7d9857c8a9f517d5d0b6f1ecf463621b3
2022-09-28 13:48:25 +00:00
Rob Dominguez
0fdbca8d3e docs: add PR checklist
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6084
GitOrigin-RevId: c55f9a2935a270a2faa4c937bf0bada495772120
2022-09-28 13:06:36 +00:00
Rikin Kachhia
3fa52752cb console: fix few UI glitches
- align track and customize table buttons on schema page
- fix notification panel alignment
- fix highlighting of active tab icon
- fix highlighting of "API" tab on "/api/explorer" path

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6094
GitOrigin-RevId: 7f16f4637b3881ffc7e8451fbbfb25c8fd75a6b7
2022-09-28 12:43:48 +00:00
Erik Magnusson
99e6460ebb console: new empty state component for schema page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6078
GitOrigin-RevId: 0379591f280e40348c4c8842338f3a566a7717e2
2022-09-28 11:11:51 +00:00
Daniel Harvey
69044f3bbe console: remove suggested CockroachDB column
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6070
GitOrigin-RevId: 00cbf3eae02cccf579007ca9655a7ed195befa3c
2022-09-28 09:57:18 +00:00
Samir Talwar
8cb2738cbe server/tests-py: Declaratively state the HGE environment variables.
This has two purposes:

* When running the Python integration tests against a running HGE instance, with `--hge-url`, it will check the environment variables available and actively skip the test if they aren't set. This replaces the previous ad-hoc skip behavior.
* More interestingly, when running against a binary with `--hge-bin`, the environment variables are passed through, which means different tests can run with different environment variables.

  On top of this, the various services we use for testing now also provide their own environment variables, rather than expecting a test script to do it.

In order to make this work, I also had to invert the dependency between various services and `hge_ctx`. I extracted a `pg_version` fixture to provide the PostgreSQL version, and now pass the `hge_url` and `hge_key` explicitly to `ActionsWebhookServer`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6028
GitOrigin-RevId: 16d866741dba5887da1adf4e1ade8182ccc9d344
2022-09-28 09:21:02 +00:00
Luca Restagno
b58b3c58f5 console: update the bigquery label
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6034
GitOrigin-RevId: 8c0d1f3db86dbbc0265d96c5788f41ca0c1a3196
2022-09-28 08:46:29 +00:00
Samir Talwar
d9afcc1857 Upgrade all package-lock.json files to the v2 format.
NPM v7 uses a new (backwards-compatible) lockfile format. This upgrades all our various _package-lock.json_ files to use the new format.

It's much more verbose so that NPM can be a lot faster.

I figured it was cleaner to do this once in a separate PR rather than upgrading them in combination with adding or upgrading a new dependency.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5869
GitOrigin-RevId: 322fb63b96e2d873a4a3cc05fa6c7afa414716ce
2022-09-28 08:15:29 +00:00
Varun Choudhary
6028a93078 console: add Try it button on table view to try operations from graphiql tab
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6016
Co-authored-by: Daniele Cammareri <5709409+dancamma@users.noreply.github.com>
GitOrigin-RevId: a26d5c6e3b61a9f12f8e2ff476091a8dcef9e696
2022-09-28 05:30:16 +00:00
Daniel Harvey
d03d86a5e7 ci: Testing more Postgres versions with Hspec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5919
GitOrigin-RevId: c6d1d0463b3640d4f33b54de6a2a425dec3920a2
2022-09-28 03:39:22 +00:00
Daniel Chambers
6af3fa2d78 Add the ability to test against tables in configurable schemas in Data Connector Agent test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6083
GitOrigin-RevId: 5a7ee37ed3a62224a062dbaac7d322dfd95b83c4
2022-09-27 23:42:32 +00:00
Priya Sharma
940d1fb2e0 console : add onboarding template gallery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6043
GitOrigin-RevId: 49782f1f57f3e0bfc00a316d77f6e9cf0143a4b1
2022-09-27 20:48:24 +00:00
Daniel Harvey
27fca2a3ed tests: fix ViewsSpec for CockroachDB
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6076
GitOrigin-RevId: 8423880cd5b6ba5794fa5096cf3955fb858b4610
2022-09-27 20:12:15 +00:00
Vijay Prasanna
68220df842 feature (console): get table rows for non postgres databases via DAL
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6022
GitOrigin-RevId: 89251ad91f2c54ae109f160bb141a40704d30fb7
2022-09-27 19:37:24 +00:00
Tom Harding
a9f7c1ef80 Reverse stringifyNumbers assertions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6079
GitOrigin-RevId: 2db16d057f5ff2ea261d23b43eeced22ebd0235a
2022-09-27 16:52:21 +00:00
paritosh-08
fabbd134b2 server: add metadata origin in streaming subscription field parser
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6075
GitOrigin-RevId: 901ba21dbcbf9bee4ca38cba21a5440ca10f3407
2022-09-27 15:56:46 +00:00
Rob Dominguez
327d81e6da docs: replace cloud-db logos and add titles
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6058
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 1609e2a4f11851be55f400db8c43343d35940bbc
2022-09-27 14:57:37 +00:00
Daniel Harvey
3fadeeb5f9 server: Console Sentry DSN support
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5899
GitOrigin-RevId: 941647350def3ef21979c091e562c374ad562016
2022-09-27 14:51:52 +00:00
Abby Sassel
629f60eb55 server/postgres: address translateTableRelationship feedback
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6073
GitOrigin-RevId: 6316d64256d4fd34936e1d8c6afffb0db15f2fe7
2022-09-27 14:16:52 +00:00
Mohd Bilal
c28ed6cc6c cli: Fix query collection export missing definition object and queries array in yaml
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5954
GitOrigin-RevId: b7b29c43ca9c3b2934ea12e71bca2dadecc4c34b
2022-09-27 13:46:42 +00:00
Rishichandra Wawhal
3df2403cf7 console: integrate the generalised hook useNeonIntegration hook to render Neon integration in the onboarding wizard
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6055
GitOrigin-RevId: 9b0fc398599e0e7d33b11fd657f93f8d7baaa3c6
2022-09-27 13:17:36 +00:00
Sooraj
265311a4cc console: support multi tenant connection pooling on cloud
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5950
Co-authored-by: Matthew Goodwin <49927862+m4ttheweric@users.noreply.github.com>
GitOrigin-RevId: 47db9dd70235242002533ce64ef2f987a816d4fe
2022-09-27 12:23:14 +00:00
Nicolas Beaussart
2f86f71d4d make the build outpout similar than before
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6052
GitOrigin-RevId: 3f93eb14828057ce67bad6068e4c00f32e8b7c51
2022-09-27 11:49:49 +00:00
Mohd Bilal
8d18a55212 cli: move AddDatabaseToHasura to testutil package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6069
GitOrigin-RevId: f7a3b98685c16fec613719eaa05024cd3c9cd3d4
2022-09-27 11:16:22 +00:00
Luca Restagno
5f8421a4ec console: add new test cases for Eport to CSV
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6068
GitOrigin-RevId: 82d3a8e031a22d96aeb9687ea1d27a8435121fa8
2022-09-27 09:52:51 +00:00
paritosh-08
a88e6cfa9d server, pro: make http manager with allowlist in migrateCatalogSchema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6045
GitOrigin-RevId: 34d67615b5a9e6b7f59760ecf89977764fcb1868
2022-09-27 09:25:28 +00:00
Daniel Harvey
bfa5296ecf server: Upgrade to CockroachDB 22.2 nightly and enable skipped tests from oid error
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6046
GitOrigin-RevId: 21a660bf4deab9bbe0465443685338191b90e485
2022-09-27 08:55:45 +00:00
Tom Harding
a1c5ac46f6 Extract dc-api and its tests from graphql-engine.cabal
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6000
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: d8f3cd0194191ab4c51a5a7d350cb2c3a0a5a7f3
2022-09-27 07:21:54 +00:00
awjchen
8e05e51f1b server: report metrics API status from config API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5599
GitOrigin-RevId: b66eb5c3a0034fe5ab7c764b34f7def77edd3fc0
2022-09-27 06:49:45 +00:00
Auke Booij
8e600362e7 Improve error message phrasing in safeSelectionSet
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6053
GitOrigin-RevId: c2595f396845e9ca809b93566b38239d80a244b8
2022-09-27 06:08:25 +00:00
Matthew Goodwin
b3b9ff269a console: GQL Customization while tracking a table
## Description 🔖

This adds the ability to "customize & track" using the [new tracking ui](https://github.com/hasura/graphql-engine-mono/pull/5391).

A new button was added to implement this:

<img width="870" alt="Screen Shot 2022-09-16 at 12 37 14 PM" src="https://user-images.githubusercontent.com/49927862/190701948-1ad86717-f6be-4f67-8e0c-17b618790795.png">

## Solution and Design 🎨

This feature mostly makes use of components and hooks already created.

I was able to refactor some code to reduce code duplication and type duplication.

A few highlights on the refactor:

- `useTrackTable`, `useUntrackTable` and `useTrackSelectedTables` were all refactored into a single hook: `useTrackTable`. This hook has one main function but returns 4 wrapper functions: `trackTable`, `untrackTable`, `trackTables`, and `untrackTables`. This should make maintaining easier in the future.
- Synced up types between `MetadataTableConfig` and the customization form. Previously, the customization form had duplicated this same type, and there was some slight discrepancies between them.
- Modified `TableTrackingCustomizationModal` `onSubmit` return with a 2nd argument that's in the exact shape of `MetadataTableConfig` for convenience.
- Did some refactoring of the `DropDownMenu` component that should not interfere with anything. Exposed a few of the inner components for export and used these modular pieces in the current implementation. This ended up not being used in the feature, but left it in as it's a slight improvement.

I also added a function called `delayAsyncAction` [here](5e88262628/console/src/components/Common/utils/jsUtils.tsx (L416)) to create an artificial delay for `async` functions. This allows us to create a more confident UX when requests happen near-instantly. Introducing a tiny delay of around 300ms with good UI feedback (i.e. loading spinner) shows the user something is happening. I wanted to document this as I'm not sure it's something other will agree on. If it's against our UX philosophy, I can remove it, but I found it nice.

## Review Setup 💻

1. Run the code locally and go to `http://localhost:3000/data/v2/manage?database=YOUR_DATABASE_NAME_HERE`
2. You should see the new button as shown above to `Customize & Track`
3. Try it out with various field custom roots
4. Also try tracking and untracking tables both from the individual rows as well as the checkboxes as this logic was also modified in the refactor.

 ** I am not totally sure how much I need to put here for testing, I may want some help here from the team. **

## Review checklist. 📋

### Functionality

- [ ] Steps to verify console behaviour

### Tests

Going to open another PR for adding testing to the relevant areas. Will update this PR with a link once that's been done.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5922
GitOrigin-RevId: e7c14be5b9bcc255a7b9ecfd43f1f84aa8aabba2
2022-09-26 22:02:40 +00:00
Erik Magnusson
e5e6bf1517 removed dependency
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6048
GitOrigin-RevId: a595c55fb636b8a06b1a467acecc701d42df3188
2022-09-26 14:52:31 +00:00
Rishichandra Wawhal
7fb6a82043 console: introduce a generalised useNeonIntegration hook
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6042
GitOrigin-RevId: cc29154fbe7add1c9707483fd4a22b01d5e1fa13
2022-09-26 13:56:37 +00:00
Daniel Harvey
f42bc4b816 server: feature flag for disabling TABLE_updates fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6039
GitOrigin-RevId: fcbafe2e4b8cf72d739033b372b536d59c398c4e
2022-09-26 13:25:37 +00:00
kodiakhq[bot]
c5de79d10c server: merge graphql-parser-hs into the monorepo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5906
Co-authored-by: José Lorenzo Rodríguez <37621+lorenzo@users.noreply.github.com>
Co-authored-by: Vitali Barozzi <26206141+vitalibarozzi@users.noreply.github.com>
Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com>
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
Co-authored-by: Solomon <24038+solomon-b@users.noreply.github.com>
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
Co-authored-by: Evie Ciobanu <1017953+eviefp@users.noreply.github.com>
Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com>
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
GitOrigin-RevId: 4864173fd616fbbb2fe3a839d0c5eabd76a2e1f2
2022-09-26 11:23:37 +00:00
Abhijeet Khangarot
90543c99ae console: add onboarding wizard tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6041
GitOrigin-RevId: 72e5f6e0fc7c51c9a4db70665059771194be2730
2022-09-26 10:34:17 +00:00
Luca Restagno
c89d283dd2 console: fix export to CSV
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6038
GitOrigin-RevId: 29830693acf1d503abc82a53bc010fa7bf6b26dc
2022-09-26 09:41:05 +00:00
Marion Schleifer
c526ff5754 docs: add note to schema index
## Description ✍️

Rishi asked me to add this note to docs:

```
Hasura can recognize and return UTF-8 encoded string-types from your database.

If the columns in your database have an encoding other than UTF-8, then your API clients may get garbled or incorrect values for queries made on those columns.
```

I rephrased it a bit. Needs to be checked if it still means the same.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5842
GitOrigin-RevId: cc393119569b169d5578944c66b1965a7778ee39
2022-09-26 08:41:44 +00:00
Auke Booij
7e10ff4e13 server: don't export the backend_only permissions flag if it is set to false while exporting metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6006
GitOrigin-RevId: 60207193b654407bffdbf8436f5be36f46c6d8c6
2022-09-26 06:11:57 +00:00
Abhijeet Khangarot
3c16b60253 console: update msw and add one graphql mock
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6040
GitOrigin-RevId: 7e22c61a5705f9b24b81079215becdb51b59924a
2022-09-23 19:06:27 +00:00
Sean Park-Ross
73b44484db Docs: Clarify Databases > Getting Started > BigQuery docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: ce87ace7ec73f37fe9137fd24da42e0a33f3c198
2022-09-23 15:31:11 +00:00