Commit Graph

5831 Commits

Author SHA1 Message Date
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
Rob Dominguez
adf565fe3d docs: make cloud db guides agnostic
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7127
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 7ea4fc8829216308878085577412b4a9b8c5942e
2022-12-06 00:13:02 +00:00
Solomon
599d9fd602 Dynamic Dispatch For Test Harness BackendType Metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6982
GitOrigin-RevId: faeec9ba0dfcb641c13cdc3f88244237fb370c66
2022-12-06 00:06:53 +00:00
Luca Restagno
1ce631132a console: fix scenario in which data is not ready yet
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7161
GitOrigin-RevId: 4b03fba03b2c1b8a4d855d2db852e8ce4f82d579
2022-12-05 15:23:51 +00:00
Gil Mizrahi
f45c379866 add concurrent_bulk api for parallel processing of read-only queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7087
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: 0d7a212d004908bc014def9d3828647545c9e062
2022-12-05 13:50:19 +00:00
Daniel Harvey
ba800ec978 [pg-client] test cancelled queries actually stop running queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7091
GitOrigin-RevId: 71cc1291d45a90a2c4f3519e12e365e968368dca
2022-12-05 12:19:11 +00:00
Daniel Harvey
aa9499ee0e [server/tests] remove unnecessary cleanup
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7157
GitOrigin-RevId: 93dc285c8629586336e56bb1622d94af0faa3e0e
2022-12-05 11:41:38 +00:00
Philip Lykke Carlsen
392ecf72b3 server: Improve modelling of function metadata and schema diffing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7140
GitOrigin-RevId: 83f54308d002391903d3c3d421e589949e7d4dc4
2022-12-05 10:22:15 +00:00
Gil Mizrahi
1970785970 fix api-tests warnings and enable -Wall
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7137
GitOrigin-RevId: 1c06f99ef94e1343d33c79e59e844c0470ba71aa
2022-12-05 08:31:00 +00:00
Vishnu Bharathi
73ad0275f3 ci: tag release v2.16.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7148
GitOrigin-RevId: 25adaa09c57471ed96d3d131abfa6c6c4225d6fd
2022-12-05 07:37:26 +00:00
Daniel Chambers
354ab2f7aa Use Sandwich test framework for Data Connector agent test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7133
GitOrigin-RevId: 625dde70d1c594dcdfd377efac78710174a74efc
2022-12-05 02:16:01 +00:00
Lyndon Maydwell
9c2a2823ef Data Connectors Stable API Release
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7131
GitOrigin-RevId: 1ddce3aced0e022b71527098d88817824ca37ce9
2022-12-02 22:32:38 +00:00
Rob Dominguez
9e20658b9e docs: reintroduce regression tests for pro cli and restructure subdirectory
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7081
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 29f8f061e86d2be6c2db0a9f297fe6c5a704404d
2022-12-02 18:37:11 +00:00
Matthew Goodwin
12d4de57c0 console: Revisions to #6931
For context: https://github.com/hasura/graphql-engine-mono/pull/6931

This PR makes some revisions that I had originally intended to be in the code, but due to some mixup, was refactored without discussion. @vijayprasanna13 and I synced up to try and make a decision about how to resolve it, but ultimately wanted to get more eyes on it to weigh in.

For context, when I refer to "premade selectors" I am talking about [this file](8a9264b14c/console/src/features/hasura-metadata-api/selectors.ts (L34))

And when I refer to "utility functions" (or metadata utility functions), I am talking about [this file](8a9264b14c/console/src/features/hasura-metadata-api/utils.ts (L38))

The changes I am suggesting here mostly about maintaining (IMHO) clearer separation of concern for selectors vs utility functions, and improving DX.

Here's how I see it high level:

