<!-- The PR description should answer 2 important questions: -->
### What
Add and fix missing parts of new `graphql-frontend` execution steps
added in #1380
Takes broken tests from
<img width="938" alt="Screenshot 2024-11-25 at 17 00 16"
src="https://github.com/user-attachments/assets/ac78c6b1-20b3-4ad1-9d25-882c61d46550">
to
<img width="733" alt="Screenshot 2024-11-26 at 12 44 47"
src="https://github.com/user-attachments/assets/3b7aea84-ccb2-484c-bde8-5aad8c2a6caa">
...which is nice.
The remaining breakages should be because of missing remote predicates
in the new pipeline.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: df9721d8c6c198908ca161e4e0ca1e91301c3541
<!-- The PR description should answer 2 important questions: -->
### What
This is default behaviour which we remove by using `--package ..`, this
re-adds it.
V3_GIT_ORIGIN_REV_ID: bfe33094716354d7ff96f110fb70696ce6630cd5
<!-- The PR description should answer 2 important questions: -->
### What
Required in execution refactor, pulled into separate no-op PR to reduce
noise there.
V3_GIT_ORIGIN_REV_ID: 79459c2e11364ff32836d435593525a09197a33b
~~Note: currently stacked on #1367, will rebase on main when that
merges.~~ Rebased on main.
### What
The following invalid situations are currently allowed:
* In scalar bool exps, duplicate comparision operators are allowed
* In bool exps, logical operator names are allowed to be the same as
other fields
* In scalar bool exps, the is null operator name is allowed to be the
same as other fields
* In object bool exps, comparable fields are allowed to be duplicated
* In object bool exps, comparable relationships are allowed to be
duplicated
These edge cases are now properly validated for and blocked with an
error. The error is raised as an issue, so that for old builds it can be
allowed through as a warning. This is based on a new compatibility flag.
### How
New validation code has been added to
`crates/metadata-resolve/src/stages/scalar_boolean_expressions/scalar.rs`
and `crates/metadata-resolve/src/stages/boolean_expressions/graphql.rs`
that checks for duplicate field names and raises issues.
V3_GIT_ORIGIN_REV_ID: fc4cdb9e34d8810c5e715a18eab866c53deb3fb9
<!-- The PR description should answer 2 important questions: -->
### What
The `execute` crate doesn't need to know about generating
`QueryExecutionPlan` etc from GraphQL IR. We move the planning to
`graphql-ir`. It is mostly moved, this is a large enough set to merge to
keep the size down.
This creates a new pipeline that is only switched when a static value is
changed. This allows iterating on it without breaking the engine.
V3_GIT_ORIGIN_REV_ID: a45874c026778071be2300bc915954824618fe14
<!-- The PR description should answer 2 important questions: -->
### What
Changelog update for `v2024.11.25`
V3_GIT_ORIGIN_REV_ID: 310a0f5254af814185403b213ea388c4be68ecf8
<!-- The PR description should answer 2 important questions: -->
### What
<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->
<!-- Consider: do we need to add a changelog entry? -->
<!-- Does this PR introduce new validation that might break old builds?
-->
<!-- Consider: do we need to put new checks behind a flag? -->
Note: Changelog not required as the relationships support in json:API is
not yet released.
In JSON:API - fix the output schema in the openapi schema generation by
including the components of the relationships schema.
### How
- Add functions to handle the relationship fields from the `ObjectType`
in schema generation code.
- Update the existing tests.
<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
V3_GIT_ORIGIN_REV_ID: 97f98af94a2e6551068bf786c8b20101128b1c33
<!-- The PR description should answer 2 important questions: -->
### What
We already do this logic in two places, to save me doing it in a third,
resolving this earlier.
If a relationship field on a boolean expression is not specified, we
fall back to the filter expression on the target model.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 435f73426362bfb72096059d3b212208aa1b0b84
### What
This PR adds support for logical operators at the scalar boolean
expression level. Metadata already let you declare that you wanted this,
but we never actually implemented it. This has been rectified!
The feature has been gated behind a compatibility flag because users
very likely have it already turned on in Metadata, so actually doing
what they asked for will result in a GraphQL schema diff breaking
change. A warning is raised if the user has this enabled but doesn't
actually work because their compatibility date is too young.
### How
Logical operator metadata resolve code has been moved from
`aggregate_boolean_expressions` into `scalar_boolean_expressions` so it
can be reused for both (scalars come before aggregate bool exps). This
is then used to resolve the logical operators setting on scalar boolean
expressions.
In `graphql/schema` the logical operator annotations have been
rearranged to allow for reuse of code. The same function
`build_logical_operators_schema` is used to generate these annotations
across object and scalar boolean expressions.
These annotations are then consumed by `graphql/ir` which now handles
them for scalar boolean expressions.
The metadata resolve test
`passing/boolean_expression_type/basic_with_scalar_logical_operators/metadata.json`
tests resolving logical operators in scalar boolean expressions. All
other tests snapshots have the new warning captured in them.
The engine test `execute/models/select_many/where/simple/request.gql`
has been updated to also test the new functionality. It got converted
from using ObjectBooleanExpressionType to BooleanExpressionType in order
to do this. I also beefed up its testing of permissions by actually
having some defined.
V3_GIT_ORIGIN_REV_ID: 0a7541bea5ff67dbf07ee373ba3cc8c230eea853
### What
This PR makes the docker-compose.yaml useful for both running the engine
in docker as well as when the engine is running locally on the host.
This enables a new `just start-engine` target that runs the engine
locally while using the same deps and configuration as in
docker-compose.yaml. Running engine this way is faster than constantly
rebuilding in Docker.
### How
The various component in docker-compose.yaml are configured to talk to
one another via `local.hasura.dev` in the same way as Hasura projects
are done via `ddn`. This enables the engine to not care whether it is
running on the host machine directly via cargo or inside a docker
container.
The Dockerfile has also been simplified a little and now only builds the
engine, not every single crate.
V3_GIT_ORIGIN_REV_ID: b17b066fc204fd76b74633990b9862f5db4f180a
Bumps [url](https://github.com/servo/rust-url) from 2.5.3 to 2.5.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/servo/rust-url/releases">url's
releases</a>.</em></p>
<blockquote>
<h2>v2.5.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Revert "Normalize URL paths: convert /.//p, /..//p, and //p to
p (<a
href="https://redirect.github.com/servo/rust-url/issues/943">#943</a>)"
by <a href="https://github.com/valenting"><code>@valenting</code></a>
in <a
href="https://redirect.github.com/servo/rust-url/pull/999">servo/rust-url#999</a></li>
<li>Updates the MSRV to 1.63 required though the libc v0.2.164
dependency</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4">https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d77dfb467f"><code>d77dfb4</code></a>
Revert "Normalize URL paths: convert /.//p, /..//p, and //p to p
(<a
href="https://redirect.github.com/servo/rust-url/issues/943">#943</a>)"
(<a
href="https://redirect.github.com/servo/rust-url/issues/999">#999</a>)</li>
<li><a
href="da649031b9"><code>da64903</code></a>
Change no_std to no-std in Cargo.toml (<a
href="https://redirect.github.com/servo/rust-url/issues/991">#991</a>)</li>
<li>See full diff in <a
href="https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=url&package-manager=cargo&previous-version=2.5.3&new-version=2.5.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: f7ec4dceef4056ffe2f69065720b6075797b8404
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.20 to 4.5.21.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.21</h2>
<h2>[4.5.21] - 2024-11-13</h2>
<h3>Fixes</h3>
<ul>
<li><em>(parser)</em> Ensure defaults are filled in on error with
<code>ignore_errors(true)</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.21] - 2024-11-13</h2>
<h3>Fixes</h3>
<ul>
<li><em>(parser)</em> Ensure defaults are filled in on error with
<code>ignore_errors(true)</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="03d722625a"><code>03d7226</code></a>
chore: Release</li>
<li><a
href="3df70fb2b6"><code>3df70fb</code></a>
docs: Update changelog</li>
<li><a
href="3266c36abf"><code>3266c36</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5691">#5691</a>
from epage/custom</li>
<li><a
href="951762db57"><code>951762d</code></a>
feat(complete): Allow any OsString-compatible type to be a
CompletionCandidate</li>
<li><a
href="bb6493e890"><code>bb6493e</code></a>
feat(complete): Offer - as a path option</li>
<li><a
href="27b348dbcb"><code>27b348d</code></a>
refactor(complete): Simplify ArgValueCandidates code</li>
<li><a
href="49b8108f8c"><code>49b8108</code></a>
feat(complete): Add PathCompleter</li>
<li><a
href="82a360aa54"><code>82a360a</code></a>
feat(complete): Add ArgValueCompleter</li>
<li><a
href="47aedc6906"><code>47aedc6</code></a>
fix(complete): Ensure paths are sorted</li>
<li><a
href="431e2bc931"><code>431e2bc</code></a>
test(complete): Ensure ArgValueCandidates get filtered</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.20...clap_complete-v4.5.21">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.20&new-version=4.5.21)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 52969c82c421ad5a486076cd9c96aa8d6e3146e8
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.87 to 2.0.89.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/syn/releases">syn's
releases</a>.</em></p>
<blockquote>
<h2>2.0.89</h2>
<ul>
<li>Fix <em>"compiler/fallback mismatch 949"</em> panic (<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/483">dtolnay/proc-macro2#483</a>)</li>
</ul>
<h2>2.0.88</h2>
<ul>
<li>Improve error recovery in <code>parse_str</code> (<a
href="https://redirect.github.com/dtolnay/syn/issues/1783">#1783</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="06af36b972"><code>06af36b</code></a>
Release 2.0.89</li>
<li><a
href="42b4747250"><code>42b4747</code></a>
Fix "compiler/fallback mismatch 949" panic</li>
<li><a
href="424e484905"><code>424e484</code></a>
Release 2.0.88</li>
<li><a
href="2375d9ac01"><code>2375d9a</code></a>
Pull in proc-macro2 FromStr's more robust error recovery</li>
<li><a
href="f46a6f3224"><code>f46a6f3</code></a>
Update test suite to nightly-2024-11-18</li>
<li><a
href="fc133ebb03"><code>fc133eb</code></a>
Resolve unnecessary_map_or clippy lint</li>
<li><a
href="0ccac34ff9"><code>0ccac34</code></a>
Resolve question_mark clippy lint</li>
<li><a
href="5c1c057bfb"><code>5c1c057</code></a>
Disable toml "display" feature</li>
<li><a
href="5bbe46a8c8"><code>5bbe46a</code></a>
Prevent upload-artifact step from causing CI failure</li>
<li><a
href="2b45e9331e"><code>2b45e93</code></a>
Raise minimum version for syn-codegen crate to Rust 1.65</li>
<li>See full diff in <a
href="https://github.com/dtolnay/syn/compare/2.0.87...2.0.89">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=syn&package-manager=cargo&previous-version=2.0.87&new-version=2.0.89)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: aaafda56a5aec6c9369d9f0c9f43cc270bae0b15
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.89
to 1.0.92.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/proc-macro2/releases">proc-macro2's
releases</a>.</em></p>
<blockquote>
<h2>1.0.92</h2>
<ul>
<li>Improve compiler/fallback mismatch panic message (<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/487">#487</a>)</li>
</ul>
<h2>1.0.91</h2>
<ul>
<li>Fix panic <em>"compiler/fallback mismatch 949"</em> when
using TokenStream::from_str from inside a proc macro to parse a string
containing doc comment (<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/484">#484</a>)</li>
</ul>
<h2>1.0.90</h2>
<ul>
<li>Improve error recovery in TokenStream's and Literal's FromStr
implementations to work around <a
href="https://redirect.github.com/rust-lang/rust/issues/58736">rust-lang/rust#58736</a>
such that rustc does not poison compilation on codepaths that should be
recoverable errors (<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/477">#477</a>,
<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/478">#478</a>,
<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/479">#479</a>,
<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/480">#480</a>,
<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/481">#481</a>,
<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/482">#482</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="acc7d36820"><code>acc7d36</code></a>
Release 1.0.92</li>
<li><a
href="0cb443d935"><code>0cb443d</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/487">#487</a>
from dtolnay/mismatchline</li>
<li><a
href="ae478edd07"><code>ae478ed</code></a>
Change mismatch panic message to avoid github linkifying</li>
<li><a
href="5046761b96"><code>5046761</code></a>
Release 1.0.91</li>
<li><a
href="27c54948b3"><code>27c5494</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/486">#486</a>
from dtolnay/compilerlex</li>
<li><a
href="a9146d6cb5"><code>a9146d6</code></a>
Ensure that compiler tokenstream parsing only produces a compiler
lexerror</li>
<li><a
href="1ce5f04a7e"><code>1ce5f04</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/485">#485</a>
from dtolnay/fallbackident</li>
<li><a
href="75d0818922"><code>75d0818</code></a>
Make parser's fallback Ident symmetric with Group and Literal</li>
<li><a
href="56c3e31df2"><code>56c3e31</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/484">#484</a>
from dtolnay/fbliteral</li>
<li><a
href="d2c0e611fd"><code>d2c0e61</code></a>
Fix spanned fallback literal construction</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/proc-macro2/compare/1.0.89...1.0.92">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=proc-macro2&package-manager=cargo&previous-version=1.0.89&new-version=1.0.92)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: ab770bbcd6920bc7886c2c041626bb9ef1659409
<!-- The PR description should answer 2 important questions: -->
### What
Don't know how these got here, they make git clone difficult.
V3_GIT_ORIGIN_REV_ID: d3aad62587f9f4d2ebdac8aa2c5070a07acffcda
<!-- The PR description should answer 2 important questions: -->
### What
This PR removes the parametric `TFilterExpression` that lives all over
`execute` in favour of explicit types from `plan-types`. It means we can
remove a bunch of NDC request code we recently duplicated too, great.
Functional no-op.
Stacked on top of #1368
V3_GIT_ORIGIN_REV_ID: 6c8a94d507fb74be9d6f529023423dad2b1899af
<!-- The PR description should answer 2 important questions: -->
### What
Incrementally moving to new execution plan stuff - this removes more
duplicates types from `execute::plan` and makes the new OpenDD pipeline
use the new types and execution functions.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: c258e5e2991504fc8fbea6cce8e3135a2170f2f3
This gets us much smaller artifacts with very little additional latency.
Artifact sizes become:
**74% smaller** for chinook
**94% smaller** for the realistic big schema (38MB vs. 611MB)
...with only a 5% or so latency regression.
Also did quite a bit of refactoring to try to tighten things up and
clarify the encoding story.
<!-- The PR description should answer 2 important questions: -->
V3_GIT_ORIGIN_REV_ID: af810506e0c1831d357d725a5530466788017165
<!-- The PR description should answer 2 important questions: -->
### What
These cause trouble when pulling the Git repo:
https://github.com/hasura/graphql-engine/issues/10539
V3_GIT_ORIGIN_REV_ID: 28b9ee6a7860c2712dcc4032729511a211a13d01
<!-- The PR description should answer 2 important questions: -->
### What
Changing all of this code in situ is going to be extremely painful, so
instead we're taking the approach of copying small sections, making them
typecheck with the new set of types, and integrating them bit by bit.
This adds a version of the execution steps in `execute`, using the new
types. The next PR to follow will change the OpenDD pipeline to use
them, as remote predicates aren't implemented there so we can defer
implementing them in the new system.
V3_GIT_ORIGIN_REV_ID: 98d1bfa4753edf7d9a9f0b9d1e617a0a760d5862
<!-- The PR description should answer 2 important questions: -->
### What
It's helpful (given the CLI's version of our metadata format) to talk
about configuration in terms of subgraphs as well as the JSON structure
that MBS ingests. This PR updates the error contexts to contain that
name. Here's an example:
```json
{
"errors": [
{
"context": [
{
"message": "Data connector name given here",
"path": [
{
"Key": "subgraphs"
},
{
"Index": 0
},
{
"Key": "objects"
},
{
"Index": 0
},
{
"Key": "definition"
},
{
"Key": "source"
},
{
"Key": "dataConnectorName"
}
],
"subgraph": "default"
}
],
"path": null,
"code": "opendds-validation",
"message": "invalid metadata: error building schema: invalid metadata: the source data connector b (in subgraph default) for model Artists (in subgraph default) has not been defined"
}
]
}
```
As we can see, the `subgraph` key tells us what the subgraph is. Note
that the path contains the fact that we have a subgraphs array, so this
will need removing by a CLI tool if a subgraph is present. Not doing
this on the server side means we can write non-CLI tooling around these
errors as well.
### How
We just add the `subgraph` key to the error context, and fix the raw
metadata deserializers. I'm not sure why these are separate to the
standard opendd deserializers.
V3_GIT_ORIGIN_REV_ID: 3c50bcc649e2842b35a2f05059c2f795c620ea23
### What
This PR reworks the GraphQL schema annotation types and IR parsing for
boolean expressions. This was required because the existing code was
quite tangled and broken as it did not properly handled nested fields.
For example, it had the following issues:
* If you use more than one nested field in a single where, an invalid
NDC query is generated with mangled field paths
* If you use logical operators inside a nested field, an internal error
occurs
The new annotation structure and IR parsing code cleanly matches the two
types of boolean expressions we currently have: object boolean
expressions and scalar boolean expressions. The new parsing code
correctly tracks nested fields and allows arbitrary nesting of object
boolean expressions (and therefore logical operators at the object
boolean expression level).
### How
In `crates/graphql/schema/src/types.rs` `BooleanExpressionAnnotation`
has been reworked to capture the two different types of boolean
expressions. It now has the two `ObjectBooleanExpressionField` and
`ScalarBooleanExpressionField` variants, which are used to denote fields
on each of the different types of boolean expression objects. Previously
scalar boolean expression annotations lived on `ModelInputAnnotation`,
muddying the waters.
Then in `crates/graphql/ir/src/filter.rs`, we have
`resolve_object_boolean_expression` and
`resolve_scalar_boolean_expression` which are capable of reading the
respective variants of boolean expressions.
`resolve_object_boolean_expression` is recursive, and so nested logical
operators are handled naturally. As nested fields are descended through,
this is kept track of with `column_path`.
Some new fields were added to the existing nested object test
(`crates/engine/tests/execute/models/select_many/where/nested_select/object/request.gql`)
to capture and test the previously broken scenarios.
A minor fix was made to `crates/graphql/frontend/src/to_opendd_ir.rs`
because it did not handle multiple root fields properly, as it did not
use the root field aliases and ended up overwriting the same query over
and over. This resulted in many snapshots getting updated, even though
they are unrelated to the real change in this PR.
V3_GIT_ORIGIN_REV_ID: f7cbbe8c86f542150e0ce247c6597df717836c06
<!-- The PR description should answer 2 important questions: -->
### What
Adds the types required for the new execution planning to the
`plan-types` crate. Some of these lived in `graphql-ir`, so have been
removed from there. Functional no-op.
V3_GIT_ORIGIN_REV_ID: 0e39aca2d35a7fe69382363b2cef8a028e9be86e
### What
If an NDC v0.2.0 connector declares they don't support nested
relationships in its capabilities, then we use the engine's remote joins
functionality to perform selection across nested relationships anyway.
Note that filtering or ordering by nested relationships is still not
supported.
### How
The function that everything uses to determine whether a relationship is
to be done via remote joins or not
(`crates/metadata-resolve/src/stages/object_relationships/mod.rs::relationship_execution_category`)
has been updated to require being told about "FieldNestedness". This
describes whether the field is object or array nested. It then looks at
the capabilities and requires a remote join if the connector does not
support nested relationships.
The relationship capabilities stored against relationships in
metadata_resolve is now a copy of the detailed relationship capabilities
from the data connector (see `get_relationship_capabilities`).
In graphql IR and schema, all usages of the
`relationship_execution_category` now need to tell it about the
`FieldNestedness`. So they now keep track of the nestedness of the
relationship field they're looking at.
In `crates/execute/src/plan/relationships.rs`, usages of
`relationship_execution_category` were removed because it was being used
to check if the local relationship (ie not a remote join) being looked
at was actually a local relationship and not a remote one. However, this
is unnecessary as this determination was already made when the IR was
created and does not need to be checked again here.
To test these changes, a new test was added:
`crates/engine/tests/execute/relationships/nested/selection_no_nested_capability`.
This test needed a connector that does not support relationships so that
remote joins code paths would be exercised. To support this, the custom
connector now takes a new env var `ENABLE_RELATIONSHIP_SUPPORT` that
explicitly turns on support for relationships. A new instance of the
connector has been added to the `ci.docker-compose.yaml` with this
disabled. This is new connector instance is then used to perform the
test.
V3_GIT_ORIGIN_REV_ID: 476f7ec0469eed698ed9bcf49f73372b6cee0c6c
<!-- The PR description should answer 2 important questions: -->
### What
Remove copies of metadata from SQL artifacts:
Resulting in **19% smaller artifact** for chinook, **17% faster
runtime**.
Customer metadata with multiple subgraphs will show more dramatic
effect.
There was a separate copy of the metadata stored for each subgraph in
the sql "catalog". From the point of view of MBS we were serializing 2+N
copies of the same metadata which bloats artifacts and is very slow.
Additionally the usage sites became confusing because you had multiple
identical (we assume) copies of metadata in scope at the same time.
Instead we reconstruct the original Catalog type before use, because
it's required for the Datafusion impls
### How
convert to a different type for serialization, re-hydrate in body of sql
code
V3_GIT_ORIGIN_REV_ID: 0e7e35255cfe8fe01ea328a1d7cb96db0e2dd726
<!-- The PR description should answer 2 important questions: -->
### What
Previously in JSONAPI a model held all it's field types. This approach
quickly falls apart with recursive types and when adding nested fields /
relationships.
### How
This outputs the object types as their own items in the catalog and
refers to them throughout rather than inlining the types everywhere.
V3_GIT_ORIGIN_REV_ID: 7f05bf964c6551c9aaf04ba6f2e02bf8f0ce272d
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.132 to
1.0.133.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.133</h2>
<ul>
<li>Implement From<[T; N]> for serde_json::Value (<a
href="https://redirect.github.com/serde-rs/json/issues/1215">#1215</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0903de449c"><code>0903de4</code></a>
Release 1.0.133</li>
<li><a
href="2b65ca0949"><code>2b65ca0</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1215">#1215</a>
from dtolnay/fromarray</li>
<li><a
href="4e5f985958"><code>4e5f985</code></a>
Implement From<[T; N]> for Value</li>
<li><a
href="2ccb5b67ca"><code>2ccb5b6</code></a>
Disable question_mark clippy lint in lexical test</li>
<li><a
href="a11f5f2bc4"><code>a11f5f2</code></a>
Resolve unnecessary_map_or clippy lints</li>
<li><a
href="07f280a79c"><code>07f280a</code></a>
Wrap PR 1213 to 80 columns</li>
<li><a
href="75ed44722d"><code>75ed447</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1213">#1213</a>
from djmitche/safety-comment</li>
<li><a
href="73011c0b2b"><code>73011c0</code></a>
Add a safety comment to unsafe block</li>
<li><a
href="be2198a54d"><code>be2198a</code></a>
Prevent upload-artifact step from causing CI failure</li>
<li><a
href="7cce517f53"><code>7cce517</code></a>
Raise minimum version for preserve_order feature to Rust 1.65</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/json/compare/v1.0.132...v1.0.133">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.132&new-version=1.0.133)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: fb9be45dad350c6f82da9954bfb22b6bc30b7c63
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.92 to 1.0.93.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/anyhow/releases">anyhow's
releases</a>.</em></p>
<blockquote>
<h2>1.0.93</h2>
<ul>
<li>Update dev-dependencies to <code>thiserror</code> v2</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="713bda9247"><code>713bda9</code></a>
Release 1.0.93</li>
<li><a
href="f91c247cf8"><code>f91c247</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/391">#391</a>
from dtolnay/thiserror</li>
<li><a
href="2a3901c0b1"><code>2a3901c</code></a>
Isolate old rustc version tests from needing anyhow dev-dependencies in
lockfile</li>
<li><a
href="3ca2cdd795"><code>3ca2cdd</code></a>
Update dev-dependencies to thiserror v2</li>
<li>See full diff in <a
href="https://github.com/dtolnay/anyhow/compare/1.0.92...1.0.93">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anyhow&package-manager=cargo&previous-version=1.0.92&new-version=1.0.93)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 1e2b6601012bef1430d82d1d638300e288c4d24a
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.214 to
1.0.215.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/serde/releases">serde's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.215</h2>
<ul>
<li>Produce warning when multiple fields or variants have the same
deserialization name (<a
href="https://redirect.github.com/serde-rs/serde/issues/2855">#2855</a>,
<a
href="https://redirect.github.com/serde-rs/serde/issues/2856">#2856</a>,
<a
href="https://redirect.github.com/serde-rs/serde/issues/2857">#2857</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8939af48fe"><code>8939af4</code></a>
Release 1.0.215</li>
<li><a
href="fa5d58cd00"><code>fa5d58c</code></a>
Use ui test syntax that does not interfere with rustfmt</li>
<li><a
href="1a3cf4b3c1"><code>1a3cf4b</code></a>
Update PR 2562 ui tests</li>
<li><a
href="7d96352e96"><code>7d96352</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2857">#2857</a>
from dtolnay/collide</li>
<li><a
href="111ecc5d8c"><code>111ecc5</code></a>
Update ui tests for warning on colliding aliases</li>
<li><a
href="edd6fe954b"><code>edd6fe9</code></a>
Revert "Add checks for conflicts for aliases"</li>
<li><a
href="a20e9249c5"><code>a20e924</code></a>
Revert "pacify clippy"</li>
<li><a
href="b1353a99cd"><code>b1353a9</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2856">#2856</a>
from dtolnay/dename</li>
<li><a
href="c59e876bb3"><code>c59e876</code></a>
Produce a separate warning for every colliding name</li>
<li><a
href="7f1e697c0d"><code>7f1e697</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2855">#2855</a>
from dtolnay/namespan</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.214...v1.0.215">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.214&new-version=1.0.215)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 0aacba651e47e810bca0a4388d77c4a0b254080f
<!-- The PR description should answer 2 important questions: -->
### What
Given a model name `Authors` with an `Author` type underneath, this
changes field selection for JSONAPI to use `fields[Author]` instead of
`fields[Authors]`.
This will make things more consistent when we are also filtering other
types from relationships or nested fields too, which will have to use
type names, for example
`fields[Author]=name,articles&fields[Article]=title`
V3_GIT_ORIGIN_REV_ID: fff43c673888877ca8b2edb6e5ca9fdc846675a5
<!-- The PR description should answer 2 important questions: -->
### What
These have been deprecated for a while, and we now have a codemod to fix
users metadata, so it's time to make these officially deprecated. Any
`ObjectBooleanExpressionType` will now raise an error.
V3_GIT_ORIGIN_REV_ID: f3dd18afba40e369e82a15a7fbbfe31004d44067
<!-- The PR description should answer 2 important questions: -->
### What
Previously the OpenDD pipeline has ignored `BooleanExpressionType` as
they were not available outside GraphQL. Now they are, so we use them,
and test them in the JSONAPI pipeline.
This means that the SQL frontend cannot use filtering unless models have
a `BooleanExpressionType` defined. These are generated by the CLI, so
hopefully this is fine.
Depends on #1336
V3_GIT_ORIGIN_REV_ID: 4037585ef36bc99c99a482361084ccd09c5c6bb1
<!-- The PR description should answer 2 important questions: -->
### What
What's important about the feature is that it accesses nested fields
rather than being specific to any particular underlying representation.
V3_GIT_ORIGIN_REV_ID: 648464f925f23efde2e764b709a9b3e067ff6a57
### What
This PR does three related things:
* Adds an execution test that tests that nested relationships work in
field selection in Postgres (taken from #935)
* Refactors the way capabilities are handled in metadata resolve to
account for difference between NDC 0.1.x and 0.2.x. Specifically, NDC
0.1.x connectors are assumed to support nested relationships in field
selection, but do not support them in filtering and ordering. Whereas in
NDC 0.2.x, a capability exists to indicate nested relationship support,
but then you must support them in filtering and ordering as well as
field selection.
* Updates the metadata used in the default docker compose so that it:
* uses an up to date pg schema
* uses BooleanExpressionType instead of ObjectBooleanExpression
* removes commands that do not exist on the pg connector
* adds the Institutions model so that nested relationships can be tested
This PR does not add support for nested relationships in filtering or in
ordering. It also does not block nested relationships in field selection
for NDC 0.2.x connectors that do not support it. This will all come in
later PRs.
### How
In `metadata_resolve`, the resolved `DataConnector` used to contain a
copy of the `ndc_models::Capabilities`. This has been removed and
instead a `metadata_resolve` specific `DataConnectorCapabilities`
structure is used instead. This decouples `metadata_resolve` from
`ndc_models` and allows it to capture differences between NDC 0.1.x and
0.2.x properly.
There is now a specific function per NDC version that creates a
`DataConnectorCapabilities`. This removes the need for capabilities
migration code.
V3_GIT_ORIGIN_REV_ID: 0eb119aab0e5fa22977d84820025f75c6102036d
<!-- The PR description should answer 2 important questions: -->
### What
Update changelog for `v2024.11.13`
V3_GIT_ORIGIN_REV_ID: e8ef1db536825e8266c663978be6832463e8d378