Commit Graph

826 Commits

Author SHA1 Message Date
Tom Harding
cf28eea4cf Detect conflicting names for commands in metadata resolve step (#1168)
### What

Previously, MBS would not complain if two commands had the same root
field name, and would instead just keep whichever was resolved last.
This has now been fixed.

### How

We do precisely what we do with all the other steps: check a running
list of graphql names that have already been used. We've added a test
that does indeed fail on `main`, which now works.

V3_GIT_ORIGIN_REV_ID: fdf8f73acc62abf315125636c0010b01f6cdb96b
2024-09-27 14:58:07 +00:00
Daniel Harvey
649b3c29b0 Move model planning from sql to plan (#1166)
<!-- The PR description should answer 2 important questions: -->

### What

We're building a new OpenDD IR pipeline. The `sql` crate already has a
lot of what we need, so let's take the model selection parts (ie, not
aggregates yet), pull them into the `plan` crate, and re-use them for
both `sql` and the `jsonapi` pipelines.

The broad idea here is that the shared `plan` will get incrementally
bigger, and `sql` will get smaller.

This is a functional no-op for `sql`, and slightly improves the WIP
JSONAPI pipeline as we enjoy better permission checks.

### How

- Copy model planning and helper functions from `sql` into `plan`
- Replace instances `DataFusionError` with a smaller local `PlanError`
- Fix JSONAPI to use these new `plan` functions
- Remove the code in `sql`, instead using the shared `plan` functions in
planning, mapping back into `DataFusionError` as appropriate.

V3_GIT_ORIGIN_REV_ID: 50314442b9b56f31d2b38a0cf6f104e265bc3886
2024-09-27 14:21:19 +00:00
Tom Harding
a94d8a7b1b Add an alias for docker-refresh so I don't keep getting it wrong (#1169)
### What

This will save me minutes of time a week.

### How

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

V3_GIT_ORIGIN_REV_ID: d441b07fcf69b30c59902198e025669df410346c
2024-09-27 14:18:25 +00:00
Rakesh Emmadi
a2585dcf0a update graphql-ws connection init timeout to 3 secs (#1164)
V3_GIT_ORIGIN_REV_ID: 5143e6c7939ff4c49c4fae2ff8c3d3d757b4b60f
2024-09-27 11:13:58 +00:00
Daniel Harvey
a6719bee76 Replace references to DataConnectorLink with Arc (#1162)
<!-- The PR description should answer 2 important questions: -->

### What

The references are making multiple frontends difficult to implement,
let's wrap them with `Arc` instead and have an easier time.

### How

Change the types, follow the errors. Functional no-op.

V3_GIT_ORIGIN_REV_ID: 8baea2bd6c0e56e8bfb1f899b8d15731eebfa976
2024-09-27 09:00:16 +00:00
Daniel Harvey
b13cd460ae Move NdcFieldAlias to new plan-types crate (#1161)
### What

We'd like to use `NdcFieldAlias` in the `plan` crate, however because of
the ways deps between `graphql_ir` and `execute` work we cannot without
a cycle. Functional no-op.

### How

Create a new crate that depends on nothing for planning-related domain
types.

V3_GIT_ORIGIN_REV_ID: c441f2de2eba01bda59ce16e1e4b0e4d9f765d78
2024-09-27 09:00:10 +00:00
Rakesh Emmadi
d58ce08c19 Bump opentelemetry to 0.23 (#1160)
And bump other opentelemetry-* deps to compatible with 0.23

<!-- 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? -->
Need
[add_link](https://docs.rs/opentelemetry/0.23.0/opentelemetry/trace/trait.Span.html#tymethod.add_link)
API on Spans for tracing `graphql-ws` websockets code. It is available
opentelementry version `0.23` and above. This also bumps all the
dependents of the opentelemetry crate (`opentelemetry-*`)

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
By updating root `Cargo.toml`.

V3_GIT_ORIGIN_REV_ID: 87c1bedde35f5e8e91366aceb1379ab5d43b5b99
2024-09-26 15:01:27 +00:00
Daniel Harvey
e2205b221c Keep reference to http_context instead of owned copy (#1159)
<!-- The PR description should answer 2 important questions: -->

### What

When we merged the PR that added `ResolveFilterExpressionContext`
(amongst other changes, sadly), the `Generate Query Plan` got slower.
Changing this to a reference to try and improve it. Locally run
benchmarks show this as mostly an improvement.

### How

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

Use reference to `http_context` inside `ResolveFilterExpressionContext`,
remove resulting `.clone()` calls.

V3_GIT_ORIGIN_REV_ID: b7e728cf4f376f7c69b83eab0d79a43c90ee265b
2024-09-26 13:02:52 +00:00
Daniel Harvey
a3efbc98d7 Start of GraphQL -> OpenDD IR pipeline (#1156)
<!-- The PR description should answer 2 important questions: -->

### What

We are going to need tests for our OpenDD IR pipeline, and we are going
to need to convert GraphQL requests into OpenDD IR at some point, so
this makes the most basic `normalized_ast -> OpenDD IR QueryRequest`
pipeline and implements / tests it for the simplest possible query.

This only affects tests at this point, so is a functional no-op.

### How

This PR adds the most basic `normalized_ast -> OpenDD IR QueryRequest`
pipeline and implements / tests it for the simplest possible query.

```rust
enum TestOpenDDPipeline {
    Skip,
    GenerateOpenDDQuery,
    GenerateExecutionPlan,
}
```

It adds a flag for each engine test to opt-in for testing with the new
pipeline. Currently one passes `GenerateOpenDDQuery`, and tests the
result against a snapshot, and the rest pass `Skip`.

The unblocks two following steps:
- we can improve the GraphQL -> OpenDD IR generation, enabling more
tests by passing `GenerateOpenDDQuery`
- once the main new `plan` pipeline generates the same types as the
existing `execute` crate, we can compare the old `execute::plan` with
the new one, and enable that per test by passing
`GenerateExecutionPlan`.

Once all the tests are passing `GenerateExecutionPlan` we can remove the
flag and we know we'll have parity in plan creation.

V3_GIT_ORIGIN_REV_ID: 607dfce77b68849c7fc66fc652e38182fa0c83ea
2024-09-25 20:07:45 +00:00
Rakesh Emmadi
531dc88622 graphql-ws: Use polling interval from opendd config (#1157)
<!-- 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? -->
Use polling interval from OpenDD metadata instead of hard-coded 2
seconds.

### How

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

The interval value (in milliseconds) is already available in
subscription plan. Use it.

V3_GIT_ORIGIN_REV_ID: be99c3367b8d29b085fe536c26cd44ed601c7d91
2024-09-25 17:25:40 +00:00
Daniel Harvey
0e93e22d6c Provide default empty object for empty model 'args' field (#1154)
<!-- The PR description should answer 2 important questions: -->

### What

If a model has arguments, but they are all provided by presets, then
previously we would require users to pass an empty `args: {}` argument
like this:

```graphql
query MyQuery
  ActorsByMovieMany(args: {}) {
    actor_id
    movie_id
    name
  }
}
```

There is no need for this, so this PR loosens this restriction, by
providing a default empty value. This means users can also do the above
query with:

```graphql
query MyQuery
  ActorsByMovieMany {
    actor_id
    movie_id
    name
  }
}
```

Because both versions now work, this is a non-breaking change.

### How

Instead of just looking at number of arguments in schema generation,
consider which have been prefilled and provide a default empty value if
there is nothing a user could pass anyway.

V3_GIT_ORIGIN_REV_ID: cf184e42a114df782e1480a8f19548dda31e5992
2024-09-25 17:16:51 +00:00
Rakesh Emmadi
601771c4fc Test execute_request from graphql_ws crate (#1155)
<!-- 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? -->
This PR enables "unit" testing for `execute_request` function from
`graphql-ws` crate which is responsible for executing
graphql operations. It is tested in conjunction with the
`graphql_frontend`'s `execute_query` by comparing responses from the
both.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
Briefly
```
http_response = graphql_frontend::execute_query
ws_response = graphql_ws::execute_request
compare(http_response, ws_response)
```
V3_GIT_ORIGIN_REV_ID: 371ac3de1136732d7dc2e88dbd093264a96a7d2e
2024-09-25 16:35:57 +00:00
Tom Harding
e7c0a2777e Scaffolding for error paths in metadata-resolve (#1153)
<!-- The PR description should answer 2 important questions: -->

### What

We would like to show error paths for `metadata-resolve` so that
debugging these errors is a little less painful, both for us and end
users. To this end, #1147 introduced a type wrapper that would be
deserialised to contain its own JSON path, so we could then pass this
path to errors. This PR does precisely this for the
`UnknownModelDataConnector` error.

I chose this error because... it was the first one on the list, not for
any reason beyond that. Right now, this is an extremely simple case
whereby only one path is required, however other errors may need two
("name at path X conflicts with name at path Y", for example). This PR
also changes the default engine error stdout to show the `Debug`
instance rather than the `Display` instance, as the error path is
discarded by the `Display` instance. Unfortunately, we use `Display` for
both stdout and user responses, which is maybe something we'd want to
change eventually, but for now this means we can't just add the error
path to the `Display` instance.

### How

I started by making `Model` a `Spanned` element within the metadata
structure. I then added the `path` key to the resolved `Model` type. I
then found the first error type that included a model name, and added
the `path` key to that error variant. Then, I just did the wiring.
You'll note that this error doesn't _alway_ return a path because it
isn't always raised by a model-first code path, but this is probably the
first PR of many.

### Next steps

* Next step is to make the output a little neater, probably by creating
an actual structured error type (most likely a lot like `Spanned`, with
a `path` and a `value`). Then, we can use a `Display` instance again to
print this nicely in the stdout, but ignore the path in the MBS API
response.

* After that, the plan is to stop ignoring it in the MBS API response,
with a new key to hold an error path.

* Step three is to allow for errors to produce multiple error paths in a
list, hopefully such that they tell a story ("I found this... but then I
found this... and those two things conflict")

* Step four will be a wave of PRs that look quite similar to this one,
wiring up paths to as many errors as possible.
<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 2d8dda018055f65711e66b08aa15188b516e2ddc
2024-09-25 15:12:04 +00:00
Rakesh Emmadi
29eacdf3c3 Introduce graphql-ws crate that implements GraphQL over websockets (#1134)
<!-- 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? -->
- Introduce a brand new `graphql-ws` crate that implements
  - WebSocket request handling by `WebSocketServer` struct
-
[graphql-ws](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md)
protocol and handles subscriptions in async tokio tasks.
- OSS engine now handles GraphQL websockets through `GET /graphql`
handshakes.

### How

Refer to added
[architecture.md](https://github.com/hasura/v3-engine/blob/rakeshkky/graphql-ws-crate/crates/graphql-ws/architecture.md)
file.

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

V3_GIT_ORIGIN_REV_ID: 3032cbe50267d3f0102c450be2749c09fb3992bf
2024-09-25 14:09:12 +00:00
Tom Harding
4630ade31e Introduce Spanned type (#1147)
<!-- The PR description should answer 2 important questions: -->

### What

This PR adds the `Spanned` type: an OpenDD wrapper that can be placed
inside the Metadata. It's basically a pair of the value and the path to
the value in the original metadata. This allows us to do things like
source maps.

<!-- 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? -->

### How

It's almost exactly what @danieljharvey proposed originally.

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

---------

Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com>
V3_GIT_ORIGIN_REV_ID: 4f037686b6981fffc4b0a8ac8f95c2f9c623af67
2024-09-24 15:02:27 +00:00
Daniel Harvey
0e4a3afbca Clone type_container instead of maintaining reference (#1150)
<!-- The PR description should answer 2 important questions: -->

### What

We need less lifetimes in our plan, particular those that are connected
to graphql-specific IR. This makes this reference a copy and fixes call
sites. Functional no-op.

V3_GIT_ORIGIN_REV_ID: beb05a09a30cd33240e916255265c41db17c0c78
2024-09-24 14:55:26 +00:00
Daniel Harvey
2839170ddf Create plan crate (#1149)
<!-- The PR description should answer 2 important questions: -->

### What

We are creating a new build pipeline. This makes a new crate for it
called `plan` and puts the existing work from JSONAPI into it. JSONAPI
uses the new plan so we have a quick way of testing it works.

### How

Mostly moving code around. All behind feature flags, so functional
no-op.

V3_GIT_ORIGIN_REV_ID: af4901c93415c7ced2b0f537e600512d28fc5766
2024-09-24 14:40:11 +00:00
Daniel Harvey
7eba4f503a Remove legacy test runner (#1152)
<!-- The PR description should answer 2 important questions: -->

### What

Need to make a change to the execution tests runner, and it turns out we
had two, so retiring the old one.

### How

New tests expect an array of session variables and results, so wrap them
all in `[` and `]`.

V3_GIT_ORIGIN_REV_ID: 81d046a8a69e62f74423b3296fc8bbf04a82fed8
2024-09-24 11:45:06 +00:00
Daniel Harvey
017d6a0215 Use ddn-engine as Otel name (#1144)
<!-- The PR description should answer 2 important questions: -->

### What

We've been using `graphql-engine` as our OpenTelemetry application name,
which makes differentiating from V2 difficult, this changes it to use
`ddn-engine` instead.

V3_GIT_ORIGIN_REV_ID: 95870dd6799f1e43b88ba593308aa4bacb62ca2c
2024-09-24 10:25:29 +00:00
Tom Harding
c3be5cbc8e Carry the parsing path through the OpenDD parsers (#1146)
### What

We want to be able to reference the path within parsers even if the
parser succeeds. This allows us to do things like generate source spans
to help users make updates.

### How

We add `path` as a currently ignored argument to `deserialize`, and then
every time we want to decorate the error path, we replace that call with
a bidirectional decorator.

V3_GIT_ORIGIN_REV_ID: 18ddede2db84801f995b64f17bfb29893acb4657
2024-09-23 22:40:55 +00:00
Anon Ray
23e10ae4a6 remote joins: monomorphize Location type (#1143)
### What

`Location`/`JoinLocations` types were polymorphic, so as to contain
`RemoteJoin` or `(RemoteJoin, JoinId)`. Since we've removed `JoinId` we
can make the types simpler and make them monomorphic.

Functional no-op.

### How

V3_GIT_ORIGIN_REV_ID: 69243ab6cbf350ca787a0a236d0b2676f503fd89
2024-09-23 11:38:25 +00:00
Anon Ray
c9209d45bb remote joins: remove unused join ids (#1142)
<!-- The PR description should answer 2 important questions: -->

### What

Join ids were constructed and assigned, but never used during execution.
Let's remove them to make the code simpler.

Functional no-op.

### How

Remove the commented out `_join_id` in `collect_next_join_nodes`, and
then follow the compiler to fix all errors.

V3_GIT_ORIGIN_REV_ID: 05e0c2435beefef3f7006c4a953962f762f2f262
2024-09-23 11:02:19 +00:00
Daniel Harvey
5fa3043c08 Update changelog for v2024.09.23 release (#1141)
<!-- The PR description should answer 2 important questions: -->

### What

Update changelog

V3_GIT_ORIGIN_REV_ID: 4ecc924484ef6412016413f7470c9ab4cb69d4dc
2024-09-23 10:37:20 +00:00
dependabot[bot]
59c5b39447 Bump bson from 2.12.0 to 2.13.0 (#1139)
Bumps [bson](https://github.com/mongodb/bson-rust) from 2.12.0 to
2.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/bson-rust/releases">bson's
releases</a>.</em></p>
<blockquote>
<h2>v2.13.0</h2>
<p>The MongoDB Rust driver team is pleased to announce the v2.13.0
release of the <code>bson</code> crate.</p>
<h2>Highlighted Changes</h2>
<p>This release introduces a utility type for deserializing from UTF-8
lossy BSON bytes.</p>
<h2>Full Release Notes</h2>
<h3>New Features</h3>
<ul>
<li>RUST-2023 Add wrapper type for utf-8 lossy deserialization (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/497">#497</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="401f638ba7"><code>401f638</code></a>
release v2.13.0 (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/499">#499</a>)</li>
<li><a
href="0fbdeeffd3"><code>0fbdeef</code></a>
RUST-2023 Add wrapper type for utf-8 lossy deserialization (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/497">#497</a>)</li>
<li>See full diff in <a
href="https://github.com/mongodb/bson-rust/compare/v2.12.0...v2.13.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bson&package-manager=cargo&previous-version=2.12.0&new-version=2.13.0)](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: 7ff16f9bddfad7ad938ee4db42554e2b79aeaed9
2024-09-23 06:47:48 +00:00
dependabot[bot]
dc18ff6202 Bump bytes from 1.7.1 to 1.7.2 (#1138)
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.7.1 to 1.7.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/bytes/releases">bytes's
releases</a>.</em></p>
<blockquote>
<h2>Bytes 1.7.2</h2>
<h1>1.7.2 (September 17, 2024)</h1>
<h3>Fixed</h3>
<ul>
<li>Fix default impl of <code>Buf::{get_int, get_int_le}</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>Fix double spaces in comments and doc comments (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li>
</ul>
<h3>Internal changes</h3>
<ul>
<li>Ensure BytesMut::advance reduces capacity (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md">bytes's
changelog</a>.</em></p>
<blockquote>
<h1>1.7.2 (September 17, 2024)</h1>
<h3>Fixed</h3>
<ul>
<li>Fix default impl of <code>Buf::{get_int, get_int_le}</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>Fix double spaces in comments and doc comments (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li>
</ul>
<h3>Internal changes</h3>
<ul>
<li>Ensure BytesMut::advance reduces capacity (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d7c1d658d9"><code>d7c1d65</code></a>
chore: prepare bytes v1.7.2 (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/736">#736</a>)</li>
<li><a
href="ac46ebdd46"><code>ac46ebd</code></a>
ci: update nightly to nightly-2024-09-15 (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/734">#734</a>)</li>
<li><a
href="79fb85323c"><code>79fb853</code></a>
fix: apply sign extension when decoding int (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li>
<li><a
href="291df5acc9"><code>291df5a</code></a>
Fix double spaces in comments and doc comments (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li>
<li><a
href="ed7d5ff39e"><code>ed7d5ff</code></a>
test: ensure BytesMut::advance reduces capacity (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/bytes/compare/v1.7.1...v1.7.2">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bytes&package-manager=cargo&previous-version=1.7.1&new-version=1.7.2)](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: 2bdd2454a01f57d80180d21f0a764c4f12646eb9
2024-09-23 06:47:44 +00:00
dependabot[bot]
fc786a264c Bump thiserror from 1.0.63 to 1.0.64 (#1137)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.63 to
1.0.64.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/thiserror/releases">thiserror's
releases</a>.</em></p>
<blockquote>
<h2>1.0.64</h2>
<ul>
<li>Exclude derived impls from coverage instrumentation (<a
href="https://redirect.github.com/dtolnay/thiserror/issues/322">#322</a>,
thanks <a
href="https://github.com/oxalica"><code>@​oxalica</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="84484bc75c"><code>84484bc</code></a>
Release 1.0.64</li>
<li><a
href="023f036de4"><code>023f036</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/322">#322</a>
from oxalica/feat/mark-auto-derived</li>
<li><a
href="ae1f47e3e5"><code>ae1f47e</code></a>
Mark #[automatically_derived] for generated impls</li>
<li><a
href="ab5b5e375b"><code>ab5b5e3</code></a>
Upload CI Cargo.lock for reproducing failures</li>
<li><a
href="00b3c1405e"><code>00b3c14</code></a>
Work around new dead code warning in test</li>
<li>See full diff in <a
href="https://github.com/dtolnay/thiserror/compare/1.0.63...1.0.64">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=thiserror&package-manager=cargo&previous-version=1.0.63&new-version=1.0.64)](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: 3bfd4d00745ceed8e6d50f3d65f481ac3c675517
2024-09-23 06:47:39 +00:00
dependabot[bot]
4ed35177f9 Bump clap from 4.5.17 to 4.5.18 (#1136)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.17 to 4.5.18.
<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.18</h2>
<h2>[4.5.18] - 2024-09-20</h2>
<h3>Features</h3>
<ul>
<li><em>(builder)</em> Expose <code>Arg::get_display_order</code> and
<code>Command::get_display_order</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.18] - 2024-09-20</h2>
<h3>Features</h3>
<ul>
<li><em>(builder)</em> Expose <code>Arg::get_display_order</code> and
<code>Command::get_display_order</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d81158599f"><code>d811585</code></a>
chore: Release</li>
<li><a
href="ab948b3556"><code>ab948b3</code></a>
docs: Update changelog</li>
<li><a
href="82e599e91d"><code>82e599e</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5602">#5602</a>
from shannmu/delimiter_values</li>
<li><a
href="59bf26dd56"><code>59bf26d</code></a>
feat(clap_complete): Support delimiter values in native completions</li>
<li><a
href="ccecab394b"><code>ccecab3</code></a>
test(clap_complete): Add test cases for delimiter_values support</li>
<li><a
href="a3a476407b"><code>a3a4764</code></a>
docs(derive): Specify Parser::update_from semantics</li>
<li><a
href="df165a2da4"><code>df165a2</code></a>
docs(derive): Flatten isn't just for update</li>
<li><a
href="5488bcfa30"><code>5488bcf</code></a>
docs(derive): Connect more dots for Args/Subcommand</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.17...clap_complete-v4.5.18">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.17&new-version=4.5.18)](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: 0b973cc61eb05b4c00052a1f5aeb6c34dd20e60a
2024-09-23 06:27:26 +00:00
Rakesh Emmadi
10b6aecb95 no-op: Pull out auth related code from engine crate (#1133)
<!-- 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? -->

Authentication related code lies in `engine` crate. It is needed by
upcoming graphql websockets crate, which will be dep for `engine` crate
(for oss engine bin). To avoid cyclic dependency, moving out the
authentication code from `engine` crate now.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
Move `crates/engine/src/authentication.rs` to new
`crates/auth/hasura-authn` crate. This also needs to move the
`auth_config.jsonschema` file from `engine` crate.

V3_GIT_ORIGIN_REV_ID: d2c320c3a26512ad8ab8e5c3312a64bc69d8a200
2024-09-20 13:40:10 +00:00
Rakesh Emmadi
7e9e487586 Add polling interval config for subscription GraphQL OpenDD metadata (#1129)
<!-- 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? -->
- Extend the `default` attribute in `opendd` to accept a custom default
value. It is used for polling interval field to specify `1000` as
default (in ms).
- Introduce `polling_interval_ms` (defaults to `1000`) field in
`SubscriptionGraphQlDefinition` OpenDD type.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- Update the opendd-derive macro to enhance the `#[opendd(derive)]`
attribute.
- Plumb the `polling_interval_ms` value till subscription plan type.

V3_GIT_ORIGIN_REV_ID: 2300c781cf2777e5089820bf7d3448b2942c59d0
2024-09-20 12:16:29 +00:00
Daniel Harvey
f0dd6fb5d4 Add deprecation status to relationship input fields in boolean expressions (#1078)
<!-- The PR description should answer 2 important questions: -->

### What

If a relationship is set to deprecated, then we mark this on the input
field in question.

On boolean expressions, this makes the field disappear from the GraphQL
schema.

I believe this is intentional:
ffb76cd691/crates/lang-graphql/src/introspection.rs (L437)
and can be overwritten by passing `includeDeprecated` in the
introspection schema itself.

The deprecated relationship field:

<img width="585" alt="Screenshot 2024-09-09 at 14 00 16"
src="https://github.com/user-attachments/assets/5932d4ab-dd9b-46b2-b2ae-8401b8699cac">

The missing input field in the boolean expression.

<img width="726" alt="Screenshot 2024-09-09 at 14 00 20"
src="https://github.com/user-attachments/assets/d29caddf-9f97-4635-82bc-7f31fee4ad24">

### How

Use `mk_deprecation_status` when constructing `InputField`.

V3_GIT_ORIGIN_REV_ID: b39fc573e8c1cc18b99b30cd9c4a1187b4bd489d
2024-09-20 11:17:31 +00:00
Daniel Chambers
d651c75cfc Fix comparable relationships in BooleanExpressionType that span subgraphs (#1126)
<!-- The PR description should answer 2 important questions: -->

### What

Previously, comparable relationships did not take into account the
subgraph of the target model / command, meaning they'd look in the wrong
place for a target boolean expression type. Now we look up the
relationship to find the correct location.

### How

To make jumping into unresolved relationships easier, we:
- rename `relationships` stage to `object_relationships`
- create a new `relationships` stage that grabs all the relationships in
metadata and sorts them by `relationshipName` and then object name. This
is necessary because a relationship name can be used multiple times in
one subgraph.

---------

Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com>
V3_GIT_ORIGIN_REV_ID: 2835aac1341b3044f68c7e92b74f1ba08f83e6c6
2024-09-20 10:28:51 +00:00
Daniel Harvey
5cea6dd392 Wrap ModelSource in Arc within graphql_ir::Expression (#1132)
<!-- The PR description should answer 2 important questions: -->

### What

Use `Arc<ModelSource>` in `graphql_ir::Expression` rather than a
reference.

### How

Change the code, fix the types. Functional no-op.

V3_GIT_ORIGIN_REV_ID: 973857eafbff6db7a698d31cf9792ce87378d491
2024-09-19 17:26:37 +00:00
Rakesh Emmadi
b6d2c482eb Necessary authz and authn refactors for subscriptions implementation (#1128)
<!-- 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? -->
- Pull out business logic of authn and authz from middlewares. It'll be
re-used in graphql-websockets implementation.
- Introduce a function in `plan.rs` for resolving subscription query
plan.

This is strictly no-op change.

V3_GIT_ORIGIN_REV_ID: 46bad489095f49026b9c1a46d64e3a5fac9d123e
2024-09-19 16:49:06 +00:00
Daniel Harvey
995002537c Move GraphQL selection set out of shared IR (#1131)
<!-- The PR description should answer 2 important questions: -->

### What

`SelectionSet` is a GraphQL concept, let's move it upwards from the
shared IR into the GraphQL related types above.

### How

Move types around. No functional changes.

V3_GIT_ORIGIN_REV_ID: 3075c31eea1c8bab102db21df9f3aa5267656d27
2024-09-19 15:46:22 +00:00
Daniel Chambers
5f0e9906d6 Fix being able to define a ScalarType with a name that matches in InbuiltType (#1120)
<!-- The PR description should answer 2 important questions: -->

### What

Previously it was possible to define a custom type `String` which
conflicted with the built-in `String` type. This would cause undefined
behaviour, and is generally confusing. This is now disallowed.

### How

Check custom scalar type name against a static list of inbuilt type
names that aren't allowed, and throw an error if one is used.

---------

Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com>
V3_GIT_ORIGIN_REV_ID: 93b74476522591a9789e0039e81a6f96ee9c6203
2024-09-19 15:01:53 +00:00
Daniel Harvey
65460a3c4a Update architecture doc (#1130)
<!-- The PR description should answer 2 important questions: -->

### What

Include `ir` and `schema` moves and basic info on `sql` and `jsonapi`.

No functional changes.

V3_GIT_ORIGIN_REV_ID: 254fc62c8c97e8b8719fa552c34bbdf3c231a839
2024-09-19 14:28:56 +00:00
Daniel Harvey
42fd54b5b9 Add object operand to OrderByExpression (#1122)
<!-- The PR description should answer 2 important questions: -->

### What

In future we want multiple types of `OrderByExpression` (object, scalar,
objectAggregate, scalarAggregate). To stop this being a breaking change
in future, we make the current implementation (objects only) a sum type
so that we can more easily extend it in future.

### How

Add `OrderByExpressionObjectOperand`, fix resulting type chaos.

This feature is currently hidden, so strictly this is a functional
no-op.

V3_GIT_ORIGIN_REV_ID: ef727b7c8895764b70ffb27c647f34383bddd512
2024-09-19 08:47:54 +00:00
Daniel Chambers
9d4206f260 Reformat test metadata to order kind, version, definition properties first (#1127)
### What
Our test metadata has a lot of objects formatted like this:

```jsonc
{
  "definition": {
    // a lot of stuff here
  },
  "version": "v1",
  "kind": "ObjectType"
}
```

This is very unhelpful when trying to read the metadata because I want
to know what kind the object is before I see the definition.

This PR adds a small JQ script that reorders the properties in existing
test json metadata so that the properties are ordered as kind, version,
definition first (like in HML files).

This is literally just a formatting change, nothing has _actually_
changed.

### How

There's a JQ script in the justfile that does this.

V3_GIT_ORIGIN_REV_ID: a56f4afee33c3074e564d9cbb50368932ee5275e
2024-09-19 07:49:06 +00:00
Daniel Harvey
779279589a Wrap ModelSource and CommandSource in Arc (#1124)
<!-- The PR description should answer 2 important questions: -->

### What

To avoid lifetime issues we are wrapping types we reuse throughout
`graphql_ir` and `execute::plan` in `Arc`. This PR does not remove the
later lifetimes, just does the first mechanical step in
`metadata_resolve`

### How

Wrap `ModelSource` and `CommandSource` in `Arc`, fix type errors.
Functional no-op.

V3_GIT_ORIGIN_REV_ID: af91ec7eedf9fe5c3c2fe9737f9c827c1f826d63
2024-09-19 07:28:48 +00:00
Daniel Harvey
0c52ca1d2e Upgrade to Rust 1.81.0 (#1119)
<!-- The PR description should answer 2 important questions: -->

### What

Update Rust to
[1.81.0](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html).

### How

Update `rust-toolchain.yaml` and Dockerfiles

V3_GIT_ORIGIN_REV_ID: 8a1fe694caaded7a12220d2460e66009f969227a
2024-09-18 07:29:12 +00:00
Daniel Harvey
ccd6cf793b Rename schema crate to graphql-schema (#1117)
<!-- The PR description should answer 2 important questions: -->

### What

Much like https://github.com/hasura/v3-engine/pull/1116, make clearer
what is and is not graphql-centric in engine by renaming `schema` to
`graphql-schema`.

### How

Moving file around, no functional changes.

V3_GIT_ORIGIN_REV_ID: ec06c33a964c16a53c1a4ed306de3fdccd2e8efc
2024-09-17 20:07:06 +00:00
Daniel Harvey
434d56ca20 JSONAPI build plan (#1114)
<!-- The PR description should answer 2 important questions: -->

### What

Let's get to a very basic end-to-end pipeline. This introduces
(extremely-happy-path) planning, execution and response processing so
that we have a rough end to end API.

V3_GIT_ORIGIN_REV_ID: 57ce28eb5ad20f061e0ede37b0bf43fbaddaaf2a
2024-09-17 16:01:52 +00:00
Daniel Harvey
6574ed7da0 Rename ir crate to graphql-ir crate (#1116)
<!-- The PR description should answer 2 important questions: -->

### What

Make what is and is not graphql-centric a little clearer by renaming
this crate and moving it into a `crates/graphql` folder.

### How

No functional changes

V3_GIT_ORIGIN_REV_ID: 3644ce32059e16db9b467b010430ba23fc436ed9
2024-09-17 13:51:26 +00:00
Rakesh Emmadi
e5d7822086 Define subscription request plan (#1097)
<!-- The PR description should answer 2 important questions: -->
Closes:
https://linear.app/hasura/issue/APIPG-876/live-queries-or-ir-and-requestplan-for-subscriptions
### 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? -->

- Define and generate request plan for subscriptions.
- Define filter expression resolving context to allow/reject remote
relationships.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- Modifying existing enums, defining new types and functions.

V3_GIT_ORIGIN_REV_ID: 1e1a248c74d210cf45288002e1fe13ce6a868fe6
2024-09-17 07:11:46 +00:00
Daniel Harvey
ab165a15ef Update changelog for release v2024.09.16 (#1112)
<!-- The PR description should answer 2 important questions: -->

### What
Update changelog

V3_GIT_ORIGIN_REV_ID: f2da518548c31e0d8d7a6ac55008987dc9fcf8ff
2024-09-16 13:28:27 +00:00
Daniel Harvey
9a265c0b13 Checks for nested array capability (#1100)
<!-- The PR description should answer 2 important questions: -->

### What

Forgot to add these checks when implementing the feature, so now they're
added as an issue / warning, which will be promoted to an error for new
projects.

### How

Check the data connector capabilities at the point a boolean expression
is used for either model filtering or as a command argument. Raise a
warning if missing.

V3_GIT_ORIGIN_REV_ID: 68ecca998f61aee9340de634223c1933613c36d4
2024-09-16 09:50:46 +00:00
dependabot[bot]
84d4f65ec0 Bump anyhow from 1.0.87 to 1.0.89 (#1110)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.87 to 1.0.89.
<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.89</h2>
<ul>
<li>Make anyhow::Error's <code>UnwindSafe</code> and
<code>RefUnwindSafe</code> impl consistently available between versions
of Rust newer and older than 1.72 (<a
href="https://redirect.github.com/dtolnay/anyhow/issues/386">#386</a>)</li>
</ul>
<h2>1.0.88</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9d3fb6d096"><code>9d3fb6d</code></a>
Release 1.0.89</li>
<li><a
href="830c399126"><code>830c399</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/386">#386</a>
from dtolnay/unwindsafe</li>
<li><a
href="8454be372f"><code>8454be3</code></a>
Ensure UnwindSafe even with &quot;backtrace&quot; feature enabled and
old Rust</li>
<li><a
href="a85e414bf5"><code>a85e414</code></a>
Add more autotraits tests</li>
<li><a
href="139f266b90"><code>139f266</code></a>
Release 1.0.88</li>
<li><a
href="aa3ab2b9f0"><code>aa3ab2b</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/385">#385</a>
from dtolnay/docnostd</li>
<li><a
href="44c37674d3"><code>44c3767</code></a>
Update documentation on no-std error type conversions</li>
<li>See full diff in <a
href="https://github.com/dtolnay/anyhow/compare/1.0.87...1.0.89">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.87&new-version=1.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: 2c4882f2186992fa3d1756675f0dc0b4258ede83
2024-09-16 06:57:29 +00:00
dependabot[bot]
3f1e39373e Bump pretty_assertions from 1.4.0 to 1.4.1 (#1108)
Bumps
[pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions)
from 1.4.0 to 1.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases">pretty_assertions's
releases</a>.</em></p>
<blockquote>
<h2>v1.4.1</h2>
<h2>Fixed</h2>
<ul>
<li>Show feature-flagged code in documentation. Thanks to <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> for the
fix! (<a
href="https://redirect.github.com/rust-pretty-assertions/rust-pretty-assertions/pull/130">#130</a>)</li>
</ul>
<h2>Internal</h2>
<ul>
<li>Bump <code>yansi</code> version to <code>1.x</code>. Thanks to <a
href="https://github.com/SergioBenitez"><code>@​SergioBenitez</code></a>
for the update, and maintaining this library! (<a
href="https://redirect.github.com/rust-pretty-assertions/rust-pretty-assertions/pull/121">#121</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md">pretty_assertions's
changelog</a>.</em></p>
<blockquote>
<h1>v1.4.1</h1>
<h2>Fixed</h2>
<ul>
<li>Show feature-flagged code in documentation. Thanks to <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> for the
fix! (<a
href="https://redirect.github.com/rust-pretty-assertions/rust-pretty-assertions/pull/130">#130</a>)</li>
</ul>
<h2>Internal</h2>
<ul>
<li>Bump <code>yansi</code> version to <code>1.x</code>. Thanks to <a
href="https://github.com/SergioBenitez"><code>@​SergioBenitez</code></a>
for the update, and maintaining this library! (<a
href="https://redirect.github.com/rust-pretty-assertions/rust-pretty-assertions/pull/121">#121</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f5c5b24258"><code>f5c5b24</code></a>
chore: prep 1.4.1 release</li>
<li><a
href="d34d5243e4"><code>d34d524</code></a>
chore: display feature-flagged docs on docs.rs</li>
<li><a
href="fac427368f"><code>fac4273</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-pretty-assertions/rust-pretty-assertions/issues/131">#131</a>
from sandydoo/fix-yansi-deprecation</li>
<li><a
href="1e51cce1a9"><code>1e51cce</code></a>
chore: rename deprecated yansi methods</li>
<li><a
href="4a0e5a3e06"><code>4a0e5a3</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-pretty-assertions/rust-pretty-assertions/issues/121">#121</a>
from SergioBenitez/yansi-update</li>
<li><a
href="08838fe45e"><code>08838fe</code></a>
internal: bump MSRV to 1.63.0 for yansi</li>
<li><a
href="777387d221"><code>777387d</code></a>
ci: bump runner to windows-2022</li>
<li><a
href="35c08fe290"><code>35c08fe</code></a>
chore: update 'yansi' to 1.0.0-rc</li>
<li>See full diff in <a
href="https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.4.0...v1.4.1">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pretty_assertions&package-manager=cargo&previous-version=1.4.0&new-version=1.4.1)](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: 2e023c1be0c0ff6460092055efd376f66c534df6
2024-09-16 06:47:52 +00:00
dependabot[bot]
2b59652a9c Bump bson from 2.11.0 to 2.12.0 (#1109)
Bumps [bson](https://github.com/mongodb/bson-rust) from 2.11.0 to
2.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/bson-rust/releases">bson's
releases</a>.</em></p>
<blockquote>
<h2>v2.12.0</h2>
<p>The MongoDB Rust driver team is pleased to announce the v2.12.0
release of the <code>bson</code> crate.</p>
<h2>Highlighted Changes</h2>
<p>This release was largely driven by external contributions!</p>
<ul>
<li>An optional implementation of <code>Hash</code> and <code>Eq</code>
for the <code>Bson</code> family of types</li>
<li><code>ObjectId::from_parts</code>, allowing direct construction of
an <code>ObjectId</code> from its component values</li>
<li>Helpers for serializing
<code>Option&lt;chrono::DateTime&lt;_&gt;&gt;</code> as
<code>Option&lt;bson::DateTime&gt;</code></li>
<li>A fix for a panic when parsing specific malformed input data into a
<code>Decimal128</code></li>
</ul>
<p>We've also added optional (off by default) integration with the
<code>serde_path_to_error</code> crate, which
provides paths to the precise point of failure for deserialization of
nested data structures.</p>
<h2>Full Release Notes</h2>
<h2>New Features</h2>
<ul>
<li>RUST-2027 Impl Hash/Eq for BSON (thanks @<a
href="https://github.com/NineLord"><code>@​NineLord</code></a>!)</li>
<li>RUST-2017 Allow constructing an ObjectId from its parts (thanks <a
href="https://github.com/tyilo"><code>@​tyilo</code></a>!)</li>
<li>RUST-1987 Support serializing
<code>Option&lt;chrono::DateTime&lt;_&gt;&gt;</code> as
<code>Option&lt;bson::DateTime&gt;</code> (thanks <a
href="https://github.com/lazureykis"><code>@​lazureykis</code></a>!)</li>
<li>RUST-1874 Add optional integration with serde_path_to_error</li>
</ul>
<h2>Improvements</h2>
<ul>
<li>RUST-1773 Merge duplicate extjson map parsing between
OwnedOrBorrowedRawBsonVisitor and SeededVisitor</li>
</ul>
<h2>Bugfixes</h2>
<ul>
<li>RUST-2028 Fix Decimal128 panic when parsing strings w/o a char
boundary at idx 34 (thanks <a
href="https://github.com/arthurprs"><code>@​arthurprs</code></a>!)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8e0fb3b4ea"><code>8e0fb3b</code></a>
release v2.12.0 (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/498">#498</a>)</li>
<li><a
href="692cd752e9"><code>692cd75</code></a>
RUST-2028 Fix Decimal128 panic when parsing strings w/o a char boundary
at id...</li>
<li><a
href="28e39259c1"><code>28e3925</code></a>
RUST-2027 Impl Hash/Eq for BSON (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/495">#495</a>)</li>
<li><a
href="20c56f03e6"><code>20c56f0</code></a>
RUST-2017 Add method to construct an <code>ObjectId</code> from its
parts (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/492">#492</a>)</li>
<li><a
href="a72431e486"><code>a72431e</code></a>
RUST-1874 Add optional integration with <code>serde_path_to_error</code>
(<a
href="https://redirect.github.com/mongodb/bson-rust/issues/488">#488</a>)</li>
<li><a
href="d0f5d233fd"><code>d0f5d23</code></a>
minor: update bson to clippy 1.80.0 (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/487">#487</a>)</li>
<li><a
href="2e8fb00cf8"><code>2e8fb00</code></a>
RUST-1992 Factor raw bson encoding out of RawDocumentBuf (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/486">#486</a>)</li>
<li><a
href="1c6e65a27a"><code>1c6e65a</code></a>
RUST-1992 Minor parsing cleanup (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/485">#485</a>)</li>
<li><a
href="39d90f6c44"><code>39d90f6</code></a>
RUST-1992 Convert raw deserializer to use raw document iteration (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/483">#483</a>)</li>
<li><a
href="b5541429b1"><code>b554142</code></a>
RUST-1987 Add serde helper module for
<code>Option\&lt;DateTime&gt;</code> (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/482">#482</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mongodb/bson-rust/compare/v2.11.0...v2.12.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bson&package-manager=cargo&previous-version=2.11.0&new-version=2.12.0)](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: df79694bffc030604f77a4bc7be3c478595d8ee2
2024-09-16 04:50:13 +00:00
Anon Ray
79e3685dc8 jsonapi: parse sort and pagination params (#1107)
<!-- The PR description should answer 2 important questions: -->

### What

Parse sorting and pagination params into OpenDD query IR.

Parsing filter expression will come in a follow-up PR.

### How

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

V3_GIT_ORIGIN_REV_ID: 375d9c267effbc67e125365329f472e2f6ecc6b9
2024-09-12 15:28:47 +00:00
Daniel Chambers
b2669516b5 Disallow aggregation of fields that have arguments (#1096)
### What
We do not support aggregating fields that have field arguments.
`AggregateExpressions` currently don't check for this and allow them.
This PR adds an error that blocks this scenario in metadata resolve.

This is unlikely to have occurred in the wild as the CLI does not yet
generate aggregates and field arguments are only really used in the
GraphQL connector which uses Commands not Models, so aggregates are not
used with it.

### How

A new check is added in metadata resolve to block fields that have
arguments. A test is added to verify this.

V3_GIT_ORIGIN_REV_ID: f7997d1930dc6ca65cdd3e7dc32caf6ac4908767
2024-09-12 13:30:37 +00:00
Daniel Chambers
af2102f102 Relax build error to a warning when the aggregate filterInputFieldName is missing from GraphQlConfig (#1105)
### What
This PR is similar to #1079 in that it relaxes a build error that occurs
into a warning. If you define a `Model` with aggregates but you haven't
defined the `query.aggregate` section in your `GraphqlConfig`, then you
currently get a build error telling you to do it. This PR relaxes this
to a warning and aggregates are just omitted from the Model GraphQL API
schema.

### How

The error is converted to an issue in metadata resolve. An existing test
that tested that error has been shifted to a passing test and the new
raised issue can be seen at the bottom of the resolved metadata
snapshot.

V3_GIT_ORIGIN_REV_ID: b864be90141e2a8940fa9a6269beb24021880636
2024-09-12 12:22:14 +00:00
Daniel Harvey
d1f4870b42 Split NDC query from processing (#1104)
<!-- The PR description should answer 2 important questions: -->

### What

Our function for fetching from NDC is wrapped up in remote joins and
GraphQL-shaped processing. As a first step, let's split those concerns.

### How

Split one function into three. Functional no-op.

V3_GIT_ORIGIN_REV_ID: e8a4690968829a4cb3695745d5b1741007fe0ced
2024-09-12 07:02:45 +00:00
Tom Harding
7db107921e Factor out jsonpath into its own crate (#1101)
<!-- The PR description should answer 2 important questions: -->

### What

We're going to start carrying around more `JSONPath` values, so let's
tidy up.

<!-- 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? -->

### How

I copied Dan's code.

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

V3_GIT_ORIGIN_REV_ID: 26aebcab7b40b672bac71d20aa3a072995519be3
2024-09-11 15:21:47 +00:00
Daniel Harvey
06dc001809 Use issues consistently (#1099)
<!-- The PR description should answer 2 important questions: -->

### What

In `metadata-resolve`, we raise `issues`, and then decide later if those
are `warnings` or `errors`. This fixes some naming and comments to make
that clearer.

V3_GIT_ORIGIN_REV_ID: 9d13de42a29dbdc00945468b3d9c843fff9099f7
2024-09-11 13:51:56 +00:00
Anon Ray
520d268f0b remove reference agent from docker-compose (#1098)
<!-- The PR description should answer 2 important questions: -->

### What

We do not use the reference agent anymore, for local dev or for tests.

This confuses users who are using the open source repo and trying to
start engine. It also has a port conflict with the `custom_connector`
service. So this doesn't even work. Remove the reference agent.

### How

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

V3_GIT_ORIGIN_REV_ID: bf42f0c2c23b20bb86ac736e3bf560fa53fc32f3
2024-09-11 09:37:53 +00:00
Anon Ray
d0bcab582a jsonapi: parsing URI parts into a OpenDD query IR (#1093)
<!-- The PR description should answer 2 important questions: -->

### What

Initial, hacky attempt to parse URI parts into the OpenDD query request.

This is not very useful yet. As we don't have any way to execute a
OpenDD query yet.

### How

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

V3_GIT_ORIGIN_REV_ID: 546c8954d08ddf403993307bd77518f3863dbd33
2024-09-11 08:58:21 +00:00
Anon Ray
323f5320cd add a missing typecheck while resolving model predicate (#1066)
<!-- The PR description should answer 2 important questions: -->

### What

FIx a pending TODO; add a missing typecheck while resolving model
predicates.

This will check for the types of literal values in value expressions
used in various predicates.

### How

Use the `typecheck_value_expression` function to typecheck while
resolving model predicates as well.

V3_GIT_ORIGIN_REV_ID: 299aa432bc3ec98910441223eac8c8fc1a082aec
2024-09-11 08:11:56 +00:00
Daniel Harvey
3e2a0ed690 Don't include .git folder and instead provide RELEASE_VERSION env var in Dockerfile (#1094)
<!-- The PR description should answer 2 important questions: -->

### What

The `Dockerfile` for `v3-engine` is provided for local development, and
is not what we use for production builds. Therefore there is no need to
version stamp it, so instead, provide `RELEASE_VERSION=dev` and don't
include the `.git` folder as this breaks when building from the
`graphql-engine` repo.

### How

Changes to root `Dockerfile`.

V3_GIT_ORIGIN_REV_ID: 6ed7ad43456c709e24b7768417436dcf6123adfa
2024-09-11 07:48:25 +00:00
Vamshi Surabhi
a33dc2e1a7 PACHA-82 sql: support empty arguments when arguments are all nullable (#1095)
<!-- The PR description should answer 2 important questions: -->

### What

We support `fn()` syntax when all arguments are nullable.

### How

Checks if all the arguments are nullable and handles this case. There
are bunch of unit tests added.

V3_GIT_ORIGIN_REV_ID: 65c3eff6200930474bc479b27666b77e4c648b49
2024-09-11 03:42:53 +00:00
Daniel Harvey
50e1ab5a67 frontends/graphql crate (#1049)
<!-- The PR description should answer 2 important questions: -->

### What

This extracts a GraphQL frontend crate from the `execute` crate. This
contains all the top level functions, as opposed to what remains in
`execute`, which concerns itself with the creation and execution of
plans.

This only moves code around and organises it a little more neatly, and
so makes no functional changes. The follow up will be to create and
expose a neater API.

Next steps:

- Arguably what is left in `execute` is now better named `plan`, but
this PR was already big enough.
- Once we have more than one `frontend`, the functions in `steps.rs` in
this crate should probably be shared somewhere.

### How

Moving files around.

V3_GIT_ORIGIN_REV_ID: 0e54310a27d06905ed1967395e97ab47751b65dc
2024-09-10 15:44:43 +00:00
Daniel Harvey
a275966b7b Basic test framework for jsonapi (#1091)
<!-- The PR description should answer 2 important questions: -->

### What

Let's add a test!

(and check it still works 👍 )

<img width="405" alt="Screenshot 2024-09-10 at 13 05 01"
src="https://github.com/user-attachments/assets/6a49feaa-bd0b-4137-a9d5-a1e1336d9fa6">

### How

Glob a folder for test files, parse them and run them against the
functions.

V3_GIT_ORIGIN_REV_ID: cc3e0d8cfb6f5eaa58cf72dab97e7220a57e7673
2024-09-10 15:14:33 +00:00
Anon Ray
745c1d53b2 wip: create an axum router for jsonapi (#1089)
<!-- The PR description should answer 2 important questions: -->

### What
WIP PoC of a dynamic router for json api. There is no actual execution.
This only implements a dynamic router, which can validate any path/URL
against the metadata.

The `json_api` module exports an `axum::Router` which is added to the
main router. It is currently hidden behind an unstable feature flag
`--enable-json-api`.

Added some clippy allow annotations as its WIP.

### How

Create an axum router which matches on any path. And then inside the
handler check and validate with an own internal state if the route is
valid. This internal state is derived from metadata and is built during
start-up.

V3_GIT_ORIGIN_REV_ID: b2ee0a3419bd9292af9acf1787381099d20da2ab
2024-09-10 11:08:42 +00:00
Daniel Harvey
6449161d67 Empty jsonapi crate (#1088)
<!-- The PR description should answer 2 important questions: -->

### What

Somewhere to put the `jsonapi` proof of concept.

### How

Empty crate

V3_GIT_ORIGIN_REV_ID: 5675b6fff57e54faa00f05630ae69f8d3471eb7f
2024-09-10 10:58:37 +00:00
dependabot[bot]
4b0cc1f3d8 Bump async-graphql-parser from 7.0.8 to 7.0.9 (#1087)
Bumps
[async-graphql-parser](https://github.com/async-graphql/async-graphql)
from 7.0.8 to 7.0.9.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/async-graphql/async-graphql/blob/master/CHANGELOG.md">async-graphql-parser's
changelog</a>.</em></p>
<blockquote>
<h1>[7.0.9] 2024-09-02</h1>
<ul>
<li>add <code>on_ping</code> callback to <code>WebSocket</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/async-graphql/async-graphql/commits">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-graphql-parser&package-manager=cargo&previous-version=7.0.8&new-version=7.0.9)](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: 0af1fd351dc4c0107f4bf36647ff123db862a3eb
2024-09-10 10:26:36 +00:00
dependabot[bot]
2f4d882377 Bump serde from 1.0.209 to 1.0.210 (#1086)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.209 to
1.0.210.
<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.210</h2>
<ul>
<li>Support serializing and deserializing <code>IpAddr</code> and
<code>SocketAddr</code> in no-std mode on Rust 1.77+ (<a
href="https://redirect.github.com/serde-rs/serde/issues/2816">#2816</a>,
thanks <a
href="https://github.com/MathiasKoch"><code>@​MathiasKoch</code></a>)</li>
<li>Make <code>serde::ser::StdError</code> and
<code>serde:🇩🇪:StdError</code> equivalent to
<code>core::error::Error</code> on Rust 1.81+ (<a
href="https://redirect.github.com/serde-rs/serde/issues/2818">#2818</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="89c4b02bf3"><code>89c4b02</code></a>
Release 1.0.210</li>
<li><a
href="eeb8e44cda"><code>eeb8e44</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2818">#2818</a>
from dtolnay/coreerror</li>
<li><a
href="785c2d9605"><code>785c2d9</code></a>
Stabilize no-std StdError trait</li>
<li><a
href="d549f048e1"><code>d549f04</code></a>
Reformat parse_ip_impl definition and calls</li>
<li><a
href="4c0dd63011"><code>4c0dd63</code></a>
Delete attr support from core::net deserialization macros</li>
<li><a
href="26fb134165"><code>26fb134</code></a>
Relocate cfg attrs out of parse_ip_impl and parse_socket_impl</li>
<li><a
href="07e614b52b"><code>07e614b</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2817">#2817</a>
from dtolnay/corenet</li>
<li><a
href="b1f899fbe8"><code>b1f899f</code></a>
Delete doc(cfg) attribute from impls that are supported in no-std</li>
<li><a
href="b4f860e627"><code>b4f860e</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2816">#2816</a>
from MathiasKoch/chore/core-net</li>
<li><a
href="d940fe1b49"><code>d940fe1</code></a>
Reuse existing Buf wrapper as replacement for std::io::Write</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210">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.209&new-version=1.0.210)](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: 096b9e0b665b9ae9ca6c42a5f758c5b75491208f
2024-09-10 10:15:36 +00:00
dependabot[bot]
6d4e3c7852 Bump similar-asserts from 1.5.0 to 1.6.0 (#1085)
Bumps [similar-asserts](https://github.com/mitsuhiko/similar-asserts)
from 1.5.0 to 1.6.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/similar-asserts/blob/main/CHANGELOG.md">similar-asserts's
changelog</a>.</em></p>
<blockquote>
<h2>1.6.0</h2>
<ul>
<li>Loosen static lifetime bounds for labels. <a
href="https://redirect.github.com/mitsuhiko/similar-asserts/issues/9">#9</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c5110ea8b4"><code>c5110ea</code></a>
Make clippy happy</li>
<li><a
href="b7a86e1f75"><code>b7a86e1</code></a>
Prepare 1.6.0</li>
<li><a
href="cdadae6d58"><code>cdadae6</code></a>
Loosen static lifetime bound for labels (<a
href="https://redirect.github.com/mitsuhiko/similar-asserts/issues/9">#9</a>)</li>
<li>See full diff in <a
href="https://github.com/mitsuhiko/similar-asserts/compare/1.5.0...1.6.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=similar-asserts&package-manager=cargo&previous-version=1.5.0&new-version=1.6.0)](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: 7c4289bc40152a353b804ecd228ae879e452c810
2024-09-10 10:15:32 +00:00
dependabot[bot]
ce6d92eff3 Bump tokio-util from 0.7.11 to 0.7.12 (#1084)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.11 to
0.7.12.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="35f244ad09"><code>35f244a</code></a>
chore: prepare tokio-util v0.7.12 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6823">#6823</a>)</li>
<li><a
href="1166ecc2ac"><code>1166ecc</code></a>
config: enable full for tokio-util in the playground (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6818">#6818</a>)</li>
<li><a
href="27539ae3bd"><code>27539ae</code></a>
runtime: fix race in yield_defers_until_park test (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6809">#6809</a>)</li>
<li><a
href="ea6d652a10"><code>ea6d652</code></a>
chore: prepare Tokio v1.40.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6806">#6806</a>)</li>
<li><a
href="11f66f43a0"><code>11f66f4</code></a>
chore: replace <code>ready!</code> with <code>std::task::ready!</code>
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6804">#6804</a>)</li>
<li><a
href="479a56a010"><code>479a56a</code></a>
time: eliminate timer wheel allocations (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6779">#6779</a>)</li>
<li><a
href="b37f0de28a"><code>b37f0de</code></a>
runtime: implement initial set of task hooks (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6742">#6742</a>)</li>
<li><a
href="c9fad08466"><code>c9fad08</code></a>
codec: fix typo in the docs for <code>Encoder::Error</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6800">#6800</a>)</li>
<li><a
href="cc70a211ad"><code>cc70a21</code></a>
task: add <code>join_all</code> method to <code>JoinSet</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6784">#6784</a>)</li>
<li><a
href="1ac8dff213"><code>1ac8dff</code></a>
task: add <code>AbortOnDropHandle</code> type (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6786">#6786</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.11...tokio-util-0.7.12">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio-util&package-manager=cargo&previous-version=0.7.11&new-version=0.7.12)](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: 31da61f525f37f48d2c2221f39a7d538e3425331
2024-09-10 10:12:49 +00:00
dependabot[bot]
a2f7ce23c7 Bump async-trait from 0.1.81 to 0.1.82 (#1083)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.81
to 0.1.82.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/async-trait/releases">async-trait's
releases</a>.</em></p>
<blockquote>
<h2>0.1.82</h2>
<ul>
<li>Prevent elided_named_lifetimes lint being produced in generated code
(<a
href="https://redirect.github.com/dtolnay/async-trait/issues/276">#276</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f8e5bb4318"><code>f8e5bb4</code></a>
Release 0.1.82</li>
<li><a
href="8fbf118de3"><code>8fbf118</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/async-trait/issues/276">#276</a>
from dtolnay/elidednamed</li>
<li><a
href="6fa246a054"><code>6fa246a</code></a>
Ignore nightly's new elided_named_lifetimes lint in generated code</li>
<li><a
href="d542a0dd74"><code>d542a0d</code></a>
Upload CI Cargo.lock for reproducing failures</li>
<li><a
href="8828c35a86"><code>8828c35</code></a>
Sort dependency features in Cargo.toml</li>
<li><a
href="ba9793af3f"><code>ba9793a</code></a>
Update ui test suite to nightly-2024-08-11</li>
<li><a
href="82c62cd075"><code>82c62cd</code></a>
Update ui test suite to nightly-2024-07-25</li>
<li><a
href="370ee12dcc"><code>370ee12</code></a>
Update ui test suite to nightly-2024-07-20</li>
<li>See full diff in <a
href="https://github.com/dtolnay/async-trait/compare/0.1.81...0.1.82">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-trait&package-manager=cargo&previous-version=0.1.81&new-version=0.1.82)](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: 2ce0181b6e26acd50bcac8c20c213ebd80561daf
2024-09-10 09:56:00 +00:00
Daniel Chambers
5d5e21e8eb Raise a warning instead of an error if aggregates are configured for graphql use but GraphqlConfig is missing aggregates configuration (#1079)
### What
If a user configures `AggregateExpressions` in their metadata with the
`graphql` section configured, but forgets to configure `aggregates` in
`GraphqlConfig`, an error was raised and the build failed. This scenario
occurs when a user has an existing pre-aggregrates metadata and are
adding aggregates to it later.

While simply adding the required configuration to `GraphqlConfig` would
fix the error, there are cases where the `GraphqlConfig` is not in the
user's current repo, such as where they are working in a separate
subgraph repo and the `GraphqlConfig` is managed elsewhere and requires
a coordinated change.

This PR turns that error into a warning and allows a successful build.
The build will not have aggregates show up in the GraphQL, but does
succeed, which allows the user to progress until the `GraphqlConfig` is
updated separately.

### How

A new `AggregateExpressionIssue` type is added and the error is moved
from `AggregateExpressionError` to that type instead. The code then logs
the new issue and contributes it to the main issues collection.

The test that checked for this error (a failure test) has been moved to
a successful test and the warning can be seen at the bottom of the new
snapshot file.

V3_GIT_ORIGIN_REV_ID: 751590c484feec4ae03f079ae6a1bc0bf867ff64
2024-09-10 07:48:13 +00:00
dependabot[bot]
da544547ff Bump serde_json from 1.0.127 to 1.0.128 (#1073)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.127 to
1.0.128.
<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>1.0.128</h2>
<ul>
<li>Support serializing maps containing 128-bit integer keys to
serde_json::Value (<a
href="https://redirect.github.com/serde-rs/json/issues/1188">#1188</a>,
thanks <a
href="https://github.com/Mrreadiness"><code>@​Mrreadiness</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d96b1d9b64"><code>d96b1d9</code></a>
Release 1.0.128</li>
<li><a
href="599228d5dc"><code>599228d</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1188">#1188</a>
from Mrreadiness/feat/add-hashmap-key-128-serializer</li>
<li><a
href="5416cee6c5"><code>5416cee</code></a>
feat: add support for 128 bit HashMap key serialization</li>
<li><a
href="27a4ca9d7a"><code>27a4ca9</code></a>
Upload CI Cargo.lock for reproducing failures</li>
<li>See full diff in <a
href="https://github.com/serde-rs/json/compare/1.0.127...1.0.128">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.127&new-version=1.0.128)](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: c6df67f3a862c0eabd372688d42c4b68ca56a939
2024-09-09 07:02:12 +00:00
dependabot[bot]
50527d876f Bump clap from 4.5.16 to 4.5.17 (#1072)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.16 to 4.5.17.
<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.17</h2>
<h2>[4.5.17] - 2024-09-04</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Style required argument groups</li>
<li><em>(derive)</em> Improve error messages when unsupported fields are
used</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.17] - 2024-09-04</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Style required argument groups</li>
<li><em>(derive)</em> Improve error messages when unsupported fields are
used</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6013ad4f67"><code>6013ad4</code></a>
chore: Release</li>
<li><a
href="f98e3ee215"><code>f98e3ee</code></a>
docs: Update changelog</li>
<li><a
href="addec17e9d"><code>addec17</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5681">#5681</a>
from epage/static</li>
<li><a
href="3c69aaa312"><code>3c69aaa</code></a>
docs(complete): Add stdout warning to env</li>
<li><a
href="e46263a048"><code>e46263a</code></a>
docs(complete): Redistribute dynamic's documentation</li>
<li><a
href="de723aaf8a"><code>de723aa</code></a>
fix(complete)!: Flatten in prep for stabilization</li>
<li><a
href="6727c1537b"><code>6727c15</code></a>
fix(complete): Section off existing completions</li>
<li><a
href="6842ed96da"><code>6842ed9</code></a>
refactor(complete): Remove low-value w macro</li>
<li><a
href="17d6d24232"><code>17d6d24</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5680">#5680</a>
from epage/unstable</li>
<li><a
href="23fb0568a8"><code>23fb056</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5679">#5679</a>
from epage/api</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.16...clap_complete-v4.5.17">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.16&new-version=4.5.17)](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: 49b80a6725973f691e34caf8e89750cf6765bc70
2024-09-09 07:02:08 +00:00
dependabot[bot]
1d34b85c58 Bump anyhow from 1.0.86 to 1.0.87 (#1071)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.86 to 1.0.87.
<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.87</h2>
<ul>
<li>Support more APIs, including <code>Error::new</code> and
<code>Error::chain</code>, in no-std mode on Rust 1.81+ (<a
href="https://redirect.github.com/dtolnay/anyhow/issues/383">#383</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="afe93e7b16"><code>afe93e7</code></a>
Release 1.0.87</li>
<li><a
href="d58fa4b282"><code>d58fa4b</code></a>
Fix outdated html_root_url</li>
<li><a
href="c18d80743c"><code>c18d807</code></a>
Disable unused doc_cfg feature</li>
<li><a
href="8ecfcdfa0a"><code>8ecfcdf</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/383">#383</a>
from dtolnay/nostd</li>
<li><a
href="bee814ab1b"><code>bee814a</code></a>
Support error sources in no-std on Rust 1.81+</li>
<li><a
href="1eabf69388"><code>1eabf69</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/382">#382</a>
from dtolnay/corerequest</li>
<li><a
href="3e70139e07"><code>3e70139</code></a>
Access generic_member_access APIs through core</li>
<li><a
href="c378a2c32e"><code>c378a2c</code></a>
Upload CI Cargo.lock for reproducing failures</li>
<li><a
href="e38edc09bb"><code>e38edc0</code></a>
Raise rustc required for backtrace feature to 1.67</li>
<li><a
href="eb976a4f53"><code>eb976a4</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/378">#378</a>
from dtolnay/ttpretty</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/anyhow/compare/1.0.86...1.0.87">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.86&new-version=1.0.87)](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: 0e213334b2225815d4606c4e55f6d84fab2e5074
2024-09-09 07:01:03 +00:00
dependabot[bot]
d468d794a9 Bump insta from 1.39.0 to 1.40.0 (#1070)
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.39.0 to 1.40.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/insta/releases">insta's
releases</a>.</em></p>
<blockquote>
<h2>1.40.0</h2>
<h2>Release Notes</h2>
<ul>
<li>
<p><code>cargo-insta</code> no longer panics when running <code>cargo
test --accept --workspace</code>
on a workspace with a default crate. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/532">#532</a></p>
</li>
<li>
<p>MSRV for <code>insta</code> has been raised to 1.60, and for
<code>cargo-insta</code> to 1.64.</p>
</li>
<li>
<p>Added support for compact debug snapshots
(<code>assert_compact_debug_snapshot</code>). <a
href="https://redirect.github.com/mitsuhiko/insta/issues/514">#514</a></p>
</li>
<li>
<p>Deprecate <code>--no-force-pass</code> in <code>cargo-insta</code>.
The <code>--check</code> option covers the
same functionality and has a clearer name. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/513">#513</a></p>
</li>
<li>
<p>Inline snapshots now use the required number of <code>#</code>s to
escape the snapshot
value, rather than always using <code>###</code>. This allows
snapshotting values which
themselves contain <code>###</code>. If there are no existing
<code>#</code> characters in the
snapshot value, a single <code>#</code> will be used. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/540">#540</a></p>
</li>
<li>
<p>Inline snapshots can now be updated with
<code>--force-update-snapshots</code>. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/569">#569</a></p>
</li>
<li>
<p><code>cargo insta test</code> accepts multiple <code>--exclude</code>
flags. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/520">#520</a></p>
</li>
<li>
<p><code>test</code> <code>runner</code> in insta's yaml config works.
<a
href="https://redirect.github.com/mitsuhiko/insta/issues/544">#544</a></p>
</li>
<li>
<p>Print a warning when encountering old snapshot formats. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/503">#503</a></p>
</li>
<li>
<p>Group the options in <code>cargo insta --help</code>, upgrade to
<code>clap</code> from <code>structopt</code>. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/518">#518</a></p>
</li>
<li>
<p>No longer suggest running <code>cargo insta</code> message when
running <code>cargo insta test --check</code>. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/515">#515</a></p>
</li>
<li>
<p>Print a clearer error message when accepting a snapshot that was
removed. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/516">#516</a></p>
</li>
<li>
<p>Mark <code>require-full-match</code> as experimental, given some
corner-cases are currently difficult to manage. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/497">#497</a></p>
</li>
<li>
<p>Add a new integration test approach for <code>cargo-insta</code> and
a set of integration tests. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/537">#537</a></p>
</li>
<li>
<p>Enable Filters to be created from <code>IntoIterator</code> types,
rather than just <code>Vec</code>s. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/570">#570</a></p>
</li>
<li>
<p>Implemented total sort order for an internal <code>Key</code> type
correctly. This prevents potential
crashes introduced by the new sort algorithm in Rust 1.81. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/586">#586</a></p>
</li>
</ul>
<h2>Install cargo-insta 1.40.0</h2>
<h3>Install prebuilt binaries via shell script</h3>
<pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf
https://github.com/mitsuhiko/insta/releases/download/1.40.0/cargo-insta-installer.sh
| sh
</code></pre>
<h3>Install prebuilt binaries via powershell script</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md">insta's
changelog</a>.</em></p>
<blockquote>
<h2>1.40.0</h2>
<ul>
<li>
<p><code>cargo-insta</code> no longer panics when running <code>cargo
insta test --accept --workspace</code>
on a workspace with a default crate. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/532">#532</a></p>
</li>
<li>
<p>MSRV for <code>insta</code> has been raised to 1.60, and for
<code>cargo-insta</code> to 1.64.</p>
</li>
<li>
<p>Added support for compact debug snapshots
(<code>assert_compact_debug_snapshot</code>). <a
href="https://redirect.github.com/mitsuhiko/insta/issues/514">#514</a></p>
</li>
<li>
<p>Deprecate <code>--no-force-pass</code> in <code>cargo-insta</code>.
The <code>--check</code> option covers the
same functionality and has a clearer name. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/513">#513</a></p>
</li>
<li>
<p>Inline snapshots now use the required number of <code>#</code>s to
escape the snapshot
value, rather than always using <code>###</code>. This allows
snapshotting values which
themselves contain <code>###</code>. If there are no existing
<code>#</code> characters in the
snapshot value, a single <code>#</code> will be used. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/540">#540</a></p>
</li>
<li>
<p>Inline snapshots can now be updated with
<code>--force-update-snapshots</code>. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/569">#569</a></p>
</li>
<li>
<p><code>cargo insta test</code> accepts multiple <code>--exclude</code>
flags. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/520">#520</a></p>
</li>
<li>
<p><code>test</code> <code>runner</code> in insta's yaml config works.
<a
href="https://redirect.github.com/mitsuhiko/insta/issues/544">#544</a></p>
</li>
<li>
<p>Print a warning when encountering old snapshot formats. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/503">#503</a></p>
</li>
<li>
<p>Group the options in <code>cargo insta --help</code>, upgrade to
<code>clap</code> from <code>structopt</code>. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/518">#518</a></p>
</li>
<li>
<p>No longer suggest running <code>cargo insta</code> message when
running <code>cargo insta test --check</code>. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/515">#515</a></p>
</li>
<li>
<p>Print a clearer error message when accepting a snapshot that was
removed. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/516">#516</a></p>
</li>
<li>
<p>Mark <code>require-full-match</code> as experimental, given some
corner-cases are currently difficult to manage. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/497">#497</a></p>
</li>
<li>
<p>Add a new integration test approach for <code>cargo-insta</code> and
a set of integration tests. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/537">#537</a></p>
</li>
<li>
<p>Enable Filters to be created from <code>IntoIterator</code> types,
rather than just <code>Vec</code>s. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/570">#570</a></p>
</li>
<li>
<p>Implemented total sort order for an internal <code>Key</code> type
correctly. This prevents potential
crashes introduced by the new sort algorithm in Rust 1.81. <a
href="https://redirect.github.com/mitsuhiko/insta/issues/586">#586</a></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="83f33653b6"><code>83f3365</code></a>
1.40.0</li>
<li><a
href="8893db7600"><code>8893db7</code></a>
Implement total ord for Key (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/586">#586</a>)</li>
<li><a
href="a4231cc826"><code>a4231cc</code></a>
Add test for <code>find_snapshot_macro</code> (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/582">#582</a>)</li>
<li><a
href="d609d7d3a8"><code>d609d7d</code></a>
Add integration test for force updating (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/580">#580</a>)</li>
<li><a
href="02665eafb2"><code>02665ea</code></a>
Mask insta env vars in integration tests (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/579">#579</a>)</li>
<li><a
href="ef7abb839e"><code>ef7abb8</code></a>
Use different tests for redactions (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/578">#578</a>)</li>
<li><a
href="597199d9dc"><code>597199d</code></a>
Make <code>test_normalize_inline_snapshot</code> easier to read (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/577">#577</a>)</li>
<li><a
href="ca87b84da2"><code>ca87b84</code></a>
Fix latest clippy (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/574">#574</a>)</li>
<li><a
href="4bea0fb821"><code>4bea0fb</code></a>
Unify handling of file &amp; inline snapshots (compat) (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/528">#528</a>)</li>
<li><a
href="c29db01606"><code>c29db01</code></a>
Enable inline snapshots to be force-updated (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/569">#569</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mitsuhiko/insta/compare/1.39.0...1.40.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=insta&package-manager=cargo&previous-version=1.39.0&new-version=1.40.0)](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: 8a97c613401207b8f7fa9f9ae5f3e46464589d8a
2024-09-09 07:00:59 +00:00
dependabot[bot]
da97a53513 Bump goldenfile from 1.7.1 to 1.7.3 (#1069)
Bumps [goldenfile](https://github.com/calder/rust-goldenfile) from 1.7.1
to 1.7.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/calder/rust-goldenfile/commits">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=goldenfile&package-manager=cargo&previous-version=1.7.1&new-version=1.7.3)](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: d714812c271bacf19d0b921d916fd3fa89106173
2024-09-09 06:46:38 +00:00
Phil Freeman
6363ac8289 [PACHA-80] Fix issue with generated uniqueness constraints (#1064)
<!-- The PR description should answer 2 important questions: -->

### What

- Check all columns exist in SQL schema before exposing uniqueness
constraints.

### How

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

V3_GIT_ORIGIN_REV_ID: 0f8c25e4f8b6b9aa5647a0acdba5e9c233ccb77d
2024-09-06 19:32:52 +00:00
Phil Freeman
e96acd1fe5 [PACHA-22] Disallow recursive types in SQL table column types (#1056)
<!-- The PR description should answer 2 important questions: -->

### What

- Disallow recursive types in types of table columns

### How

- As we walk down the table type constructing the corresponding Arrow
types, we keep track of a set of struct type names that we've seen.
- If we see a type name we've seen before, we don't include the current
field:
  - If we're in a nested context, we cascade the field deletion up
  - If we're at a top-level table column, we remove that column.

With this approach, the fields which are removed never depend on the
path the traversal takes, so we never end up with a reference to a named
struct type which in reality fetches only a subset of the total fields.
A named type always refers to the same set of fields.

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

V3_GIT_ORIGIN_REV_ID: 270a71cd5b1d3700067abf7c771c473bbc33167e
2024-09-06 18:55:50 +00:00
Anon Ray
00073bbe22 gardening: move resolve_model_predicate_with_type to appropriate location (#1065)
### What

Move `resolve_model_predicate_with_type` from `helpers::argument` to
`model_permissions` module, so it's easier to follow when reading.

Functional no-op.

### How

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

V3_GIT_ORIGIN_REV_ID: 8963e9c9e356a4fe66176ee27aabc8d5052cbc59
2024-09-06 10:04:30 +00:00
Rakesh Emmadi
e965536a1d Update changelog for Release v2024.09.05 (#1061)
<!-- The PR description should answer 2 important questions: -->

### What
As title.

<!-- 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? -->

V3_GIT_ORIGIN_REV_ID: 321053fa840d1e15780bbea8881e87dafd32674c
2024-09-05 13:23:56 +00:00
Rakesh Emmadi
39e39a9333 fix span name and description around in-engine predicate resolution (#1060)
<!-- The PR description should answer 2 important questions: -->

### What
Update the span name and description around a function that handles the
predicates resolved in-engine.

<!-- 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? -->

V3_GIT_ORIGIN_REV_ID: 4d72c0b3e41d105f6a7e4f4357b15a8e91e923ad
2024-09-05 11:41:10 +00:00
Rakesh Emmadi
0f5b80f4be update changelog for bypass relations_comparisons capability feature (#1059)
<!-- The PR description should answer 2 important questions: -->

### What
Just updates the changelog by including the context for compatibility
date.

V3_GIT_ORIGIN_REV_ID: 19cccc551a0841e26d48859f640a3135ce41a49f
2024-09-05 10:50:16 +00:00
Rakesh Emmadi
7285c2cc7a Generate GraphQL schema for subscriptions (#1051)
<!-- 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? -->
Enable generating GraphQL schema for subscriptions. The execution of the
subscriptions yet to be implemented.

V3_GIT_ORIGIN_REV_ID: 2380423c39bdafbff0fc4011c0bc461e2fb0da14
2024-09-05 10:14:28 +00:00
paritosh-08
f039750929 plugin url should be an environment variable (#1057)
<!-- The PR description should answer 2 important questions: -->

### What

The plugin URL should be an environment, not a string. This PR fixes
this.

### How

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

By changing the type

V3_GIT_ORIGIN_REV_ID: e3d4409f2dcbc70f59adc41bf61645977cab6e47
2024-09-05 06:37:10 +00:00
Daniel Chambers
638d61a99d Add support for externally tagged enums to the OpenDD macro (#1054)
### What
This PR adds support for externally tagged enums to the OpenDD macro. We
already use externally tagged enums in the OpenDD schema (such as
BooleanExpressionType operands, or AggregateExpression operands), but
those are currently handled by schemars. By switching them to use an
OpenDD macro-based implementation, we can hide new enum variants using
the hidden flag while they are under development.

So enums such as:

```rust
#[derive(OpenDd)]
#[opendd(externally_tagged)]
enum ExternallyTaggedEnum {
    VariantOne(VariantOneStruct),
    VariantTwo(VariantTwoStruct),
}

#[derive(Debug, PartialEq, OpenDd)]
struct VariantOneStruct {
    prop_a: String,
    prop_b: i32,
}

#[derive(Debug, PartialEq, OpenDd)]
struct VariantTwoStruct {
    prop_1: bool,
    prop_2: String,
}
```

can now be serialized as JSON like so:

```json
{
  "variantTwo": {
    "prop1": true,
    "prop2": "testing"
  }
}
```

### How

The existing macro has been updated in `opendds-derive` to support the
new `externally_tagged` marker. Tests have been added to
`open-dds/src/traits.rs` to check the correct functioning of the new
support.

In addition, existing OpenDD types such as `AggregateOperand` and
`BooleanExpressionOperand` have been ported to use the OpenDD macro
instead of JsonSchema. The generated OpenDD schema does not change
thanks to switching macros, which indicates the correct and equivalent
JSON schema is being generated.

V3_GIT_ORIGIN_REV_ID: 53239d9115950b5f41b9a1fdae959c4d3b7d27db
2024-09-05 06:36:31 +00:00
Phil Freeman
7a31d2d610 [PACHA-21] support uniqueness constraints in SQL layer (#1037)
<!-- The PR description should answer 2 important questions: -->

### What

Exposes SQL constraints to datafusion's planner via the
`TableProvider::constraints()` trait method.

### How

We pull these constraints from the GraphQL configuration for the model.
This is not ideal - the data should really live at the model layer now.
But we can hopefully solve that later.

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

V3_GIT_ORIGIN_REV_ID: c723d895fd707e24defae971f474b5938478a82b
2024-09-03 19:19:47 +00:00
Rakesh Emmadi
8d926ce281 query usage analytics: add deprecated_reason and extend deprecated to relationships (#1053)
<!-- 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? -->
- Introduce `deprecation_reason` for OpenDD objects where deprecation is
allowed, in query usage analytics.
- Extend the deprecation to relationship field usage

V3_GIT_ORIGIN_REV_ID: eacef947f73345df1a899bd9c38e219556995f22
2024-09-03 13:28:53 +00:00
Anon Ray
fc6624368b update changelog for v2024.09.02 (#1052)
<!-- The PR description should answer 2 important questions: -->

### What
Same as the title
<!-- 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? -->

### How

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

V3_GIT_ORIGIN_REV_ID: e2e62c9455d0aa6a54aae10f3f15992a1ce75ecb
2024-09-03 07:31:05 +00:00
paritosh-08
7d01877f52 update changelog for v2024.09.02 (#1047)
update changelog for the new release:
https://github.com/hasura/v3-engine/blob/release/v2024.09.02/changelog.md

---------

Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com>
V3_GIT_ORIGIN_REV_ID: 2a95147d721f9275a851d427fd548a1e9c9f7d56
2024-09-02 15:20:31 +00:00
Rakesh Emmadi
f311eb454e Support for relationships in boolean expressions without the relation_comparisons capability (#1035)
<!-- The PR description should answer 2 important questions: -->

### What

This PR enhances the relationship handling in the filter predicates.
When local relationships lack the `relation_comparisons` capability for
underlying data connector, the predicate is handled just like remote
relationships. This will remove the dependence on the
`relation_comparison` capability for relationships.

The `relation_comparison` capability is useful for pushing down the
local relationships to NDC, where the predicates are resolved more
efficiently than handling them engine itself (like remote
relationships).

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- While building the GraphQL schema for boolean expressions, don't check
for the capability presence. All available relationships can be
included.
- Introduce a new enum type for execution strategy for relationships in
predicates. Rename existing enum variants accordingly.
- Tests: Uses `jq-rs` crate to modify the common metadata to remove the
capability in-memory.

---------

Co-authored-by: Daniel Chambers <daniel@hasura.io>
V3_GIT_ORIGIN_REV_ID: ccc8a1304c80954d1c54d56b71e41a7c22b5a05d
2024-09-02 12:10:19 +00:00
Daniel Harvey
95c1869000 Allow metadata file to be passed as argument to 'just run' (#1046)
<!-- The PR description should answer 2 important questions: -->

### What

Quick quality of life improvement for making demos, now we can run:

```
just run ./my-demo-metadata.json
```

And this will start all the containers and run engine with the specified
file.

### How

Justfile arguments

V3_GIT_ORIGIN_REV_ID: 2dc47a06ab85d815393047714e76342fb4859db2
2024-09-02 10:50:26 +00:00
Rakesh Emmadi
4129927ae8 OpenDD: Don't assume defaults for the subscription root field, and serialize only when the value is not empty (#1045)
<!-- 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?
-->

Subscriptions are not fully implemented.
- Having `subscription` in GraphQL config can break `ddn` local build
workflow.
- Avoid serializing `subscription` field in GraphQL config OpenDD
metadata.
- Don't assume default `subscription` root field in graphql fallback
config.

V3_GIT_ORIGIN_REV_ID: 508b611d7bfabddaa5def595ab25c9922dc2fe65
2024-09-02 09:49:49 +00:00
Daniel Harvey
0e67f22460 Implement orderableRelationships (#1040)
<!-- The PR description should answer 2 important questions: -->

### What

`orderableRelationships` on an `OrderByExpression` allow configuring
which relationships are allowed in a given ordering, and overwriting the
`OrderByExpression` used for relationship fields.

We make these work, but leave anything from pre-`OrderByExpression`
working as was.

This work is behind a feature flag so is a functional no-op.

### How

Mostly `schema` changes.

V3_GIT_ORIGIN_REV_ID: 2a7f9101f3d64f4f54182a269f2b18147f310a8b
2024-09-02 07:39:30 +00:00
dependabot[bot]
6aef2042b6 Bump indexmap from 2.4.0 to 2.5.0 (#1044)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.4.0 to
2.5.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md">indexmap's
changelog</a>.</em></p>
<blockquote>
<h2>2.5.0</h2>
<ul>
<li>Added an <code>insert_before</code> method to <code>IndexMap</code>
and <code>IndexSet</code>, as an
alternative to <code>shift_insert</code> with different behavior on
existing entries.</li>
<li>Added <code>first_entry</code> and <code>last_entry</code> methods
to <code>IndexMap</code>.</li>
<li>Added <code>From</code> implementations between
<code>IndexedEntry</code> and <code>OccupiedEntry</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="48ed49017c"><code>48ed490</code></a>
Release 2.5.0</li>
<li><a
href="139d7addfb"><code>139d7ad</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/340">#340</a>
from cuviper/insert-bounds</li>
<li><a
href="1d9b5e3d03"><code>1d9b5e3</code></a>
Add doc examples for <code>insert_before</code> and
<code>shift_insert</code></li>
<li><a
href="8ca01b0df7"><code>8ca01b0</code></a>
Use <code>insert_before</code> for &quot;new&quot; entries in
<code>insert_sorted</code></li>
<li><a
href="7224def010"><code>7224def</code></a>
Add <code>insert_before</code> as an alternate to
<code>shift_insert</code></li>
<li><a
href="0247a1555d"><code>0247a15</code></a>
Document and assert index bounds in <code>shift_insert</code></li>
<li><a
href="922c6ad1af"><code>922c6ad</code></a>
Update the CI badge</li>
<li><a
href="e482e1768a"><code>e482e17</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/342">#342</a>
from cuviper/btree-like</li>
<li><a
href="b63e4a1556"><code>b63e4a1</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/341">#341</a>
from cuviper/from-entry</li>
<li><a
href="264e5b7304"><code>264e5b7</code></a>
Add doc aliases like <code>BTreeMap</code>/<code>BTreeSet</code></li>
<li>Additional commits viewable in <a
href="https://github.com/indexmap-rs/indexmap/compare/2.4.0...2.5.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=indexmap&package-manager=cargo&previous-version=2.4.0&new-version=2.5.0)](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: 5c87c8f87635486e4bcb7cefeabe3ded04c8356b
2024-09-02 06:55:51 +00:00
dependabot[bot]
cec7943e4a Bump syn from 2.0.76 to 2.0.77 (#1043)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.76 to 2.0.77.
<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.77</h2>
<ul>
<li>Support parsing <code>Expr::Tuple</code> in non-&quot;full&quot;
mode (<a
href="https://redirect.github.com/dtolnay/syn/issues/1727">#1727</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6232266b0b"><code>6232266</code></a>
Release 2.0.77</li>
<li><a
href="97acbf0ffa"><code>97acbf0</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1727">#1727</a>
from dtolnay/exprparen</li>
<li><a
href="a3b5a5c109"><code>a3b5a5c</code></a>
Support parsing Expr::Tuple in derive</li>
<li><a
href="3c24f576d7"><code>3c24f57</code></a>
Run upload-artifact action regardless of previous step failure</li>
<li><a
href="78608a3ebe"><code>78608a3</code></a>
Upload CI Cargo.lock for reproducing failures</li>
<li>See full diff in <a
href="https://github.com/dtolnay/syn/compare/2.0.76...2.0.77">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.76&new-version=2.0.77)](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: 1becc211a5c96908bcabc9786dc232df9b3391fd
2024-09-02 06:55:46 +00:00
dependabot[bot]
4f6dca5e44 Bump async-graphql-parser from 7.0.7 to 7.0.8 (#1042)
Bumps
[async-graphql-parser](https://github.com/async-graphql/async-graphql)
from 7.0.7 to 7.0.8.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/async-graphql/async-graphql/blob/master/CHANGELOG.md">async-graphql-parser's
changelog</a>.</em></p>
<blockquote>
<h1>[7.0.8] 2024-09-01</h1>
<ul>
<li>chore: Make Extensions nullable <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1563">#1563</a></li>
<li>expose <code>rejection</code> in <code>async_graphql_axum</code> <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1571">#1571</a></li>
<li>Updated crate <code>time</code> to <code>3.36</code>, as it fixes a
compilation error in rust <code>1.80</code> <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1572">#1572</a></li>
<li>Impl <code>Debug</code> for <code>dynamic::FieldValue</code> &amp;
Improve error messages for its methods <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1582">#1582</a></li>
<li>Support scraping <code>#[doc = ...]</code> attributes when
generating descriptions <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1581">#1581</a></li>
<li>add <code>Websocket::keepalive_timeout</code> method to sets a
timeout for receiving an acknowledgement of the keep-alive ping.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/async-graphql/async-graphql/commits">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-graphql-parser&package-manager=cargo&previous-version=7.0.7&new-version=7.0.8)](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: 4da6ca66a33e1bb8051bcc18ea65fe4e106395e2
2024-09-02 06:54:48 +00:00
dependabot[bot]
8c4a728bc0 Bump tokio from 1.39.3 to 1.40.0 (#1041)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.39.3 to 1.40.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.40.0</h2>
<h1>1.40.0 (August 30th, 2024)</h1>
<h3>Added</h3>
<ul>
<li>io: add <code>util::SimplexStream</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6589">#6589</a>)</li>
<li>process: stabilize <code>Command::process_group</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6731">#6731</a>)</li>
<li>sync: add <code>{TrySendError,SendTimeoutError}::into_inner</code>
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6755">#6755</a>)</li>
<li>task: add <code>JoinSet::join_all</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6784">#6784</a>)</li>
</ul>
<h3>Added (unstable)</h3>
<ul>
<li>runtime: add <code>Builder::{on_task_spawn,
on_task_terminate}</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6742">#6742</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>io: use vectored io for <code>write_all_buf</code> when possible (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6724">#6724</a>)</li>
<li>runtime: prevent niche-optimization to avoid triggering miri (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6744">#6744</a>)</li>
<li>sync: mark mpsc types as <code>UnwindSafe</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6783">#6783</a>)</li>
<li>sync,time: make <code>Sleep</code> and <code>BatchSemaphore</code>
instrumentation explicit roots (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6727">#6727</a>)</li>
<li>task: use <code>NonZeroU64</code> for <code>task::Id</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6733">#6733</a>)</li>
<li>task: include panic message when printing <code>JoinError</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6753">#6753</a>)</li>
<li>task: add <code>#[must_use]</code> to
<code>JoinHandle::abort_handle</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6762">#6762</a>)</li>
<li>time: eliminate timer wheel allocations (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6779">#6779</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>docs: clarify that <code>[build]</code> section doesn't go in
Cargo.toml (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6728">#6728</a>)</li>
<li>io: clarify zero remaining capacity case (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6790">#6790</a>)</li>
<li>macros: improve documentation for <code>select!</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6774">#6774</a>)</li>
<li>sync: document mpsc channel allocation behavior (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6773">#6773</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/6589">#6589</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6589">tokio-rs/tokio#6589</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6724">#6724</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6724">tokio-rs/tokio#6724</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6727">#6727</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6727">tokio-rs/tokio#6727</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6728">#6728</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6728">tokio-rs/tokio#6728</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6731">#6731</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6731">tokio-rs/tokio#6731</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6733">#6733</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6733">tokio-rs/tokio#6733</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6742">#6742</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6742">tokio-rs/tokio#6742</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6744">#6744</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6744">tokio-rs/tokio#6744</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6753">#6753</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6753">tokio-rs/tokio#6753</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6755">#6755</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6755">tokio-rs/tokio#6755</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6762">#6762</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6762">tokio-rs/tokio#6762</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6773">#6773</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6773">tokio-rs/tokio#6773</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6774">#6774</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6774">tokio-rs/tokio#6774</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6779">#6779</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6779">tokio-rs/tokio#6779</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6783">#6783</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6783">tokio-rs/tokio#6783</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6784">#6784</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6784">tokio-rs/tokio#6784</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6790">#6790</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6790">tokio-rs/tokio#6790</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ea6d652a10"><code>ea6d652</code></a>
chore: prepare Tokio v1.40.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6806">#6806</a>)</li>
<li><a
href="11f66f43a0"><code>11f66f4</code></a>
chore: replace <code>ready!</code> with <code>std::task::ready!</code>
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6804">#6804</a>)</li>
<li><a
href="479a56a010"><code>479a56a</code></a>
time: eliminate timer wheel allocations (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6779">#6779</a>)</li>
<li><a
href="b37f0de28a"><code>b37f0de</code></a>
runtime: implement initial set of task hooks (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6742">#6742</a>)</li>
<li><a
href="c9fad08466"><code>c9fad08</code></a>
codec: fix typo in the docs for <code>Encoder::Error</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6800">#6800</a>)</li>
<li><a
href="cc70a211ad"><code>cc70a21</code></a>
task: add <code>join_all</code> method to <code>JoinSet</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6784">#6784</a>)</li>
<li><a
href="1ac8dff213"><code>1ac8dff</code></a>
task: add <code>AbortOnDropHandle</code> type (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6786">#6786</a>)</li>
<li><a
href="ff3f2a8878"><code>ff3f2a8</code></a>
io: add <code>SimplexStream</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6589">#6589</a>)</li>
<li><a
href="5b9a290acd"><code>5b9a290</code></a>
io: clarify zero remaining capacity case (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6790">#6790</a>)</li>
<li><a
href="70569bd009"><code>70569bd</code></a>
task: fix typo in <code>TaskTracker</code> docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6792">#6792</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.39.3...tokio-1.40.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.39.3&new-version=1.40.0)](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: 6ea294cc95d2d0cac4b254bd042066515192ab08
2024-09-02 06:49:56 +00:00
Daniel Harvey
a89cc61039 Allow filtering nested arrays (#828)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

If`institution` is a big JSON document, and `staff` is an array of
objects inside it, we can now filter `institutions` based on matches
that exist within that array.

```graphql
query MyQuery {
  where_does_john_hughes_work: InstitutionMany(
    where: { staff: { last_name: { _eq: "Hughes" } } }
  ) {
    id
    location {
      city
      campuses
    }
  }
```

This query would return us details of `Chalmers University of
Technology`, where `John Hughes` is a member of staff.

### How

- Record the type of fields in `metadata_resolve`
- If we find an array one, wrap the inner predicate in an `EXISTS`-type
constructor.

V3_GIT_ORIGIN_REV_ID: 6f7c51961f3189d7068b4ddbed9fcc821a76ae7d
2024-08-30 10:16:35 +00:00
Vamshi Surabhi
42ce01d755 [PACHA-18] sql: forward request headers to connectors (#1036)
<!-- The PR description should answer 2 important questions: -->

### What

When a command is called through the sql interface, we now respect
`argumentPresets` configured at the data connector link. We also
partially support `responseHeaders` in that we extract the response from
the 'result' key but not extract 'headers' and forward them.

### How

The part of the engine code that deals with data connector argument
presets is exposed from the ir crate and re-used in the sql layer.

V3_GIT_ORIGIN_REV_ID: 7c3124596a9bbc2b18cb79cb899c75fd4de3f7e5
2024-08-29 19:56:54 +00:00
Rakesh Emmadi
846ae1667a Make subscriptions unstable feature (#1025)
<!-- The PR description should answer 2 important questions: -->

### What

Put subscriptions API behind unstable feature.

V3_GIT_ORIGIN_REV_ID: 4eb454009c2e9658d899efbb81488faac3674e48
2024-08-29 17:19:23 +00:00
Daniel Harvey
ffa43e3c57 Construct empty sql catalog if feature switched off (#1034)
<!-- The PR description should answer 2 important questions: -->

### What

We don't need to do this work if the feature isn't turned on.

### How

Create a new `Catalog::empty_from_metadata` function that is essentially
`mempty`.

V3_GIT_ORIGIN_REV_ID: 594462e729ff4afc3bee4db9e4b8e44d41020428
2024-08-29 14:56:09 +00:00
Daniel Harvey
6b59cedb45 Use generated Postgres schema in tests (#1032)
<!-- The PR description should answer 2 important questions: -->

### What

Updating the various Postgres test schemas we use in execute tests is
quite hard, and most of them have been hand modified to match certain
tests.

This meant you could not update the Postgres test SQL and propagate the
schema changes in all tests, which is frustrating.

But now we can!

### How

- Modifies the script that updates all `custom_connector` schemas to
make it work for Postgres too
- Runs it, updating all `DataConnectorLink` for `ndc-postgres` to match
the output of `/schema` from `ndc-postgres`
- Fixes lots of tests, that were all using slightly hand modified
`ndc-postgres` schema output. Mostly this involves swapping `String` and
`varchar` for `text`, and `Int` for `int4`.

V3_GIT_ORIGIN_REV_ID: d695c48d1ae04d51a17bf54786782830ddb1d683
2024-08-29 12:42:47 +00:00
Phil Freeman
317193df10 [PACHA-24] Metrics in the SQL layer (#1029)
<!-- The PR description should answer 2 important questions: -->

### What

- Adds datafusion row metrics to our NDC query and aggregate nodes, for
explain output
- Aggregates all datafusion metrics in the trace attributes:
- `rows_processed`, i.e. total number of rows considered over all
execution plan nodes
- `elapsed_compute`, i.e. CPU time spent in _processing_ data (not
fetching it)
- Adds the explain output to the `create_logical_plan` span.

E.g. a query we don't push down to NDC:

```sql
SELECT
    COUNT(42 * invoiceId) AS odd_count
FROM
    InvoiceLine;
```

Attributes:

```text
rows_processed: 2242
total_rows: 1
elapsed_compute: 417
logical_plan: Projection: count(Int64(42) * InvoiceLine.invoiceId) AS odd_count
  Aggregate: groupBy=[[]], aggr=[[count(Int64(42) * InvoiceLine.invoiceId)]]
    TableScan: InvoiceLine
```

The metrics clearly indicate that the cost in terms of rows processed
per row returned (2242 / 1) is very high in this case. The logical plan
makes it clear why this was the case: we failed to push down the
aggregate node.

### How

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

V3_GIT_ORIGIN_REV_ID: c26cce9adab9d0feb0a7d2873a3eea38542564a0
2024-08-29 00:56:46 +00:00
Daniel Harvey
6795ea60fc Add Exists in Nested Collection to Expression type (#1027)
<!-- The PR description should answer 2 important questions: -->

### What

Add exists in nested collection to our internal `Expression` type so we
can use it in NDC requests.

### How

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

V3_GIT_ORIGIN_REV_ID: b8c2454e35667074a8814844d80430fc765ccdab
2024-08-28 16:09:43 +00:00
Daniel Harvey
eabc3966db Make sleep available in Docker images (#1026)
<!-- The PR description should answer 2 important questions: -->

### What

Add `coreutils` to Docker images.

### How

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

V3_GIT_ORIGIN_REV_ID: a614c47758b726729208428890586d5aabac0797
2024-08-28 12:14:08 +00:00
Daniel Harvey
4d1d73c631 Keep special SIGTERM handling for Windows (#1024)
<!-- The PR description should answer 2 important questions: -->

### What

Previously our non-unix sigterm handler just [waited
forever](https://doc.rust-lang.org/nightly/core/future/fn.pending.html),
now let's pay attention to Ctrl-C on Windows.

### How

Use Windows shutdown handling taken from `custom-connector`.

V3_GIT_ORIGIN_REV_ID: c37daa069646cae4e9950ea77f0169f4671bfec7
2024-08-28 11:40:33 +00:00
Daniel Harvey
af9f058d88 Expose request type in multitenant metrics (#1009)
<!-- The PR description should answer 2 important questions: -->

### What

Expose operation type in query and explain endpoints.

V3_GIT_ORIGIN_REV_ID: 852276fc04b3173a9364e593c33d1ceb6bd88064
2024-08-28 11:37:08 +00:00
Rakesh Emmadi
0d16848b1e OpenDD: add GraphQL API configuration for subscriptions (#1020)
<!-- The PR description should answer 2 important questions: -->

### What

- Allow specifying subscriptions related GraphQL config for the
following root fields of a model:
  - select_uniques
  - select_many
  - aggregate
- Add `allow_subcriptions` flag in model permissions.
- Add optional `subscription` field to `GraphqlConfig` OpenDD metadata.

V3_GIT_ORIGIN_REV_ID: 7460292f60c569086603dcd3e9b3809a61938798
2024-08-28 11:05:50 +00:00
Daniel Harvey
4e5f028250 Add graceful shutdown to all cloud servers (#1023)
<!-- The PR description should answer 2 important questions: -->

### What

Put graceful shutdown code in a new crate.

### How

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

V3_GIT_ORIGIN_REV_ID: 262cd85064f0420d2170a3bf710ab72853b5764d
2024-08-28 10:46:02 +00:00
Anon Ray
16d2d5223f nix/ci: checking if adding bash/sh helps with multitenant docker (#1022)
<!-- 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? -->

### How

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

V3_GIT_ORIGIN_REV_ID: c09d42519cdd4946527e72a8066d7aa60a75a4cf
2024-08-28 09:43:13 +00:00
Phil Freeman
06937b1107 [PACHA-25] Aggregate pushdown for COUNT (#1021)
<!-- The PR description should answer 2 important questions: -->

### What

Push down SQL `COUNT` aggregates to the NDC layer:

- `COUNT(1)`
- `COUNT(col)` where col may be nested
- `COUNT(DISTINCT col)`

### How

Introduces a new logical node (`ModelAggregate`) and corresponding
physical node (`NDCAggregatePushdown`). Whenever we see a `ModelQuery`
wrapped in an `Aggregate` node, we rewrite it to a `ModelAggregate` node
instead. We don't handle `GROUP BY` yet, but this approach will
generalize to that once NDC 0.2.0 lands.

V3_GIT_ORIGIN_REV_ID: 373d3941fc01c077270047612240d910045f6d93
2024-08-28 03:39:20 +00:00
Samir Talwar
288c973ac7 Build Cloud services with Nix. (#1019)
Changes to the Nix build to support Hasura cloud services.

V3_GIT_ORIGIN_REV_ID: 39fc7e0a005c30ed6ecbfed8dbcd0cd3839aafbd
2024-08-27 09:25:16 +00:00
Daniel Harvey
43daeffcca Use ndc-models 0.1.6 (#1013)
<!-- The PR description should answer 2 important questions: -->

### What

Update `v3-engine` to use `ndc-models` 0.1.6.

### How

Update in Cargo.toml, check everything builds.

V3_GIT_ORIGIN_REV_ID: 64d8b5b8126f593c10ffa89ba21791f326aefedd
2024-08-26 14:50:02 +00:00
dependabot[bot]
2f14073ea1 Bump syn from 2.0.75 to 2.0.76 (#1017)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.75 to 2.0.76.
<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.76</h2>
<ul>
<li>Enforce that tail call <code>become</code> keyword is followed by an
expression (<a
href="https://redirect.github.com/dtolnay/syn/issues/1725">#1725</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ef3e9c6dde"><code>ef3e9c6</code></a>
Release 2.0.76</li>
<li><a
href="8f7365ff96"><code>8f7365f</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1725">#1725</a>
from dtolnay/tailcall</li>
<li><a
href="6cddd9ea71"><code>6cddd9e</code></a>
Make tail call expr mandatory</li>
<li>See full diff in <a
href="https://github.com/dtolnay/syn/compare/2.0.75...2.0.76">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.75&new-version=2.0.76)](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: d261ad30ffeb10034a80f9044504cb9d6c7c1ff7
2024-08-26 12:26:58 +00:00
dependabot[bot]
3a306a628b Bump serde_json from 1.0.125 to 1.0.127 (#1015)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.125 to
1.0.127.
<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>1.0.127</h2>
<ul>
<li>Add more removal methods to OccupiedEntry (<a
href="https://redirect.github.com/serde-rs/json/issues/1179">#1179</a>,
thanks <a
href="https://github.com/GREsau"><code>@​GREsau</code></a>)</li>
</ul>
<h2>1.0.126</h2>
<ul>
<li>Improve string parsing on targets that use 32-bit pointers but also
have fast 64-bit integer arithmetic, such as
aarch64-unknown-linux-gnu_ilp32 and x86_64-unknown-linux-gnux32 (<a
href="https://redirect.github.com/serde-rs/json/issues/1182">#1182</a>,
thanks <a href="https://github.com/CryZe"><code>@​CryZe</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5ebf65cc48"><code>5ebf65c</code></a>
Release 1.0.127</li>
<li><a
href="f287a3b1a9"><code>f287a3b</code></a>
Merge pull request 1179 from GREsau/patch-1</li>
<li><a
href="ec980b0277"><code>ec980b0</code></a>
Release 1.0.126</li>
<li><a
href="e6282b0c47"><code>e6282b0</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1184">#1184</a>
from serde-rs/fastarithmetic</li>
<li><a
href="ffc4a43453"><code>ffc4a43</code></a>
Improve cfg names for fast arithmetic</li>
<li><a
href="4b1048d0ec"><code>4b1048d</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1183">#1183</a>
from serde-rs/arithmetic</li>
<li><a
href="f268173a9f"><code>f268173</code></a>
Unify chunk size choice between float and string parsing</li>
<li><a
href="fec0376974"><code>fec0376</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1182">#1182</a>
from CryZe/chunk-64bit</li>
<li><a
href="3d837e1cc4"><code>3d837e1</code></a>
Ensure the SWAR chunks are 64-bit in more cases</li>
<li><a
href="11fc61c7af"><code>11fc61c</code></a>
Add <code>OccupiedEntry::shift_remove()</code> and
<code>swap_remove()</code></li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/json/compare/1.0.125...1.0.127">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.125&new-version=1.0.127)](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: 81a7f8e72d54dcc1e37a6822d7e2f9181d61a9cf
2024-08-26 12:25:06 +00:00
dependabot[bot]
71ceb100fd Bump serde from 1.0.208 to 1.0.209 (#1016)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.208 to
1.0.209.
<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.209</h2>
<ul>
<li>Fix deserialization of empty structs and empty tuples inside of
untagged enums (<a
href="https://redirect.github.com/serde-rs/serde/issues/2805">#2805</a>,
thanks <a
href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="30752ac4ff"><code>30752ac</code></a>
Release 1.0.209</li>
<li><a
href="b84e6ca4f5"><code>b84e6ca</code></a>
Improve wording of PR 2805 comments</li>
<li><a
href="87a2fb0f1a"><code>87a2fb0</code></a>
Wrap comments from PR 2805 to 80 columns</li>
<li><a
href="9eaf7b9824"><code>9eaf7b9</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2805">#2805</a>
from Mingun/untagged-tests</li>
<li><a
href="7bde100237"><code>7bde100</code></a>
Replace MapRefDeserializer with value::MapDeserializer</li>
<li><a
href="da7fc795ee"><code>da7fc79</code></a>
Fix deserialization of empty struct variant in untagged enums</li>
<li><a
href="4c5fec1363"><code>4c5fec1</code></a>
Test special cases that reaches SeqRefDeserializer::deserialize_any
len==0 co...</li>
<li><a
href="6588b0ad37"><code>6588b0a</code></a>
Cover Content::Seq case in VariantRefDeserializer::struct_variant</li>
<li><a
href="0093f74cfe"><code>0093f74</code></a>
Split test newtype_enum into four tests for each variant</li>
<li><a
href="171c6da57a"><code>171c6da</code></a>
Complete coverage of
ContentRefDeserializer::deserialize_newtype_struct</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209">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.208&new-version=1.0.209)](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: e8d93201cfdad039a62f4f55af5cdcd80dddbff9
2024-08-26 12:25:02 +00:00
dependabot[bot]
73d7c758d4 Bump quote from 1.0.36 to 1.0.37 (#1014)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.36 to 1.0.37.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/quote/releases">quote's
releases</a>.</em></p>
<blockquote>
<h2>1.0.37</h2>
<ul>
<li>Implement ToTokens for CStr and CString (<a
href="https://redirect.github.com/dtolnay/quote/issues/283">#283</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1ebffa035"><code>b1ebffa</code></a>
Release 1.0.37</li>
<li><a
href="43acd77961"><code>43acd77</code></a>
Delete unneeded use of <code>ref</code></li>
<li><a
href="9382c2182e"><code>9382c21</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/quote/issues/283">#283</a>
from dtolnay/cstr</li>
<li><a
href="6ac432877b"><code>6ac4328</code></a>
Add C string tests</li>
<li><a
href="9fb0591a17"><code>9fb0591</code></a>
Implement ToTokens for CStr and CString</li>
<li><a
href="ba7a9d08c9"><code>ba7a9d0</code></a>
Organize test imports</li>
<li><a
href="aa9970f983"><code>aa9970f</code></a>
Inline the macro that generates primitive impls</li>
<li><a
href="ba411091c9"><code>ba41109</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/quote/issues/282">#282</a>
from dtolnay/tokens</li>
<li><a
href="c77340a4c6"><code>c77340a</code></a>
Consistently use 'tokens' as the name of the &amp;mut TokenStream
arg</li>
<li><a
href="a4a0abf12f"><code>a4a0abf</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/quote/issues/281">#281</a>
from dtolnay/char</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/quote/compare/1.0.36...1.0.37">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=quote&package-manager=cargo&previous-version=1.0.36&new-version=1.0.37)](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: Samir Talwar <samir.talwar@hasura.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: cf50dd0980c4bf947d9aa5e767c94d3487d05e85
2024-08-26 10:48:50 +00:00
Samir Talwar
ef31a4ca84 Abstract over the binaries in flake.nix. (#1012)
### What

Use powerful constructs such as loops to avoid duplication in
`flake.nix`.

We are able to iterate over the list of binaries and list of target
systems and produce a list of packages from there.

### How

We generate a `targets` tree (see the `flake.nix` file comments for
details), and then generate the list of packages from there.

When using `nix run`, you'll get a package, which is usually what you
want.

The scripts that build Docker images run `nix build
'.#targets.x86_64-linux.<binary>.<arch>.docker`, which is verbose but
explicit.

V3_GIT_ORIGIN_REV_ID: 2a13fb31a41829f9804dfdb7c1a51a9e54e0922e
2024-08-26 09:50:15 +00:00
David Overton
4f580c6152 Add support order by nested fields (#1001)
<!-- The PR description should answer 2 important questions: -->

### What

Add support for ordering by nested fields.

Example query:
```graphql
query MyQuery {
  InstitutionMany(order_by: { location: { city: Asc } }) {
    id
    location {
      city
      campuses
    }
  }
}
```

This will order by the value of the nested field `city` within the
`location` column.

<!-- 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? -->

### How

Extends GraphQL schema generation to register and then build GraphQL
input types for nested `OrderByExpression` metadata objects.

During IR generation, order by input arguments containing nested fields
are flattened out into the `field_path` property of NDC `OrderByTarget`.

### Limitations

Does not yet support `orderableRelationships`. I'll do that as as
separate PR.

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

V3_GIT_ORIGIN_REV_ID: 6f4b1e098e60ce7906167b3afcd62de3c8616660
2024-08-26 05:24:52 +00:00
Philip Lykke Carlsen
1f96e8aff3 Promote warnings to errors based on flags (#1011)
### What

This PR adds resolving logic that can promote warnings (plural) to an
error based on the `ddn_flags::Flags`.

In addition it adds a flag `require_valid_ndc_v01_version`, which, when
set, promotes a `DataConnectorIssue::InvalidNdcV01Version` to an error.

### How

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

V3_GIT_ORIGIN_REV_ID: 2d6b089f6237fea85c889243547f4deffa4c20ee
2024-08-23 16:03:58 +00:00
Philip Lykke Carlsen
5f861736c4 Pass Configuration by reference, for clearer intent (#1010)
### What

Passing `Configuration` by reference signals intent (there is only ever
one configuration that is given at the toplevel which is never altered)
better than owning and copying values.

While in its current state it requires slightly more memory to pass a
reference to a `Configuration` rather than a value, this does not seem
like the thing to optimize for when it inhibits readability.

V3_GIT_ORIGIN_REV_ID: e5e05ad2e7ee41dfb49173ec9575de17552c63ae
2024-08-23 14:36:45 +00:00
paritosh-08
32a369b1e3 user facing span for plugin execution (#1008)
<!-- The PR description should answer 2 important questions: -->

### What

Make the plugin execution trace user-facing.

### How

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

By changing the SpanVisibilty from `Internal` to `User`.

V3_GIT_ORIGIN_REV_ID: 9afe59c01ebb7549235705566516319a73fd5da1
2024-08-23 11:34:05 +00:00
Daniel Harvey
6c295d1c45 Revert "Optional CompatibilityConfig for v3-engine" (#1006)
Reverts hasura/v3-engine#998

We are going to use `opendds` Flags for this instead.

V3_GIT_ORIGIN_REV_ID: 155c7a6b17be95a6370b08fdc425791e3eb8b70a
2024-08-22 16:47:45 +00:00
Daniel Harvey
d6f98af5cc Optional CompatibilityConfig for v3-engine (#998)
<!-- The PR description should answer 2 important questions: -->

### What

We want to use `CompatibilityConfig` to configure turning warnings into
errors after a certain date, and to make sure we don't break old builds.
This allows passing a path to a optional compatibility config file to
engine and scaffolds how we'll map this config to metadata resolve
options.

### How

Add a flag to `v3-engine`, parse the file if flag is set. Test it by
adding static test file and using it with `just watch` and `just run`.

V3_GIT_ORIGIN_REV_ID: 972c67ae29905b9ce1bb57e150f4cfcfd6a069ef
2024-08-22 12:56:04 +00:00
Samir Talwar
a9e3c90759 Release v2024.08.22 (#1004)
See the changelog for details.

---------

Co-authored-by: Paritosh <paritosh@hasura.io>
V3_GIT_ORIGIN_REV_ID: 09f61b47a3352cd2cd047e52f53b40884372cd9e
2024-08-22 11:26:40 +00:00
Samir Talwar
54655fcefc Update to Rust v1.80.1. (#1002)
### What

Upgrade to the latest version of Rust.

### How

I modified `rust-toolchain.toml` and ran `cargo update`.

V3_GIT_ORIGIN_REV_ID: 5fe675ee5dc568cd24de542c826ffd2d355f90ff
2024-08-22 08:56:32 +00:00
Samir Talwar
58c2a9852e Use v3.0.0 as the version number. (#999)
### What

Updates the version number to `3.0.0`, now we're officially at GA.

### How

I updated the version number, and also updated some dependencies. The
`Cargo.lock` file was not up to date.

V3_GIT_ORIGIN_REV_ID: 3e9b784c8ad856556193e56aee9fa607fa8ce19e
2024-08-21 14:36:47 +00:00
Daniel Harvey
a9d9055fad More compatibility validation types (#996)
<!-- The PR description should answer 2 important questions: -->

### What

Add more types for validating compatibility configuration. Functional
no-op.

V3_GIT_ORIGIN_REV_ID: 56239149762bc170ce40a7f5c526cb8f3f49ec61
2024-08-20 14:07:36 +00:00
Daniel Harvey
8c095fa305 Move CompatibilityConfig into own crate (#994)
<!-- The PR description should answer 2 important questions: -->

### What

`v3-engine` needs to be able to read and use compatibility
configuration, so let's move it to a crate here.

### How

Move `CompatibilityConfig` and `CompatibilityDate`.

V3_GIT_ORIGIN_REV_ID: 2de4b22411d296d6a354e2856e685aea4b261637
2024-08-20 06:01:21 +00:00
Vamshi Surabhi
f47296c210 sql: commands backed by sql are now supported (#995)
<!-- The PR description should answer 2 important questions: -->

### What

1. Commands backed by ndc procedures can now be executed using in sql as
follows:

```sql
select * from command(args); -- args to be provided with struct syntax
```
2. There is an optional `disallow_mutations` field in the sql request
that defaults to `false`. When it is explicitly set to true, mutations
are disallowed. This is for pacha to get a confirmation for mutations.

### How

Most of the code is reused from ndc functions. There is a new
'NDCProcedurePushDown' physical node and the associated changes to a
mutation response from a connector.

V3_GIT_ORIGIN_REV_ID: 94913ab931290e0aa91ccd01173955da3aa1e423
2024-08-20 02:58:02 +00:00
Vamshi Surabhi
91b4fc6ee6 Improves the type mapping layer to SQL (#988)
<!-- The PR description should answer 2 important questions: -->

### What

The motivation was to allow introspecting field descriptions of object
types. To accomplish this, a fair number of things had to change. Prior
to this, we determined a model's and command's schema at the sql layer
by looking at its type mappings. When introspecting these models and
commands, if there are any nested fields, they are output as
'STRUCT<field1 type1, field2 type2>' without any descriptions.

With this change, we first build a catalog of types at the sql layer
from scalars and object types defined at opendd layer. These types are
then used when adding models and commands as opposed to looking at their
type mappings. This also changes how the type catalog is presented in
introspection. One can now query 'struct type's and their fields along
with their descriptions. Models and commands merely refer to these
struct types.

### How

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

V3_GIT_ORIGIN_REV_ID: 550da03c84b33ca44851858ee2cb73a31674d3d0
2024-08-19 21:25:25 +00:00
Phil Freeman
89c85d2c47 [PACHA-16] Pushdown limits and offsets (#981)
<!-- The PR description should answer 2 important questions: -->

### What

Push down limits and offsets, including inside existing limit and offset
queries.
### How

Adds a new rewrite which pushes a limit/offset inside an `NDCQuery`, in
case it is not picked up by the sort pushdown or the table scan
pushdown.

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

V3_GIT_ORIGIN_REV_ID: 2dcf14ff9f605919abb047560681615b88e766e2
2024-08-19 16:30:20 +00:00
Tom Harding
b6e296bf0f Audit with cargo audit, rather than an Actions plugin (#993)
<!-- The PR description should answer 2 important questions: -->

### What

Same as with `ndc-postgres` and `ndc-postgres-multitenant`, we call a
`just` command in CI, rather than using an actions plugin.

### How

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

V3_GIT_ORIGIN_REV_ID: 96daa602e4647fdcd641d79539df66a264914efc
2024-08-19 14:23:21 +00:00
Tom Harding
7d49ec4197 Use NPX to run prettier (#990)
### What

If `prettier` isn't installed globally, this means the format script
still works.

### How

If it's already installed, this is a no-op. Otherwise, this prompts the
user to download a temporary version of the package to run the command.

V3_GIT_ORIGIN_REV_ID: 6d10387a0a6d5cdc33b748c0533b7bb276d322ac
2024-08-19 11:34:12 +00:00
Anon Ray
de9ecd1262 add schemars title to AuthConfig enum variants (#956)
<!-- The PR description should answer 2 important questions: -->

### What

Add schemars title and description to `AuthConfig` enum variants.

### How

Use new `opendd` `json_schema` options.

---------

Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com>
V3_GIT_ORIGIN_REV_ID: 8896357dc8c400101587e36dfb14f807cbdc4bc0
2024-08-19 10:35:03 +00:00
Daniel Harvey
f67cf67b33 Break out a CommandsError type (#979)
<!-- The PR description should answer 2 important questions: -->

### What

Continuing our quest, from https://github.com/hasura/v3-engine/pull/955,
https://github.com/hasura/v3-engine/pull/844,
https://github.com/hasura/v3-engine/pull/843, etc, to reduce the giant
`Error` enum in `metadata-resolve`.

Functional no-op.

### How

Create new `CommandsError` in `Commands` stage, move errors there and
fix call sites.

V3_GIT_ORIGIN_REV_ID: 6e4c4e4d5f656ffb736822323ecf5e6faf21602e
2024-08-19 07:53:33 +00:00
Phil Freeman
b9a379d02d (PACHA) Add tests for aggregates (#982)
<!-- The PR description should answer 2 important questions: -->

### What

Even though aggregates are not pushed down right now, this makes sure
they work at the datafusion layer and verifies the plans.

### How

Another group of SQL test files

V3_GIT_ORIGIN_REV_ID: a2a29d6f6347bb1b028c06313e98ed16bb7172a0
2024-08-18 23:04:00 +00:00
Vamshi Surabhi
a21f82bbe7 [PACHA-4] initial support for commands (#975)
<!-- The PR description should answer 2 important questions: -->

### What

Supports calling functions from the SQL interface

### How

Similar to models.

V3_GIT_ORIGIN_REV_ID: 2958aeacdfd31bae0e4353cb7e20e627c84931b5
2024-08-18 03:34:15 +00:00
Phil Freeman
2795cdacad [PACHA-8] Test SQL endpoint (#980)
<!-- The PR description should answer 2 important questions: -->

### What

Adds tests for select, filter and order by.

### How

Reuses the existing test framework. There is a giant `metadata.json`
file which is used for all tests, based on Postgres. Each test is a
folder with a `query.sql` file, an `expected.json` for expected output,
and a `plan.json` for the expected explain output.

V3_GIT_ORIGIN_REV_ID: 7f5c134c5d3cf47e5f2ffa305f24f4274ccd545e
2024-08-17 22:54:12 +00:00
Phil Freeman
ffeefdf834 [PACHA-5] Pushdown other filter operators (#974)
<!-- The PR description should answer 2 important questions: -->

### What

Push down the `_lt`, `_lte`, `_gt`, `_gte` operators

### How

By matching operators with the same name on the NDC side, for now, until
we have additional NDC operator meanings that we can use.

V3_GIT_ORIGIN_REV_ID: 4341490a3cdbb62e9fe90c10279527716687545d
2024-08-17 16:03:29 +00:00
Phil Freeman
3d25939f0c [PACHA-14] Order by pushdown (#970)
<!-- The PR description should answer 2 important questions: -->

### What

Implements a new optimizer pass which pushes sort stages inside
`ModelQuery` stages.

### How

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

V3_GIT_ORIGIN_REV_ID: 2820f88003aec376b71605c0f753d7b50825ddad
2024-08-16 23:57:09 +00:00
Phil Freeman
453bcbbbb7 [PACHA-5] Filter pushdown for equality operators (#969)
### What

Push down the following SQL predicates to NDC via OpenDD IR:

- Logical operators AND, OR and NOT
- Equality operator and inequality operator

TODO:

- [ ] Comparison operators
- [x] `IS NULL` and `IS NOT NULL`
- [ ] Validate operators actually exist in the OpenDD metadata and NDC
mappings
- [ ] Use the actual OpenDD operators instead of the stand-in `_eq` and
`_neq` operators

<!-- 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? -->

### How

- `plan/filter.rs` implements two functions `can_pushdown_filter` and
`pushdown_filter` (which translates to OpenDD IR)
- `planner/filter.rs` translates OpenDD IR to NDC IR for execution.

V3_GIT_ORIGIN_REV_ID: ee2c38bf2c36292710becbabfaca51ccae983a2f
2024-08-16 01:27:53 +00:00
Samir Talwar
a78978ab4c Update dependencies in preparation for some cloud work. (#972)
### What

Update dependencies in preparation for some cloud work, and move
dependency versions to the workspace.

### How

```
$ cargo update
```

V3_GIT_ORIGIN_REV_ID: a42ba0c8a1cb376280f9771abd7d1f4f7bf19b84
2024-08-15 09:32:07 +00:00
Vamshi Surabhi
fa9d91a1a5 sql: moves crate::plan to crate::execute::planner::model (#971)
<!-- The PR description should answer 2 important questions: -->

### What

This is a no-op change. Moves model related planning code from the
top-level to `planner` submodule. This is in preparation for commands
implementation.

V3_GIT_ORIGIN_REV_ID: 97a73ced40dadf168efc1147e52ef4f36103bc50
2024-08-15 08:01:29 +00:00
Samir Talwar
6fa4d03f3b Add cloud-only crates. (#968)
### What

We now support cloud-only crates, which are not open-sourced.

### How

Anything in `crates/cloud` will not be synced with the _graphql-engine_
repository.

In order to facilitate this, we generate and commit a
Cargo.toml/Cargo.lock pair with the cloud-only sections removed. We also
transform the justfile to remove this code.

This includes only a test repository, to ensure that nothing private is
synced.

When this is merged, it should not result in a commit to the
_graphql-engine_ repository.

V3_GIT_ORIGIN_REV_ID: 038839acdf3a97da05bbd4b6278171cc12e7cd71
2024-08-14 15:12:14 +00:00
Rakesh Emmadi
68a30e1126 opendd-derive: json_schema options for enum variants (#966)
<!-- The PR description should answer 2 important questions: -->

### What

Introduce the `json_schema` attribute for enum variants to specify
schema metadata for adjacently tagged (`as_versioned_with_definition`)
enums. For untagged and internally tagged enums, metadata is inherited
from the corresponding variant type.
Also, update the `README.md` in `opendd-derive` crate.

### How

Update types and generate metadata expression for adjacent tagged enums.

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

V3_GIT_ORIGIN_REV_ID: 5c7dff5c7d7f4f44f0a27e26f1d8941fb861c346
2024-08-14 13:24:37 +00:00
Phil Freeman
714fffad18 [PACHA-6] Remove projection pushdown (#967)
<!-- The PR description should answer 2 important questions: -->

### What

Remove the projection pushdown optimization. `datafusion` already
optimizes this to the correct NDC IR.

### How

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

V3_GIT_ORIGIN_REV_ID: 6e0034e4d920c39b70667f5f521341069a5c53de
2024-08-13 19:18:40 +00:00
Daniel Harvey
1ebafeec1a Reduce codegen units to 1 (#964)
<!-- The PR description should answer 2 important questions: -->

### What

By default, `rustc` splits crates up and builds in parallel. This is
faster but misses some optimisations between these sections. Let's
reduce it to increase runtime performance.

### How

Add settings to `release` profile in `Cargo.toml`.

<img width="776" alt="Screenshot 2024-08-13 at 12 59 46"
src="https://github.com/user-attachments/assets/a03389dc-80ba-4723-8ca3-36af50846324">
V3_GIT_ORIGIN_REV_ID: 44fa511024140b680b30c9abfaa48034bf0845a9
2024-08-13 15:36:08 +00:00
Rakesh Emmadi
e3dc896792 metadata-resolve: disallow relationship comparisons in nested object filter expressions for model filters (#960)
<!-- The PR description should answer 2 important questions: -->

### What

We cannot support having relationship comparisons in nested object field
filters of a boolean expression. NDC does not support this natively
([slack
thread](https://hasurahq.slack.com/archives/C05HND0F6LB/p1722845028319099)).
This PR adds a metadata build check for this case and reject such
boolean expressions.

Tests in the PR is partially based on
https://github.com/hasura/v3-engine/pull/935.

**Note:** This might break older builds having relationship comparisons
in the nested object field filter expressions. This is a rare scenario.
We will check through our schema-diff job for any failing builds. If
there are significant, we might hold this PR. Full context in this slack
thread -
https://hasurahq.slack.com/archives/C06P2U8U55G/p1723121764332539.

### How
- Add a metadata build check for boolean expressions that restricts them
to have nested object filters with relationship comparisons.
- Raise GraphQL API runtime internal error while building the filter IR
when a relationship comparison found within a nested field filter.

---------

Co-authored-by: Daniel Chambers <daniel@hasura.io>
V3_GIT_ORIGIN_REV_ID: 86dce0b784c77e57bb1888125dba5b599e40f741
2024-08-13 12:58:32 +00:00
Daniel Harvey
7c4245f4b2 Use mimalloc (#961)
<!-- The PR description should answer 2 important questions: -->

### What

We started using `mimalloc` allocator in MBS a while ago with good
results, let's use it here too.

Once `v3-engine-multitenant` is merged we should use it there too.

### How

Import crate, switch it on in engine binary and in benchmarks.

<img width="845" alt="Screenshot 2024-08-13 at 10 10 49"
src="https://github.com/user-attachments/assets/dc872668-1633-468a-86d3-51fca5be68bf">
V3_GIT_ORIGIN_REV_ID: ebad91bb57964477d0f227e341c7bd12d54f0f68
2024-08-13 10:11:04 +00:00
Daniel Harvey
547ce02a91 Extract ModelsError from main Error type (#955)
<!-- The PR description should answer 2 important questions: -->

### What

Breaking down the big `Error` type more. This creates `ModelsError`.
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? -->

<!-- Does this PR introduce new validation that might break old builds?
-->

<!-- Consider: do we need to put new checks behind a flag? -->

### How

Mostly moving things and making types more specific. In one case, making
a type more general (added comments on how to resolve this in future)

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

V3_GIT_ORIGIN_REV_ID: 79b14085ca1111489621b8b7d3490492a4c30ead
2024-08-13 09:22:38 +00:00