![flows (light theme)](https://user-images.githubusercontent.com/49927862/204630900-aca2aad1-d760-409d-8ec6-446942b2d6ff.png#gh-light-mode-only)
![flows (dar theme)](https://user-images.githubusercontent.com/173663/204755227-e8850dbf-1012-4c7b-8087-dd6f16e5ca23.jpg#gh-dark-mode-only)

In other words, I want to avoid using pre-made selectors within a custom selector as it creates a pattern of multiple layers of curried functions and beings to (IMHO) look confusing and blur the separation of concern.

What I am proposing is that we have a convention of doing either

1) Developer wants the entire table object of a specific table. They can easily do this using one of the **premade** selectors and pass directly into `useMetdata()`:

```ts
const { isLoading, data: metadataTable } = useMetadata(
    MetadataSelectors.findTable(dataSourceName, table)
  );
```

2) Developer wants to get a specific piece of information on a specific table. They can leverage the `findMetadataTable()` utility function within a custom inline selector like this and avoid extra currying and double selector confusion:

  ```ts
const { isLoading, data: savedComment } = useMetadata(
    m => MetadataUtils.findMetadataTable(dataSourceName, table, m)?.configuration?.comment
  );
```

This is somewhat of a stylistic preference, but also one that I think makes a cleaner separation of concern in the way we are building the api and supportive pieces. In other words, premade selectors are _always_ a selector and not used to compose other selectors. It also makes available utility functions that are easy to pull of the shelf to do common metadata tasks whether in the scope of `useMetadata` or not.

## Simpler Approach?

We could also just go with **Flow # 2** and eliminate the premade selectors. The dev would then pass a custom selector into `useMetadata()` and if they prefer, use a utility function to support their task.

With that aside, whatever the team agrees makes more sense, I will gladly get on board with, but I wanted to make my case here : )

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7095
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 7ecc2db172def0d2f714cbbb2f95a4b56a528093
2022-12-02 18:28:40 +00:00
Philip Lykke Carlsen
886302fd7e server/tests: Introuce pytest-to-haskell porting script
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7054
GitOrigin-RevId: 2c4597465da28d26993b347693813ce7d42962d3
2022-12-02 15:59:19 +00:00
Rob Dominguez
0cc4693def docs: add ha multi region docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7096
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: bcb5e70dac234920c27dcf34e13f84fa2bc992d7
2022-12-02 14:26:45 +00:00
Puru Gupta
5c8bd8abd9 docs: update docs around webhook based authentication for websocket connection
## Description

This PR updates the doc around webhook based authentication for websocket connections explaining how exactly `Cache-Control` and `Expires` headers function.

## Changelog ✍️

__Component__ : server

__Type__: bugfix

__Product__: community-edition

### Short Changelog

update docs around webhook based authentication for websocket connection

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7135
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: ab873c394aad3a94d1a3affa483363f28ab77693
2022-12-02 13:25:06 +00:00
Gil Mizrahi
2f83899979 Fix mssql aggregation test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7142
GitOrigin-RevId: 66447f0bd7859b3fc5203d87cba5ea2c6d5f054e
2022-12-02 12:53:32 +00:00
Daniel Harvey
ef5e983aee [server/tests] simplify TestEnvironment
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7123
GitOrigin-RevId: 0a7313dab729de08e273ba06e47f656d766ff82a
2022-12-02 11:36:57 +00:00
Erik Magnusson
ffdc9ceca8 console: fix clone value handling for the insert tab
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7097
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: 483ce76f24234f76f3b557c892c62d891e542eb7
2022-12-02 10:55:56 +00:00
Daniele Cammareri
5f205a3f7d test: add snapshot check to action e2e test
## Description 🔖

This PR adds snapshot testing to e2e tests. The goal is to avoid regressions that involve metadata by checking:

- the payload of requests sent
- the metadata after modification (only relevant part of the metadata)

