Commit Graph

8645 Commits

Author SHA1 Message Date
dependabot[bot]
13e39c7231 Bump syn from 2.0.71 to 2.0.72 (#861)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.71 to 2.0.72.

V3_GIT_ORIGIN_REV_ID: fcdab429e082ee272ee4011a27894dc73b14646e
2024-07-22 06:40:10 +00:00
Rob Dominguez
4244b0d87b Docs: Add keywords to support page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10940
GitOrigin-RevId: 7b8f4897512b047cb4ec8cd940e58d2dd7e9cb5c
2024-07-19 13:34:18 +00:00
Sean Park-Ross
7d6395fc67 Docs: Update banner text pointing to DDN
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10943
GitOrigin-RevId: 73e8e7867b1f4459891fb5594eb020ef06c8dcc1
2024-07-19 13:26:50 +00:00
Tom Harding
3f15dfd1f5 Don't set columns to NULL when nullable variables are omitted
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10921
GitOrigin-RevId: 01779e0d02d4de1ca56d84f3d11f5e7513b87676
2024-07-19 11:59:52 +00:00
Daniel Harvey
407c5b9ece Rename one of the ArgumentPreset types to DataConnectorArgumentPreset (#860)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

We're having issues with our deduplication of names in JSONSchema. We
would like to fix this, but in the short term, this renames a
conflicting object to avoid this quickly.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Rename `ArgumentPreset` in `open_dds::data_connectors` to
`DataConnectorArgumentPreset`.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: e3eafeffe8ba4d513f9d0a09a623f101650247ea
2024-07-19 09:10:29 +00:00
Samir Talwar
b8d7c6039b Use a test PostgreSQL image based on Debian, not Alpine.
Alpine is often slower than Debian (because musl is sometimes slower than glibc) and not how anyone actually deploys PostgreSQL in production.

Most notably, some floating-point computations result in slightly different values, and Debian ships with better support for different locales so sorting text (e.g. with `ORDER BY`) behaves differently.

Let's test against an environment that people are likely to actually use.

As a result, there are slight changes to the results of PostGIS computations in a couple of test cases.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10942
GitOrigin-RevId: 4caed19def23a372fc3930c409514b1c9b385026
2024-07-19 08:18:01 +00:00
paritosh-08
5a598875bb update changelog for v2024.07.18 (#854)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

update changelog for new release

### How

:)

V3_GIT_ORIGIN_REV_ID: 6620f9923f393d190f0f2fab1aced1cff4d6aec0
2024-07-18 13:55:28 +00:00
Daniel Harvey
34d1ac55fe Return AggregateExpressionError from aggregates stage (#843)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

This stage already has it's own error type, but it returns the larger
`Error` type, so let's return the more specific type instead.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Changing return types mostly. Functional no-op.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 2aae1f06775db6d88c34b1d3c1779396e0ba410e
2024-07-18 12:01:40 +00:00
Daniel Harvey
b7bf7fe677 Move data connector scalar types error into own type (#839)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

More breaking down the big error type, this time we sort the
`data_connector_scalar_types` stage. Functional no-op.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Move error cases into a smaller enum.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 50b699f3a77594deb27a6cc6ab8dd61752404daf
2024-07-18 10:59:42 +00:00
Rakesh Emmadi
561b908342 Implement remote relationship predicates in where filter clause (#761)
Now, users can filter their queries using remote relationships in the
filter predicate. Users need to provide the relationships for comparison
in `comparableRelationships` field of the newer `BooleanExpressionType`
opendd metadata.

Minimal Algorithm:
```
Relationship: ARemoteB => Model_A -> Model_B (remote NDC)
Column Mapping: (A_column_1, B_column_1), (A_column_2, B_column_2).

query:
  Model_A:
    where: ARemoteB: {B_column_3: {_eq: value}}

Step 1: Fetch RHS column values (in mapping) from remote target model
  SELECT B_column_1, B_column_2 from model_b_collection WHERE B_column_3 = value;
yields  the following rows
[
  [(B_column_1, b_value_1), (B_column_2, b_value_2)],
  [(B_column_1, b_value_11), (B_column_2, b_value_22)],
]

Step 2: Using above rows the generate LHS column filter for Model_A query.

SELECT <fields> from model_a_collection WHERE
  ((A_column_1 = b_value_1) AND (A_column_2 = b_value_2))
 OR ((A_column_1 = b_value_11) AND (A_column_2 = b_value_22))

The above comparison is equivalent to
WHERE
  (A_column_1, A_column_2) IN ((b_value_1, b_value_11), (b_value_2, b_value_22))

```

Sample query:
```graphql
query MyQuery {
 Track(
    where: {
      _or: [
        { AlbumRemote: { Artist: { ArtistId: { _eq: 2 } } } }
        { TrackId: { _eq: 3 } }
      ]
    }
  ) {
    TrackId
    AlbumRemote {
      Artist {
        ArtistId
        Name
      }
    }
  }
}
```
In the query above, `AlbumRemote` is a remote relationship which targets
a model backed by a different data connector.

V3_GIT_ORIGIN_REV_ID: 7aa76fcae83e1f22de460f1eef5648fb7a35c047
2024-07-18 07:47:04 +00:00
Daniel Harvey
342ff1fce6 Return BooleanExpressionError from object-boolean-expressions stage (#844)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Much like this change, but for the `object_boolean_expressions` stage:
https://github.com/hasura/v3-engine/pull/843

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 85da185b45bac429b754b0b92419f378a59fb536
2024-07-17 18:23:14 +00:00
Samir Talwar
9cad4dea99 server/tests-py: More useful messages when logging tests fail.
It's useful to know what caused the failure when parsing logs.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10938
GitOrigin-RevId: 53f3036625644a04bc5fd3afb150262515cfec29
2024-07-17 14:47:08 +00:00
Samir Talwar
b2ac4d82bc Remove the version from Docker Compose files.
Recent versions of Docker Compose no longer support this, instead just printing a warning.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10937
GitOrigin-RevId: 97a82968c48f5c09d6cbe74d8ea7386979e46e7a
2024-07-17 13:49:05 +00:00
Daniel Chambers
455724dd07 Fixed command targeted relationships not using data connector argument names (#841)
### What
This PR fixes an issue where relationships that target commands do not
correctly use the data connector's argument name when making the ndc
request. Instead, they use the OpenDD argument name, which is incorrect.

For metadata where the OpenDD argument name is the same as the data
connector's argument name, the code works but only coincidentally.

### How
I've updated an existing test to change the name of the command argument
to be different from the data connector's argument name. This test
failed but is now fixed by this PR, which simply looks up the name of
the data connector argument name and uses that instead.

V3_GIT_ORIGIN_REV_ID: 71f1e812174c7bb9922792523129e4bcdce911ed
2024-07-17 08:37:18 +00:00
Rob Dominguez
9f6ac66746 Bug Bash: Fix typo (#838)
### What

This closes hasura/graphql-engine#10433 and closes
hasura/v3-engine-multitenant#917

[DOCS-2225](https://hasurahq.atlassian.net/browse/DOCS-2225)

[DOCS-2225]:
https://hasurahq.atlassian.net/browse/DOCS-2225?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

V3_GIT_ORIGIN_REV_ID: 8c9d161af0737ecfee973d0083198617e21329de
2024-07-16 12:59:22 +00:00
Daniel Harvey
d7ca64b497 Disallow filtering on nested array (#837)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Filtering on nested arrays doesn't work, let's make sure it's not
allowed for now.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Adding a check in `boolean_expression_types` stage.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

---------

Co-authored-by: Gil Mizrahi <gil@gilmi.net>
V3_GIT_ORIGIN_REV_ID: cc08e8c24098c1fea9b6e1ee61b82ade989dd29a
2024-07-16 12:00:13 +00:00
Daniel Chambers
01539cd7c1 Upgrade ndc_models to v0.2.0-rc0 (#835)
This PR adds true support for ndc_models v0.2.0 to v3-engine. Note that
v0.2.0 is not finalized yet, so we're pointing at v0.2.0-rc0. The
support still comes via the migration methodology, where v0.2.x ndc
models are downgraded to v0.1.x to support backwards compatibility. In
the future we want to remove this and have the engine generate the
different versioned ndc models separately instead of performing a
migration.

The ndc_models_v01 crate reference has been bumped to the official
v0.1.5 version, which brings the newtypes to the v0.1.x version. The
ndc_models crate reference is now on v0.2.0-rc0.

The custom connector has been updated to support ndc-spec v0.2.0. All
tests that talk to the custom connector have been updated with its
latest v0.2.0 schema/capabilities.

In `metadata_resolve` the v01->v02 schema/capabilities migration code
has been updated to handle the new v0.2.0 types. This includes inferring
v0.2.0 capabilities from what was possible in v0.1.x.

In `execution`, the migration code has been updated to deal with the new
v0.1.5 newtypes and v0.2.0 types. This means there are now cases where a
downgrade is impossible and produces an error (see `NdcDowngradeError`
in `execute::ndc::migration`). A bug has also been fixed where NDC
expressions in arguments were not being serialized to the correct NDC
version.

V3_GIT_ORIGIN_REV_ID: 5b4afcde64c307b2bd7c985c588d6c74d9623a0f
2024-07-16 01:53:42 +00:00
dependabot[bot]
b1be9fd5ca Bump datafusion from 39.0.0 to 40.0.0 (#831)
Bumps [datafusion](https://github.com/apache/datafusion) from 39.0.0 to 40.0.0.

V3_GIT_ORIGIN_REV_ID: 9712564df13c0e6f9bd2f551566385f8a9fe86c8
2024-07-15 11:14:51 +00:00
dependabot[bot]
c9793ee896 Bump syn from 2.0.69 to 2.0.71 (#834)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.69 to 2.0.71.

V3_GIT_ORIGIN_REV_ID: 0023e5f93ccda2488193e794612fcf8794b983ef
2024-07-15 09:15:33 +00:00
dependabot[bot]
4443f13a4c Bump thiserror from 1.0.61 to 1.0.62 (#833)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.61 to 1.0.62.

V3_GIT_ORIGIN_REV_ID: 9eff61a55f560e8a1e336c70417ddd8730338fbb
2024-07-15 08:45:06 +00:00
dependabot[bot]
ffb3c81040 Bump clap from 4.5.8 to 4.5.9 (#832)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.8 to 4.5.9.

V3_GIT_ORIGIN_REV_ID: 338ed8199cb2e1b766e18b01be32990454583577
2024-07-15 08:16:06 +00:00
dependabot[bot]
0e857c40f5 Bump bytes from 1.6.0 to 1.6.1 (#830)
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.6.0 to 1.6.1.

V3_GIT_ORIGIN_REV_ID: dcf11adbb1a9b80b56c520e0c65b0bd82f0bce39
2024-07-15 07:42:01 +00:00
Daniel Harvey
488c29156c Combine all Relay errors (#825)
### What
Much like https://github.com/hasura/v3-engine/pull/824, we combine
relay-related errors into `RelayError`.

### How
Remove them from the big `Error` type.

---------

Co-authored-by: Daniel Chambers <daniel@hasura.io>
V3_GIT_ORIGIN_REV_ID: b26460c6aa4d622c6f5548e5cd294c7480acdca4
2024-07-15 06:12:28 +00:00
Daniel Harvey
aec5a6d0cb Split boolean expression errors (#829)
### What
Part of ongoing tidy up of errors, this splits out errors types for the
boolean expression stages.

### How
Remove things from `Error`, move files around. Functional no-op.

V3_GIT_ORIGIN_REV_ID: ccf1f29600a169a3787d744c7f60e79220aef8d2
2024-07-15 05:31:57 +00:00
Daniel Harvey
db96e42358 Explicitly import thiserror::Error in place (#827)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

To stop us being confused between `Error` type and `Error` trait.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Import `thiserror::Error` explicitly in place.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: b930480927b2c64537960cfb69f2b2b30921f4fd
2024-07-11 15:18:27 +00:00
Daniel Chambers
7efcb2e4f6 Fix custom connector schema and update all tests to use up-to-date schema (#826)
This PR fixes the custom connector whose schema endpoint doesn't
actually return correct output (it was missing some
functions/procedures, etc). Then it updates all tests that actually talk
to the custom connector with the latest version of its
schema/capabilities in their DataConnectorLink.

This test update is done by a new script added to the justfile that
finds and patches all metadata json files and inserts the new schema and
capabilities after reading them from the custom connector running in
docker.

V3_GIT_ORIGIN_REV_ID: f1825a6f74ddcb6c01198fe4a41de6b4fc0bf533
2024-07-11 14:15:58 +00:00
Daniel Harvey
63279ccb38 Combine all Apollo errors (#824)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

As a treat, combine all Apollo errors into one enum.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Remove items from `ObjectTypesError` and `Error`.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 5a16a030b35372283490f3de7343fcfca2fadea5
2024-07-11 10:16:24 +00:00
Samir Talwar
62fa071663 Use the release version as the relevant tracing attribute. (#823)
### What

And don't set it except for the main application; tests and test
infrastructure does not care.

### How

We use the `VERSION` constant, populated from the `RELEASE_VERSION`
environment variable at build time.

It's now also optional so tests don't have to specify it.

V3_GIT_ORIGIN_REV_ID: 1bfc2efb060307cc9446bf07e944e107f0607ae0
2024-07-11 07:32:30 +00:00
ashwiniag
43028b6c66 ci: catalog update v2.41.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10930
GitOrigin-RevId: 3570f0999d0bafa9b22f89baf38f7494e7bd8de4
2024-07-10 10:48:55 +00:00
Daniel Harvey
44b07f8055 release v2024.07.10 (#818)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Update changelogs for new release.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 7adfd3c2c53b912bb7c4604ebed93601a201c15e
2024-07-10 10:00:03 +00:00
Daniel Chambers
cf44277811 Removed ndc_models usage from field arguments IR (#816)
This PR removes the usage of ndc_models in the field arguments IR and
uses the actual arguments IR instead. This change was missed in #810.

V3_GIT_ORIGIN_REV_ID: 414b4eda9724e7702b5a09ea2855b457d7ce88d6
2024-07-10 07:44:35 +00:00
Daniel Harvey
ab1d963de0 Split ValueExpression (#812)
### What
`ValueExpression` contained boolean expressions, and was used in places
where boolean expressions were not allowed.

### How
This creates a new type `ValueExpressionOrPredicate`, and uses it in the
places where boolean expressions are allowed.

---------

Co-authored-by: Daniel Chambers <daniel@hasura.io>
V3_GIT_ORIGIN_REV_ID: c0a07c5e0096aeb4369ca7d6b5147451d1ccd14d
2024-07-10 02:30:09 +00:00
Brandon Martin
b2e0843045 Add python script to get cabal package licenses
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10928
GitOrigin-RevId: d26495c8c9975b9e4f98e322b6d5b2977e66c247
2024-07-09 21:39:07 +00:00
Shahidh K Muhammed
a94bace075 docs: update the dependencies to include console as well
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10927
GitOrigin-RevId: b85d3bf57d78996451ef548708186348ad09f823
2024-07-09 21:09:13 +00:00
Daniel Harvey
f6f4785e7c Error type for object_types stage (#814)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Break down the big `Error` enum some more. This time, add all errors
from the `object_types` stage into the `ObjectTypesError` enum.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Moving code around. Functional no-op.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 154d4b40b21365c783d545a23cf18be623f2a3de
2024-07-09 20:21:46 +00:00
Shahidh K Muhammed
1e8096b1a3 docs: update ee 3rd party dependency list
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10924
GitOrigin-RevId: 33884b2efd254db70a100f398546cb8b2468a759
2024-07-09 19:35:34 +00:00
Daniel Harvey
55dcab09b1 Split up apollo and relay stages (#815)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

In the haste of breaking things up, realised we put the `relay` checks
in with the `apollo` ones where they are two separate things.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Split up `apollo` step into `relay` and `apollo` steps. Functional
no-op.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 8d02d3cb77b1248239be37ed61d0b87b9b734fdf
2024-07-09 17:19:37 +00:00
Daniel Harvey
788fd9e197 Newtypes around object collections (#807)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

We pass around a lot of `BTreeMap` and `IndexMap` types. This has two
problems:

a) everytime we change the items inside, we have to manually update lots
of call sites
b) we can't attach useful behaviour to it

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

This adds some wrappers around `object_types`, and adds a `.get()`
function with a useful default error. This error only contains the
missing `type_name`, so the idea is that it would be wrapped in another
error that would provide more context. The hope is that we can get away
from one giant error enum, and instead have a set of smaller error types
that live along each resolving stage.

In isolation this PR isn't very interesting, as it's a tiny drop in the
ocean, so really it's here to say, "is this a thing we vaguely like?"

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 804a703d7155ce5b929937689d5649c6571357b0
2024-07-09 16:26:58 +00:00
Daniel Harvey
adc1ad5bf9 Break out DataConnectorError (#813)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Put all the errors that happen in the `data_connectors` stage into a new
type `DataConnectorError`.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Moving enum members to the new type. Functional no-op.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 2e50eb561ce6b7c7fac4de4b31c9957f7ee4696c
2024-07-09 15:55:22 +00:00
Varun Choudhary
eca38b949d console: fix import api kriti template issue
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10923
GitOrigin-RevId: c83c53fabfd8fe6d1e4f8319770ce915d604ea6f
2024-07-09 15:40:19 +00:00
Rob Dominguez
989a595f20 Docs: Add support ticket information
[DOCS-2156]: https://hasurahq.atlassian.net/browse/DOCS-2156?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10913
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 50d74ee9a460a8942f97b8c5a013d82ffb60b967
2024-07-09 15:00:52 +00:00
Daniel Harvey
054600d4d3 Move errors to type_permissions stage (#809)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Much like https://github.com/hasura/v3-engine/pull/808, move an error to
the place it is thrown.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Move files around. Functional no-op.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: a61527b57662efada2c7d2049e12f103deec1e4e
2024-07-09 11:58:57 +00:00
Daniel Harvey
83df9e81bb Move GraphqlConfigError to graphql_config stage (#808)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

We have a giant error file in `metadata-resolve`, and it's really
unclear what can go wrong where. Let's improve it in some small way.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Move `GraphqlConfigError` to the `graphql_config` stage, and make that
stage only return that kind of error.

Functional no-op.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

---------

Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: 9aa58875a24d66e6945c9ead6434fedb124f1dd8
2024-07-09 10:02:40 +00:00
Daniel Chambers
1564fcce17 Remove usage of ndc_models Expression types from the IR (#810)
This PR removes the usage of `ndc_models` `Expression` types from the
IR. It then adds logic to map from the new IR `FilterExpression` types
to `ndc_models` types in the plan part of the code where IR ->
ndc_models mapping is performed. The new IR types and the change to the
IR creation logic is mostly in `crates/execute/src/ir/filter.rs`.

The new IR types have some optimisations applied to them. In particular,
some basic boolean expression simplification logic is applied when
`FilterExpression::mk_and` `mk_or` and `mk_not` are used. This strips
out redundant and/ors/nots resulting in simpler boolexps for connectors
to process. (This logic is similar to what GDC did in Hasura v2).

Unfortunately it turned out that arguments had JSON-serialized
`ndc_models` types embedded in them, in particular, where argument
presets had been used to set a BooleanExpression as an argument value.
The old code was simply creating an ndc_models::Expression and
serializing it directly to JSON. This has now been refactored to retain
the new IR `FilterExpression` until `plan` time, at which point it will
be mapped into the ndc type and serialized to JSON and embedded in the
argument value. The types change for this can be seen in
`crates/execute/src/ir/arguments.rs`, but the real logic is actually in
`crates/execute/src/ir/permissions.rs`, with the
`make_value_from_value_expression` and
`make_argument_from_value_expression` functions.

The mapping of expression and argument IR into `ndc_models` can be found
in `crates/execute/src/plan/common.rs`.

In `metadata_resolve`, some ndc_models types were removed and
non-ndc_model types were used instead. In particular
`ndc_models::ComparisonOperatorName` (swapped with
`DataConnectorOperatorName`) and `ndc_models::UnaryComparisonOperator`
(swapped with a new `UnaryComparisonOperator` enum type).

This PR is a functional no-op, other than the boolean expression
simplification.

V3_GIT_ORIGIN_REV_ID: 13805430fb2e2ca5653406a094d719138f0d5b51
2024-07-09 08:23:24 +00:00
dependabot[bot]
f8a2abc0df Bump serde from 1.0.203 to 1.0.204 (#801)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.203 to 1.0.204.

V3_GIT_ORIGIN_REV_ID: cbe13bf30a6aa7cc5480d174d7d435f18a5cc7f2
2024-07-09 06:54:43 +00:00
Daniel Harvey
8579570459 Add deprecation notice to old boolean expression types (#806)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Since these code comments end up in the docs, let's make sure we point
out these old types are no longer in favour.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

Updating doc comments.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: a21190fbf2327e1ae265c76d1f467af063f1dd64
2024-07-08 14:19:28 +00:00
Daniel Harvey
29ccf96784 Skip capability check for local relationships (#805)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

If the target data connector for a relationship does not have the
`foreach` capability, we threw an error, however we should allow this.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

Check data connector names for relationship target before throwing
capability error.

V3_GIT_ORIGIN_REV_ID: 157908f0077b7c3af67a77600e5f8c9fc65df7f2
2024-07-08 13:03:13 +00:00
Anon Ray
aa77448b2f docs: document known issue of invalid JWT padding by AWS Cognito + ELB
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10919
GitOrigin-RevId: 682d3918a3f018fd6c7d1d6a2b9ecdb6fca66df1
2024-07-08 12:18:03 +00:00
dependabot[bot]
7a0eb6847a Bump async-trait from 0.1.80 to 0.1.81 (#804)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.80 to 0.1.81.

V3_GIT_ORIGIN_REV_ID: 1e9a6a6a40b6b0f732774df1e7a52b8a182f70c1
2024-07-08 08:32:04 +00:00
dependabot[bot]
0d9bb020f1 Bump serde_json from 1.0.119 to 1.0.120 (#803)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.119 to 1.0.120.

V3_GIT_ORIGIN_REV_ID: 0c432282a8ae7daaca22a608881ed0f69da8dd4a
2024-07-08 08:02:06 +00:00