![image](https://user-images.githubusercontent.com/8408875/204244610-4486b689-d220-40ab-bc1d-9c7b1a1b232f.png)

We implemented this feature for one test, `actionWithTransform.e2e.test.ts` but this approach can be potentially used for other tests as well.

## Review checklist. 📋

- [ ] Run e2e tests

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7058
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
GitOrigin-RevId: 618147fad3f7d6849a0815b16c077efddef751ca
2022-12-02 10:03:39 +00:00
Daniel Harvey
16ecd63b01 [server/tests] don't do detailed teardown
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7128
GitOrigin-RevId: cbc52dadaca8ef7d4affb43528e8dcec0c8ec62e
2022-12-02 09:00:07 +00:00
Solomon
6c106c9e35 [GDC] Transform SourceConnConfig in runGetSourceTables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7112
GitOrigin-RevId: d6ab09ba001fa8d4d33cc8f669b588459360f910
2022-12-02 08:02:20 +00:00
Gil Mizrahi
e752010a83 Gil/fix feature matrix test and apply css
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7125
GitOrigin-RevId: fa051a4942a882efe6e3d673eab084b94ec8dd90
2022-12-01 19:26:39 +00:00
Shahidh K Muhammed
5873eb025e github md pages: update email address for security team
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7113
GitOrigin-RevId: f29224d486016ea8ef8bb6ff51d1059950509e02
2022-12-01 17:19:51 +00:00
Abby Sassel
13eb1122ed server/tests: Table Computed Fields > Postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7122
GitOrigin-RevId: e8c191a87465c1810908e8851bcc4b6919873bd8
2022-12-01 16:43:54 +00:00
Manas Agarwal
e008e113d3 Docs update for prometheus metrics addition of Postgres connections
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7090
GitOrigin-RevId: b5837af1960bfdb7c203b1d45b6548be1dfc31fe
2022-12-01 15:19:14 +00:00
Sean Park-Ross
6c2419c572 Docs: Updates Docusaurus to 2.2
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7110
GitOrigin-RevId: 1a2936c4b9bb49134f94bad821780cdfe9ff54a7
2022-12-01 14:59:59 +00:00
Gil Mizrahi
9ce6fe7197 Feature matrix standalone tester tool
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7120
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
GitOrigin-RevId: 5db7f8e24f22414805b10143248bfacfb5b7a03a
2022-12-01 14:48:55 +00:00
Daniele Cammareri
eec886da7b fix(console): fix action with transform e2e test
## Description

This PR fixes the test `actionWithTransform.e2e.test.ts`, failing only on CI (not on local builds). I've added some timeout when clearing the text areas; this probably fixes some issues due to debounce time.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7109
GitOrigin-RevId: 30efbc32bb804cc11d3e4af0f70b552512c6ded1
2022-12-01 09:49:16 +00:00
Anon Ray
b398001c87 server/gardening: drop an unnecessary field from 'ServeCtx'
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7108
GitOrigin-RevId: 50caff9e60d53261ce15870338bc3aa97c479190
2022-12-01 07:48:58 +00:00
Varun Dey
030f9f44f2 cli: Add cli-ext path option for Deploy API [GT-307]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7114
GitOrigin-RevId: 643639717f3bb18984a29b6f95dfbb3179c92064
2022-12-01 06:04:25 +00:00
Abhijeet Khangarot
1d9d48a165 console: update heap custom tracking event names
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7115
GitOrigin-RevId: 4017f0aec418d78f24f78e0a5b0cc28faa7b45d8
2022-12-01 05:28:38 +00:00
hasura-bot
24a117787b install manifests: update to Postgres 14
GITHUB_PR_NUMBER: 8754
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8754

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5367
Co-authored-by: arjunyel <11153289+arjunyel@users.noreply.github.com>
GitOrigin-RevId: ed4eff00c5a35f115c390fc44ac50b16f95d7fb4
2022-12-01 04:45:04 +00:00
David Overton
a18c6976f8 Map scalar types to GraphQL built-in types for parsing [GDC-587]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6818
GitOrigin-RevId: 6d1887fb7865fe8ec24a73c77da291c7ecf8dfd2
2022-12-01 00:08:40 +00:00
Jesse Hallett
d6b8f29383 server: implement codecs for table permissions
This PR implements the remaining codecs for table permissions. However the codec for boolean expressions delegates to Aeson instances because Autodocodec doesn't currently have the necessary feature to write a codec for boolean expressions that will reliably parse valid data.

Boolean expressions are objects with keys like `_and`, `_or`, `_exists`, or `<field name>`. The parsing rules for each value depend on the key, so we need to be able to select different codecs for each key. We could do that with an `object` codec, but that doesn't account for the arbitrary field name keys that can be provided. OpenAPI supports object types with "additional properties", but I don't know if we can declare a specific type for those properties. There might or might not be a reasonable path to extending Autodocodec to handle this case.

Ticket: [GDC-585](https://hasurahq.atlassian.net/browse/GDC-585)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6978
GitOrigin-RevId: 0b0dcfd59ebd1d5022ff2ab86dd8d4c6f93bd039
2022-11-30 19:33:16 +00:00
Auke Booij
512340b864 Collect Metadata dependencies in a Sequence rather than a list
Dependencies seem to get concatenated very often, so let's use a data structure that supports efficient concatenation.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7050
GitOrigin-RevId: 6331963f99f17d1b908a6038318d8c4834cf4dd7
2022-11-30 18:13:31 +00:00
kodiakhq[bot]
26ce8ff768 server: -O1 + -funfolding-use-threshold=640, for memory residency
...and keep binary size down using `--gc-sections` (supported by all major linkers). Stripped size after this PR is `85.3 Mb` down from `121 Mb` on `main`.

This compliments Auke's recent work (though there is some overlap). See: https://github.com/hasura/graphql-engine-mono/pull/7033#issuecomment-1326673632

Old experiments, for reference:
https://github.com/hasura/graphql-engine-mono/pull/6605
https://github.com/hasura/graphql-engine-mono/pull/6606
https://github.com/hasura/graphql-engine-mono/pull/6589

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7079
GitOrigin-RevId: 0b0d86730fb959d6249bd17a87e39af12ef71261
2022-11-30 17:05:15 +00:00
Daniel Harvey
fe40ece04f [ci] split out api-tests runs by backend
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7064
GitOrigin-RevId: b5e5a2e70b69fa901d375f229aa88aed80bcb848
2022-11-30 16:23:03 +00:00
Philip Lykke Carlsen
9bc1ff1d8e Structured logging in test-harness
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7092
GitOrigin-RevId: 201ee3ddc205bfc9d55c167e0b70b6606dbe4aa7
2022-11-30 12:12:21 +00:00
Erik Magnusson
e084126c73 console: upgrade nudging for oss users wanting to use ssl cockroach db
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7084
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: 4706cb52d46e22cfd3396233e6222f83dbc43cf7
2022-11-30 11:42:15 +00:00
Philip Lykke Carlsen
3d1c663f51 server/tests: Remove pytest version of TestGraphQLQueryBasicCitus
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7073
GitOrigin-RevId: 17c6f4848d3c8dfb268a04442ec3a95f117fef89
2022-11-30 11:08:07 +00:00
Abby Sassel
74e30b8b0b Server/tests: Scalar Computed Fields > Postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7094
GitOrigin-RevId: f5e632adc99ffa628a09d6703d2fdba9d2ade53e
2022-11-30 11:02:53 +00:00
Solomon
07682d4afb [Nix] Set nixpkgs to 22.11 and update flake lock.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7105
GitOrigin-RevId: 6428d585cd9402bbdd1e7a42459c82d2dd8d9279
2022-11-30 09:46:48 +00:00
Auke Booij
cfc9d7d219 server: build even more parts of the Schema Cache monadically
Rewrites the schema cache building code monadically for the following features as well:
- REST endpoints
- Cron triggers
- OpenTelemetry config
- Remote schema cache (post-introspection only), mainly remote schema relationships
- Actions
- Inherited roles

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7049
GitOrigin-RevId: c0727c6a170a27f722cc173973658ad201ebedb5
2022-11-30 09:12:15 +00:00