Commit Graph

826 Commits

Author SHA1 Message Date
Daniel Harvey
bec9dee021 Move argument presets resolve into metadata-resolve (#1226)
<!-- The PR description should answer 2 important questions: -->

### What

Previously we were doing the business of calculating which arguments
(and parts of arguments) were preset in the GraphQL `schema` crate. This
meant we would have to reimplement the logic for each backend. Now we
move it into `metadata-resolve` so the results can be shared by all
frontends.

### How

Move argument preset resolve into `metadata-resolve`. What's left in
`graphql-schema` is all the stuff relating to `Annotation`s of various
kinds.

A lot of the diff is changing `ModelWithPermissions` and
`CommandWithPermissions` to `ModelWithArgumentPresets` and
`CommandWithArgumentPresets` in crates after `metadata-resolve`.

Functional no-op.

V3_GIT_ORIGIN_REV_ID: b1b0983abb9f6282652c8689b02e0796026752f5
2024-10-15 14:16:26 +00:00
Rakesh Emmadi
3786242902 graphql-ws: Extend GraphQL over websockets to multitenant (#1206)
<!-- 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? -->
- Return the `Sec-WebSocket-Id` header denoting a unique id for the
websocket connection, in the handshake request response.

### How

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

V3_GIT_ORIGIN_REV_ID: 3639a231e3bdcb8f1f6affa66c21254890dd9d2d
2024-10-15 11:41:35 +00:00
Daniel Harvey
c6cc462e0c Run stop-docker in just docker-refresh to ensure volumes are removed (#1224)
<!-- The PR description should answer 2 important questions: -->

### What

Make sure we trash old Postgres DB data when refreshing Docker, to make
sure we start with the newest data.

V3_GIT_ORIGIN_REV_ID: 25416e918431a915fece6fe2d9478fa722f6a7c5
2024-10-15 11:20:04 +00:00
Daniel Harvey
e133716dce Changelog for v2024.10.14 release (#1223)
Update changelog for `v2024.10.14` release.

V3_GIT_ORIGIN_REV_ID: c160dac4b5fbbbb873434b38b6dd983e24ab8975
2024-10-14 13:47:25 +00:00
dependabot[bot]
6d2376648c Bump indexmap from 2.5.0 to 2.6.0 (#1214)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.5.0 to
2.6.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.6.0 (2024-10-01)</h2>
<ul>
<li>Implemented <code>Clone</code> for <code>map::IntoIter</code> and
<code>set::IntoIter</code>.</li>
<li>Updated the <code>hashbrown</code> dependency to version 0.15.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bf0362ba25"><code>bf0362b</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/354">#354</a>
from cuviper/release-2.6.0</li>
<li><a
href="bd0b4f7c8c"><code>bd0b4f7</code></a>
Add all release dates</li>
<li><a
href="53400496f4"><code>5340049</code></a>
Release 2.6.0</li>
<li><a
href="7f8022912a"><code>7f80229</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/343">#343</a>
from cuviper/hash_table</li>
<li><a
href="e577bf2556"><code>e577bf2</code></a>
Use <code>hashbrown::HashTable</code> instead of
<code>RawTable</code></li>
<li><a
href="09b48ec3b3"><code>09b48ec</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/353">#353</a>
from cuviper/move_index</li>
<li><a
href="267b83d701"><code>267b83d</code></a>
Add an explicit bounds check in <code>move_index</code></li>
<li><a
href="d74a4daffb"><code>d74a4da</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/349">#349</a>
from waywardmonkeys/improve-doc-formatting</li>
<li><a
href="5b0ed20b87"><code>5b0ed20</code></a>
docs: Improve doc formatting with backticks</li>
<li><a
href="15518f3152"><code>15518f3</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/348">#348</a>
from cuviper/clone-intoiter</li>
<li>Additional commits viewable in <a
href="https://github.com/indexmap-rs/indexmap/compare/2.5.0...2.6.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.5.0&new-version=2.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: cee54b0b6eba5ce1f1c7327be81162ac96d54b1c
2024-10-14 09:31:04 +00:00
dependabot[bot]
35c29fff5a Bump serde_with from 3.9.0 to 3.11.0 (#1213)
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.9.0 to
3.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jonasbb/serde_with/releases">serde_with's
releases</a>.</em></p>
<blockquote>
<h2>serde_with v3.11.0</h2>
<h3>Added</h3>
<ul>
<li>
<p>Add support for <code>hashbrown</code> v0.15 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/787">#787</a>/<a
href="https://redirect.github.com/jonasbb/serde_with/issues/790">#790</a>)</p>
<p>This extends the existing support for <code>hashbrown</code> v0.14 to
the newly released version.</p>
</li>
</ul>
<h2>serde_with v3.10.0</h2>
<h3>Added</h3>
<ul>
<li>
<p>Add newline separator by <a
href="https://github.com/jayvdb"><code>@​jayvdb</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/777">#777</a>)</p>
<p>The <code>UnixLineSeparator</code> and <code>DosLineSeparator</code>
can be used together with <code>StringWithSeparator</code>.</p>
</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>
<p>Proper handling of <code>cfg_attr</code> in the <code>serde_as</code>
macro by <a
href="https://github.com/sivizius"><code>@​sivizius</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/782">#782</a>)</p>
<p>This allows to parse more valid forms of the <code>cfg_attr</code>
macro, including multiple values and attribute that do not follow the
<code>key = value</code> schema.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bc2063440d"><code>bc20634</code></a>
Bump version to 3.11 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/791">#791</a>)</li>
<li><a
href="bf8cfd48a2"><code>bf8cfd4</code></a>
Bump version to 3.11</li>
<li><a
href="a58cb33e4f"><code>a58cb33</code></a>
Add support for hashbrown v0.15 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/790">#790</a>)</li>
<li><a
href="ef7403d394"><code>ef7403d</code></a>
Update changelog</li>
<li><a
href="5d97c6a349"><code>5d97c6a</code></a>
Add support for hashbrown v0.15</li>
<li><a
href="db290afa3a"><code>db290af</code></a>
Bump regex from 1.10.3 to 1.11.0 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/788">#788</a>)</li>
<li><a
href="a329a52ac3"><code>a329a52</code></a>
Bump regex from 1.10.3 to 1.11.0</li>
<li><a
href="eb417640dc"><code>eb41764</code></a>
Fix clippy::needless_lifetimes (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/789">#789</a>)</li>
<li><a
href="eca5a271af"><code>eca5a27</code></a>
Fix clippy::needless_lifetimes</li>
<li><a
href="f1b79f27ca"><code>f1b79f2</code></a>
Bump version to 3.10.0 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/786">#786</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/jonasbb/serde_with/compare/v3.9.0...v3.11.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_with&package-manager=cargo&previous-version=3.9.0&new-version=3.11.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: bb5afa736a4579d2c83c5fbad8096254c0666a01
2024-10-14 09:30:59 +00:00
dependabot[bot]
025ceac68e Bump clap from 4.5.18 to 4.5.19 (#1212)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.18 to 4.5.19.
<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.19</h2>
<h2>[4.5.19] - 2024-10-01</h2>
<h3>Internal</h3>
<ul>
<li>Update dependencies</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.19] - 2024-10-01</h2>
<h3>Internal</h3>
<ul>
<li>Update dependencies</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="108907385c"><code>1089073</code></a>
chore: Release</li>
<li><a
href="c9b8c85f09"><code>c9b8c85</code></a>
docs: Update changelog</li>
<li><a
href="8b3de18a8d"><code>8b3de18</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5685">#5685</a>
from epage/engine</li>
<li><a
href="b38538d7c4"><code>b38538d</code></a>
fix(complete)!: Rename dynamic to engine</li>
<li><a
href="232af62f7d"><code>232af62</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5684">#5684</a>
from epage/endless</li>
<li><a
href="0209a79031"><code>0209a79</code></a>
fix(complete): Don't cause endless completions for bash/zsh</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.18...clap_complete-v4.5.19">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.18&new-version=4.5.19)](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: 764e2671ba2986148086b31ee644295623a6d7f7
2024-10-14 09:30:54 +00:00
dependabot[bot]
9314e3b7dc Bump tokio-tungstenite from 0.20.1 to 0.24.0 (#1211)
Bumps [tokio-tungstenite](https://github.com/snapview/tokio-tungstenite)
from 0.20.1 to 0.24.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/snapview/tokio-tungstenite/blob/master/CHANGELOG.md">tokio-tungstenite's
changelog</a>.</em></p>
<blockquote>
<h1>0.24.0</h1>
<ul>
<li>Update dependencies (TLS, tungstenite).</li>
<li>Return a runtime error when WSS URLs are used without a proper TLS
feature enabled.</li>
</ul>
<h1>0.23.1</h1>
<ul>
<li>Introduce a <code>url</code> feature (proxies to
<code>tungstenite/url</code>).</li>
</ul>
<h1>0.23.0</h1>
<ul>
<li>Update <code>tungstenite</code> to <code>0.23.0</code>.</li>
<li>Disable default features on TLS crates.</li>
</ul>
<h1>0.22.0</h1>
<ul>
<li>Update TLS dependencies.</li>
<li><del>Update <code>tungstenite</code> to match
<code>0.22.0</code>.</del></li>
</ul>
<h1>0.21.0</h1>
<ul>
<li>Update TLS dependencies.</li>
<li>Update <code>tungstenite</code> to <code>0.21.0</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cae2e89102"><code>cae2e89</code></a>
Bump version -&gt; 0.24.0</li>
<li><a
href="0b9d97bc14"><code>0b9d97b</code></a>
deps: update <code>rustls-native-certs</code> to 0.8 (<a
href="https://redirect.github.com/snapview/tokio-tungstenite/issues/348">#348</a>)</li>
<li><a
href="94a35a0d6b"><code>94a35a0</code></a>
Additional Documentation of <code>IntoClientRequest</code> on
<code>connect_async</code> (<a
href="https://redirect.github.com/snapview/tokio-tungstenite/issues/342">#342</a>)</li>
<li><a
href="83258250c2"><code>8325825</code></a>
Prepare 0.23.1 release</li>
<li><a
href="db9ae7eb71"><code>db9ae7e</code></a>
Re-introduce the <code>url</code> feature</li>
<li><a
href="a53454b16d"><code>a53454b</code></a>
Prepare 0.23.0 release</li>
<li><a
href="c1025d59ff"><code>c1025d5</code></a>
Disable rustls default features</li>
<li><a
href="ff311384b6"><code>ff31138</code></a>
Prepare 0.22.0 release</li>
<li><a
href="ad1d511a30"><code>ad1d511</code></a>
Update <code>rustls</code> to 0.23 and <code>tokio-rustls</code> to
0.26</li>
<li><a
href="052d085aff"><code>052d085</code></a>
Simplify response body type in <code>server-custom-accept</code>
example</li>
<li>Additional commits viewable in <a
href="https://github.com/snapview/tokio-tungstenite/compare/v0.20.1...v0.24.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio-tungstenite&package-manager=cargo&previous-version=0.20.1&new-version=0.24.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: aecbec51ea7eb1a46debda1f081aa913d093018e
2024-10-14 09:29:47 +00:00
dependabot[bot]
5a7906a788 Bump futures-util from 0.3.30 to 0.3.31 (#1210)
Bumps [futures-util](https://github.com/rust-lang/futures-rs) from
0.3.30 to 0.3.31.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/futures-rs/releases">futures-util's
releases</a>.</em></p>
<blockquote>
<h2>0.3.31</h2>
<ul>
<li>Fix use after free of task in <code>FuturesUnordered</code> when
dropped future panics (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li>
<li>Fix soundness bug in <code>task::waker_ref</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>)
This is a breaking change but allowed because it is soundness bug
fix.</li>
<li>Fix bugs in <code>AsyncBufRead::read_line</code> and
<code>AsyncBufReadExt::lines</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
<li>Fix parsing issue in
<code>select!</code>/<code>select_biased!</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>)
This is technically a breaking change as it will now reject a very odd
undocumented syntax that was previously accidentally accepted.</li>
<li>Work around issue due to upstream <code>Waker::will_wake</code>
change (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
<li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
<li>Add <code>future::AlwaysReady</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li>
<li>Relax trait bound on non-constructor methods of
<code>io::{BufReader,BufWriter}</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md">futures-util's
changelog</a>.</em></p>
<blockquote>
<h1>0.3.31 - 2024-10-05</h1>
<ul>
<li>Fix use after free of task in <code>FuturesUnordered</code> when
dropped future panics (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li>
<li>Fix soundness bug in <code>task::waker_ref</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>)
This is a breaking change but allowed because it is soundness bug
fix.</li>
<li>Fix bugs in <code>AsyncBufRead::read_line</code> and
<code>AsyncBufReadExt::lines</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
<li>Fix parsing issue in
<code>select!</code>/<code>select_biased!</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>)
This is technically a breaking change as it will now reject a very odd
undocumented syntax that was previously accidentally accepted.</li>
<li>Work around issue due to upstream <code>Waker::will_wake</code>
change (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
<li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
<li>Add <code>future::AlwaysReady</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li>
<li>Relax trait bound on non-constructor methods of
<code>io::{BufReader,BufWriter}</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1e052816b0"><code>1e05281</code></a>
Release 0.3.31</li>
<li><a
href="8a8b085a8c"><code>8a8b085</code></a>
Fix clippy::uninit_vec warning</li>
<li><a
href="f3fb74df31"><code>f3fb74d</code></a>
Document how <code>BoxFuture</code>s / <code>BoxStream</code>s are often
made (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2887">#2887</a>)</li>
<li><a
href="f00e7afb46"><code>f00e7af</code></a>
Fix use after free of task in FuturesUnordered when dropped future
panics (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2">#2</a>...</li>
<li><a
href="33c46b3dc6"><code>33c46b3</code></a>
ci: Work around sanitizer issue on latest Linux kernel</li>
<li><a
href="7bf5a72826"><code>7bf5a72</code></a>
Fix issues with <code>AsyncBufRead::read_line</code> and
<code>AsyncBufReadExt::lines</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
<li><a
href="87afaf3973"><code>87afaf3</code></a>
Use <code>#[inline(always)]</code> on <code>clone_arc_raw</code> (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
<li><a
href="549b90b179"><code>549b90b</code></a>
Add accessors for the inner of stream::Iter (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
<li><a
href="07b004ac7e"><code>07b004a</code></a>
Add missing symbols (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2883">#2883</a>)</li>
<li><a
href="86dc069fa2"><code>86dc069</code></a>
Various fixes too make the CI green (<a
href="https://redirect.github.com/rust-lang/futures-rs/issues/2885">#2885</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=futures-util&package-manager=cargo&previous-version=0.3.30&new-version=0.3.31)](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: 1c784e9b944865bd25b4664730b7c59dce01d0ef
2024-10-14 09:19:28 +00:00
paritosh-08
3cc9d2092e support __typename in aggregate queries (#1220)
<!-- The PR description should answer 2 important questions: -->

### What

This PR enables queries `__typename` introspection field in aggregate
queries.
This PR also adds a test for the same.

### How

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

We have changed how we handle __typename while processing the selection
set. If you use `as_object_selection_set`, you will get `__typename` for
free.
We are going to follow the same pattern as in the non-aggregate fields.
The following has changed:
- While generating the IR, we will ignore introspection fields.
- use `as_object_selection_set` to process the selection set.

V3_GIT_ORIGIN_REV_ID: 0b88d497efd9b754483dd786fe7e8ef5fcb462f1
2024-10-14 07:07:46 +00:00
paritosh-08
9df2108237 use TestNDCResponses and GenerateOpenDDQuery wherever possible for graphql frontend test (#1201)
<!-- 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? -->

We can change a few `Skip` to `TestNDCResponses` or
`GenerateOpenDDQuery`.

We are still skipping tests for the following features:
- introspection
- order_by relationship
- where relationship
- where remote_relationship
- relay
- commands procedures
- field presets
- relationship predicates
- remote_relationship predicates
- apollo_federation
- aggregates
- most of the relationship tests

### How

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

V3_GIT_ORIGIN_REV_ID: ea0a5d865cc40f8f7428d8e742f48dc6be300696
2024-10-14 05:05:46 +00:00
Daniel Chambers
4f5e10c636 Aggregate Predicates: Resolve objectAggregate and scalarAggregate BooleanExpressionTypes (#1217)
<!-- The PR description should answer 2 important questions: -->

### What

This PR adds two new operand types for `BooleanExpressionType` in
OpenDD: `objectAggregate` and `scalarAggregate`. These two operand types
are then validated in metadata resolve to ensure their correctness.

Their design is based on [this
RFC](https://github.com/hasura/v3-engine/pull/945#issuecomment-2325652794).

They are hidden from the OpenDD JSON Schema and their usage is blocked
by default via a new unstable feature flag.

They are also currently not "usable", as the metadata resolve code that
would use an `objectAggregate` operand-ed `BooleanExpressionType` to
satisfy an aggregate predicate over an array relationship does not
exist. This will be added in a future PR; this PR is big enough!

### How

A new unstable feature `enable_aggregation_predicates` has been added to
gate this feature behind while it is in development.

The new OpenDD types have been added to
`crates/open-dds/src/boolean_expression.rs`.

A new metadata resolve stage `aggregate_boolean_expressions` has been
added that specifically resolves these two new operand types. Most of
the new code changes in this PR exist in this new stage.

The output of this stage is composed into the `boolean_expressions`
stage afterwards, but other than just being consumed and included there,
it is unused for now. In a future PR it will be used when resolving
object-operanded `BooleanExpressionTypes`.

An exhaustive set of metadata resolve tests has been added to test all
the error, warning and passing cases for both object and scalar
aggregate operands
(`crates/metadata-resolve/tests/failing/aggregate_boolean_expressions/`
and
`crates/metadata-resolve/tests/passing/aggregate_boolean_expressions/`).
These files make up the vast majority of the file count in this PR.

V3_GIT_ORIGIN_REV_ID: e0e030b322d05212a0e2630acc9f4db7b05000c1
2024-10-14 01:17:28 +00:00
Rakesh Emmadi
92d84bc126 graphql-ws: avoid cloning graphql schema state on each websocket connection (#1218)
<!-- 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? -->
Essential artifacts, like schema and auth/plugin configs, required for a
websocket connection are cloned on each request. This is causing massive
memory spike while simulating 10k concurrent connections using
graphql-bench tool.
![Screenshot from 2024-10-09
16-22-33](https://github.com/user-attachments/assets/57926a00-a3cb-4a95-b220-c4728067f951)
My machine has 62GB of ram, so absolute usage is `30% of 62G ~ 18 GB`.
I spent some time debugging dangling tokio tasks from closed websockets
using [tokio_console](https://github.com/tokio-rs/console). Tokio tasks
are closed as expected when websockets are dropped.

I gone through the graphql-ws code line-by-line and found that we are
cloning the schema for each websocket connection. The reason for this is
that, initially, I couldn't find a way to generate an `Arc` for just the
schema from the EngineState struct. ~However, I found a solution by
using the
[mappable-rc](https://docs.rs/mappable-rc/latest/mappable_rc/index.html)
crate.~ Tweak the `EngineState` struct to hold heavy fields inside `Arc`
to pass them around separately. Just pass the `EngineState` without
wrapping in `Arc` across axum routes, as it is cheap to clone now.

After wrapping all artifact values with `Arc`, the memory usage
decreased drastically.
![Screenshot from 2024-10-09
16-41-10](https://github.com/user-attachments/assets/090211d0-5318-4414-83b3-aa8cde86bfe4)
The screenshot above shows 1% memory usage for 10,000 concurrent
connections. From multiple runs, I found the average usage to be around
1.2% - 1.4%, which roughly translates to ~ `800MB`.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- Avoid cloning schema, auth_config and plugin artifacts on a new
websocket connections. Now, `EngineState` contains these values wrapped
with `Arc`. Use them directly.
- Refactor other parts of code to accommodate the above changes.

V3_GIT_ORIGIN_REV_ID: f56a9eecf6e9eca9fdc56bf332f9a06f5ad4cdb5
2024-10-09 14:55:25 +00:00
Tom Harding
81bd72f4d7 Report a path for UnknownModelCollection during model resolution (#1216)
### What

Like #1192, this PR adds a context to another error raised during the
`models` resolution step. Specifically, `UnknownModelCollection`.

### How

These PRs are extremely simple, it's just that there are going to be
dozens of them. When an error refers to a thing, you wrap that thing in
`Spanned`, and then try to extract the `path` at the error site. Most of
the time, it's pretty straightforward.

---------

Co-authored-by: Daniel Chambers <daniel@hasura.io>
V3_GIT_ORIGIN_REV_ID: d3ea71d3d9a42cbf804add54f5f6e75ab68c6765
2024-10-08 12:51:53 +00:00
Daniel Chambers
7c4d34d80c Move allow partial supergraph flag to OpenDD flags instead of an env var (#1205)
### What
Currently if you want v3-engine to accept metadata that is only a
partial supergraph (ie missing some subgraphs), you must set the
PARTIAL_SUPERGRAPH env var. Builds sent to MBS get sent to a special
endpoints `/validate/partial` and `/build/partial` that runs the engine
build process with that configuration option set.

This results in a terrible user experience for local builds, because MBS
will accept a partial supergraph and yield build artifacts, but
v3-engine will refuse to run them unless you set that env var.

This PR removes that env var and creates a new OpenDD flag called
`allow_partial_supergraph`. When MBS's `/validate/partial` endpoint is
used, that flag is set in the build artifacts. v3-engine then looks at
that flag to enable partial supergraph mode. This means a
`/build/partial` build via MBS just works when you run it locally via
v3-engine.

### How

`metadata_resolve`'s `Configuration.allow_unknown_subgraphs` has been
removed, and `metadata_resolve` now looks at OpenDD's new
`Flags.allow_partial_supergraph` instead.

In MBS, usage of `ValidationMode` (the enum that enables partial builds)
previously used to set `Configuration.allow_unknown_subgraphs`; now it
is used in `compute_open_dds_flags` in order to set
`Flags.allow_partial_supergraph`.

The existing metadata_resolve test that tested partial supergraphs has
been modified to use the flags rather than the removed configuration
option
(`crates/metadata-resolve/tests/passing/missing_subgraph_when_ignoring_unknown_subgraphs`).

A new `metadata_resolve` test has been added that checks that comparable
relationships in `BooleanExpressionType` properly respects the
`allow_partial_subgraphs` flag (this functionality was added in #1182).

V3_GIT_ORIGIN_REV_ID: 2c984eb791263a1fb0606c6c44a2a1ae4a5e7370
2024-10-07 06:30:46 +00:00
Brandon Simmons
62d9cbacdb ENG-1071: add detailed traces for MBS validate/ and some benchmarks (#1209)
<!-- The PR description should answer 2 important questions: -->

### What

Set us up for more visibility into performance on prod.

### How

Add traces

V3_GIT_ORIGIN_REV_ID: 0ea011c1233a08bf4f9d55a9084809a6ffcd934d
2024-10-05 16:04:16 +00:00
Daniel Harvey
06ca697a27 Move a function from graphql_ir to metadata-resolve (#1207)
<!-- The PR description should answer 2 important questions: -->

### What

Functional no-op towards making `graphql_ir` less central and breaking
some import cycles.

### How

Move the function.

V3_GIT_ORIGIN_REV_ID: 53ea007964f5ab79cb546821cfb76f542ea3b486
2024-10-04 15:56:14 +00:00
Rakesh Emmadi
66ab5b201d graphql-ws: Implement Plugins (#1195)
<!-- 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? -->
Execute configured pre-parse and pre-response plugins for GraphQL
operations over websockets.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
When a `type: subscribe` message is received, similar to HTTP requests,
run pre-parse plugins. If the plugins' response results in "continue",
then proceed with handling the GraphQL query. Otherwise, return the
plugin response or error.

For pre-response plugins, a task is spawned for handling plugins before
sending the response to the client. The task is run in a new trace,
linked to the poll trace.

V3_GIT_ORIGIN_REV_ID: ceb7ffd6da9235b3897ef4198729c07492c13d5e
2024-10-04 14:03:35 +00:00
Daniel Harvey
ad6c47a070 Move plan types out of GraphQL IR (#1203)
<!-- The PR description should answer 2 important questions: -->

### What

A lot of the `graphql_ir` is generally useful and not GraphQL specific.
Before we can move it into `plan` and share it we need to pull a few
shared types out of the package and somewhere more general too.

### How

Functional no-op.

V3_GIT_ORIGIN_REV_ID: 3fe8ca737ef3d8c7ce09ea695453645e303d7030
2024-10-04 13:53:06 +00:00
Brandon Simmons
c7044db956 MBS: support zstd and gzip -encoded POST request bodies (#1204)
Since these might be 10s or even 100s of MB this is important for saving
bandwidth

<!-- The PR description should answer 2 important questions: -->

### What

Save bandwidth (and possibly latency, etc) in mbs

### How

Support compressed request bodies. When this is deployed clients like
ddn-api can use it.

V3_GIT_ORIGIN_REV_ID: ad6357880d7c81ad58a76a3edfbac8d377ad7f5c
2024-10-04 08:44:19 +00:00
Daniel Harvey
7c3f6933bb Test offset/limit from GraphQL (#1202)
<!-- The PR description should answer 2 important questions: -->

### What

Parse offset/limit in the GraphQL -> OpenDD pipeline, and use it test
offset / limit. Functional no-op.

V3_GIT_ORIGIN_REV_ID: 068d14d08a4bde140f5633625a59137d3ff81d84
2024-10-03 15:51:58 +00:00
Rakesh Emmadi
2c328b5f64 Wrap execution of all pre-response plugins in a span (#1200)
<!-- 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? -->
Earlier, for pre-response plugins, a span is emitted for each plugin
execution. This PR wraps all plugin executions in a new span that
extends the client headers as parent context.

Before:

![main_pre_resp_plugins](https://github.com/user-attachments/assets/a3d74498-3f56-48fc-becf-a04b814aee4c)
After:

![refactors_pre_resp_plugins](https://github.com/user-attachments/assets/9277327f-a8de-419c-8423-e662ae09c3b0)

Note: `pre_response_plugins_execute` span name renamed to
`execute_all_pre_response_plugins` in later commits.
### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
Move execution of pre-response plugins in a task, into a new function.
Create a span that wraps a function that executes all plugins async.

V3_GIT_ORIGIN_REV_ID: a1febecf4b429e1441e4b53a9b32f39519a12ba9
2024-10-03 12:59:42 +00:00
Daniel Harvey
e313123ed7 Move commands from sql to plan (#1188)
<!-- The PR description should answer 2 important questions: -->

### What

Move the function/procedure planning from `sql` to the shared OpenDD IR
pipeline in `plan`. This should be a no-op for `sql`

### How

Move code, fix type errors.

V3_GIT_ORIGIN_REV_ID: 7da797ffedbc40a44692670679aa176817f2c65e
2024-10-03 10:28:39 +00:00
Daniel Harvey
629d48a086 Bump all the packages (#1199)
<!-- The PR description should answer 2 important questions: -->

### What

We need to bump `tonic` because of `cargo audit`, and to do so we need
to bump OpenTelemetry, and to do that we need to finally bump `http`,
and to do that...

### How

Follow the breadcrumb trail, fix the errors.

Checked, trace propagation still works:

<img width="1781" alt="Screenshot 2024-10-02 at 15 56 28"
src="https://github.com/user-attachments/assets/4c3f8763-e646-445d-84de-f507da15ad2e">
V3_GIT_ORIGIN_REV_ID: aa219e91375aa310dc656183948edc33f77cdfdc
2024-10-03 09:10:06 +00:00
Rakesh Emmadi
454ca0575f graphql-ws: Tests for WebSocket server (#1191)
<!-- 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? -->
Write tests to confirm websocket connection behavior in conjunction with
[graphl-ws](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md)
subprotocol.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
Test the websocket by spinning up a server in an async tokio task. Use
tokio-tungstenite for websocket client.

V3_GIT_ORIGIN_REV_ID: 32c19298b6a5b23649b22d8d820ef8d47ef1d293
2024-10-03 04:42:44 +00:00
Daniel Harvey
721ea64cc0 Fix docker-compose.yaml (#1197)
<!-- The PR description should answer 2 important questions: -->

### What

Running `docker compose up` is a generally accepted way to try a project
out, and ours was broken.

This fixes ours so that running `docker compose up` builds engine and
runs it with a sample schema for `ndc-postgres`. This will allow users
to get a flavour for DDN as a consumer.

We also remove a bunch of outdated and frankly confusing stuff from the
readme, instead directing users to the docs.

V3_GIT_ORIGIN_REV_ID: 77c817d1738efafe4027c7d0da1aa21bcf78dd9d
2024-10-02 11:07:29 +00:00
Daniel Harvey
141d7ac70a Update changelog for tag v2024-10-02 instead (#1196)
<!-- The PR description should answer 2 important questions: -->

### What

Release `v2024-10-02`, let's do `v2024-10-02` instead.

### How

Update changelog.

V3_GIT_ORIGIN_REV_ID: a6fe7e0c81ea2d4b9cfe76322ee2586cd152b458
2024-10-02 10:17:07 +00:00
Daniel Harvey
c8966f7377 Remove double encoding in graphql-ir/arguments (#1186)
<!-- The PR description should answer 2 important questions: -->

### What

Previously when we used a string from a session variable as a passed
through header it would become double escaped like `\"the string\"`.
This is because we were encoding to JSON, going back to
`reqwest::header::HeaderValue` and then back to JSON. Instead, let's
stay in JSON.

### How

Instead we stay in JSON for the session variable encoding, and
explicitly do the `reqwest::header::HeaderValue` -> JSON encoding. We
take the string in `HeaderValue` and make it a
`serde_json::Value::String`.

V3_GIT_ORIGIN_REV_ID: 3fd4df7c4aac5eadedd2d533cdf8e20dfa718060
2024-10-02 09:28:08 +00:00
Daniel Harvey
90d5268a63 Add feature flag for duplicate command names (#1193)
<!-- The PR description should answer 2 important questions: -->

### What

In #1168 we checked for duplicate command names. However this made a
project build fail, so we instead put this behind a flag and raise a
warning.

V3_GIT_ORIGIN_REV_ID: 41e3dcfda1d3f2da1e7ca672c9d20e0a3917d868
2024-10-01 16:28:01 +00:00
Tom Harding
188cd437a4 Implement error contexts for MBS (#1192)
### What

This PR allows MBS errors to provide a larger "context". Our notion of
context is an ordered list of annotated paths. An example would be for a
name conflict, where we want to say `["this name was used here", "...
and also here"]`, so reporting two paths would be helpful.

Note that the actual format of `path` is a structured data type, not a
string. An example of the first instance introduced by this PR can be
seen here:

```json
{
  "errors": [
    {
      "context": [
        {
          "message": "Data connector name given here",
          "path": [
            { "Index": 11 },
            { "Key": "definition" },
            { "Key": "source" },
            { "Key": "dataConnectorName" }
          ]
        }
      ],
      "code": "opendds-validation",
      "message": "invalid metadata: error building schema: invalid metadata: the source data connector b (in subgraph default) for model Artists (in subgraph default) has not been defined",
      "path": null
    }
  ]
}
```

The `path` key is already generated by other parts of the MBS process,
so we preserve it for now to avoid breaking changes.

### How

* A new crate, `error-context`, to hold the type of the context
structure.
* Otherwise essentially the same as the path mechanism.

V3_GIT_ORIGIN_REV_ID: 0bb529542ba0a7f6774c08fa6adb7d7c608d6c5b
2024-10-01 16:07:42 +00:00
Daniel Harvey
1040631da9 Update changelog for v2024.10.01 (#1187)
<!-- The PR description should answer 2 important questions: -->

### What

Update changelog.

V3_GIT_ORIGIN_REV_ID: 5fd36aafebbad8321fb7ab95f8a7e46759441926
2024-10-01 11:28:06 +00:00
Tom Harding
b2ed771d46 Wire up an error path to appear in the MBS API responses (#1180)
### What

This PR completes step 2 on the plan in #1153. With this PR, an attempt
to call MBS to build metadata containing a model referencing an unknown
data connector should result in a path to the model.

### How

#1179 introduced the polymorphic version of the error type introduced by
#1170. Unfortunately, due to Rust not having an apartness constraint, we
can't write `impl<T, S: From<T> From<WithContext<T>> for
WithContext<S>`, so we introduce the `coerce` function to allow us to
cast between `WithContext<ChildError>` and `WithContext<ParentError>`.

This means that we can return a `WithContext<ModelsError>` from the
models stage, coerce it to a `WithContext<Error>`, and propagate that
path throughout the system. This PR also extends the `path` function
inside MBS to detect these paths if present, so MBS API errors will
contain any available path.

V3_GIT_ORIGIN_REV_ID: a47c565b792fefb99294c9e21ba526424ddf7cb7
2024-10-01 09:42:07 +00:00
Daniel Harvey
cee0e038a8 Update source -> sourceType in open-dds RelationshipV1 example (#1184)
<!-- The PR description should answer 2 important questions: -->

### What

We used the old `source` key alias in doc examples, but we'd like to use
the newer `sourceType` instead.

### How

Change JSON example.

V3_GIT_ORIGIN_REV_ID: f3223fb9716a2cf277ea2e82891ae8bbcdcd9ee0
2024-10-01 09:05:54 +00:00
paritosh-08
f16c96c655 make pre-response plugin execution spans visible to user (#1185)
<!-- The PR description should answer 2 important questions: -->

### What

This PR makes the spans visible to the users.

### How

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

V3_GIT_ORIGIN_REV_ID: b39cc2496053f4eadaec2a260146c83e4ed5b24d
2024-10-01 08:54:32 +00:00
Rakesh Emmadi
56f91741f3 graphql-ws: Emit new trace for each subscription poll (#1181)
<!-- 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? -->
Create a new trace for each subscription poll and link the span. It is
done to avoid accumulation of polling spans in one trace. Also, move
waiting for poll interval to post execution.

### How
- Update `in_span_async_with_link` to `new_trace_async_with_link` which
signifies opening a new trace with a link.
- Wrap the body present `loop {}` in `new_trace_async_with_link` to emit
new trace for each poll.
-  Capture poll exceptions in the trace.

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

V3_GIT_ORIGIN_REV_ID: c984ef70e0e55a5edae12e3f3c0580a0065516cd
2024-10-01 08:35:27 +00:00
Daniel Chambers
017e1e296e Fixed error when relationships used in BooleanExpressionTypes were not handled correctly in partial supergraph mode (#1182)
### What
When the engine is run in `PARTIAL_SUPERGRAPH` mode, any relationship
that targets an unknown subgraph should be silently dropped. This was
being done when resolving relationship navigation fields on the
`ObjectType`, but not for `comparableRelationships` on
`BooleanExpressionType`. In that case we were erroring as we tried to
resolve the relationship and couldn't find the target subgraph.

### How
The `relationships` metadata resolve step has been enhanced to capture
if a relationship is targeting an unknown subgraph. The
`object_boolean_expressions` step already used this, so it was tweaked
to skip relationships targeting unknown subgraphs.

The `object_relationships` step, however, did not use `relationships`
and instead went back to metadata_accessor for relationships. It then
had special logic that skipped unknown subgraph relationships. The step
has now been refactored to use `relationships` instead and the special
skipping logic has been discarded, and it now just uses the unknown
subgraph information from `relationships`.

In addition, the `object_relationships` step now _consumes_ the output
of the `type_permissions` step, rather than cloning it. This reduces
unnecessary cloning and makes sense since `object_relationships` is
simply a further enriched version of `type_permissions`.

The test of whether the source object type of a relationship actually
exists has also been moved from `object_relationships` to
`relationships`, and the index built by `relationships` has been
reordered to group by type first and then name, since that is more
useful, especially in the `object_relationships` step.

V3_GIT_ORIGIN_REV_ID: e5d18343f5ce24532a3258e88751bc3183692c50
2024-10-01 08:17:13 +00:00
Brandon Simmons
81bddc181e ENG-1125: improve performance of process_response for large nested responses (#1163)
<!-- The PR description should answer 2 important questions: -->

### What

Fixes:
https://linear.app/hasura/issue/ENG-1073/figure-out-whats-causing-the-slowdown-in-response-processing

This removes the accidentally-quadratic behavior of repeated
nested `from_value`/`to_value` calls where the assumption seems to have
been
that ndc model fields containing Value would be untouched (similar to
the behavior of aeson).

### How

We work with `Value` directly instead of using `serde` machinery to get
a `RowSet`.

#### Benchmarks

The large result query shows modest latency improvement:

![image](https://github.com/user-attachments/assets/65d300ed-ad44-466a-bce2-950b305b02b3)

A query with a response of the same size as above, but with deep nesting
to trigger quadratic behavior shows significant latency improvement
(~12ms to ~2ms for `process_response` span)

![image](https://github.com/user-attachments/assets/355f8e96-a363-4523-a9df-850aba8edb8a)

Small responses (common, historically) don't show any improvement, as
they don't exhibit the issue.

V3_GIT_ORIGIN_REV_ID: f709e4f8a370b46c53f533eef2fef7e772b5cb72
2024-09-30 16:52:25 +00:00
Tom Harding
618d03a24a Parameterise the metadata_resolve error type (#1179)
### What

To do this iteratively, we want to be able to make e.g. models throw
contextualised errors while other stages don't. To do this, we want to
update the models code to return its own version of `ErrorWithContext`
with its own logic for propagating paths. To avoid the mess, I've made
this polymorphic.

V3_GIT_ORIGIN_REV_ID: 8ff2082e3ac8eea908727cffac93fd9cf58ddcce
2024-09-30 13:28:20 +00:00
Rakesh Emmadi
c7e3e8b0d3 enable tracing on graphql-ws (#1165)
<!-- 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? -->
Add traces to `graphql-ws` crate. Since websockets are implemented by
running multiple parallel tasks, we are using span links to establish
relation between traces emitted by those tasks.

Refactor by moving code into new modules and updating function names and
types.

### How
- Define a new `in_span_async_with_link()` in tracing-util to enable
creating a span with a link.
- Wrap spans around necessary code sections with attaching required
attributes.
- Small no-op refactor in `common.rs` test file.

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

V3_GIT_ORIGIN_REV_ID: 33cd313b94421097f3c1bb1bcf165f04c1a9cd65
2024-09-30 13:20:09 +00:00
Daniel Harvey
f3f0e113ba Basic OpenDD pipeline execution testing for GraphQL (#1178)
<!-- The PR description should answer 2 important questions: -->

### What

Add basic NDC execution testing for the new pipeline to the existing
`engine/tests/execution.rs` tests. Grabs rows from NDC and snapshots the
results, but good enough to eyeball and see things are somewhat working.

Somewhat interesting: we can't test `selectUnique` queries using the new
pipeline, because the primary key argument isn't an actual model
argument (and thus fails in the `argument_mappings` lookup). It's
actually taken as an argument in GraphQL, but turned into an additional
filter expression and `AND`ed onto whatever filters are there. Will need
to have a think about this, but not now.

Functional no-op.

### How

Copy the execution step from JSONAPI and use it in engine tests.

V3_GIT_ORIGIN_REV_ID: 5b1ea8c1f08048b563db694b618c8823e4139383
2024-09-30 12:12:06 +00:00
Tom Harding
c6e6ed8026 Wrap metadata-resolve errors with path container (#1170)
<!-- The PR description should answer 2 important questions: -->

### What

Another incremental step towards metadata-resolve paths. This PR wraps
the current error type with `ErrorWithContext`, a type that can
optionally contain a path. The PR should be a functional no-op as we
still ignore these paths when displaying the error; the next PR will
surface them in the error responses.

### How

We wrap the type and then do a _lot_ of hand-holding to get Rust
inference to work.

V3_GIT_ORIGIN_REV_ID: c1384cb1e8700c9b7e3aa643b7d0fbd4c8471098
2024-09-30 11:19:05 +00:00
Daniel Harvey
4015612091 Extract NDCFunction and NDCProcedure in sql command planning (#1172)
<!-- The PR description should answer 2 important questions: -->

### What

Before we pull the command planning into `plan`, let's split the types
so the general and DataFusion stuff don't live in the same place.

### How

Move types, follow errors. Functional no-op.

V3_GIT_ORIGIN_REV_ID: bb4adbc6897a79f47be37d5ad1a13b7b8efb5e93
2024-09-30 10:35:53 +00:00
Daniel Harvey
b470c927e1 Very basic sparse fieldset parsing (#1177)
<!-- The PR description should answer 2 important questions: -->

### What

A JSONAPI request allows users to provide the fields they require like
so:

```
fields[Authors]=author_id,first_name
```

This PR implements the most basic form of this, along with some notes on
what the better version could be. This is motivated by allowing us to
test the OpenDD pipeline more than anything else.

### How

Loop through sparse field sets looking for the field we want to include,
reject it if not.

JSONAPI is behind a feature flag so is a functional no-op.

V3_GIT_ORIGIN_REV_ID: 27dbb6103c42910be71529351e7a2c9ce0abcb4a
2024-09-30 10:35:48 +00:00
paritosh-08
18697ae98d pre-response engine plugin (#1033)
<!-- The PR description should answer 2 important questions: -->

### What

This PR adds the pre-response plugins to the engine and engine
multitenant. We have also added a new flag/env var to get the
pre-response plugin artifacts:

- `PRE_RESPONSE_PLUGIN_CONFIG_ARTIFACT_URL_TEMPLATE`

A sample metadata for pre-response plugin is:
```json
{
  "kind": "LifecyclePluginHook",
  "version": "v1",
  "definition": {
    "name": "logging",
    "url": {
      "value": "http://localhost:5001/log"
    },
    "pre": "response",
    "config": {
      "request": {
        "headers": {
          "additional": {
            "hasura-m-auth": {
              "value": "your-strong-m-auth-key"
            }
          }
        },
        "session": {},
        "rawRequest": {
          "query": {},
          "variables": {}
        },
        "rawResponse": {}
      }
    }
  }
}
```

Please note that the execution of pre-response plugins happens on a new
tokio thread
([tokio::spawn](https://docs.rs/tokio/latest/tokio/task/fn.spawn.html))
which will run in the background. We will NOT wait for any of the task
to complete before sending the response to the user.

An example of the trace with 5 pre-response plugin calls:

![image](https://github.com/user-attachments/assets/380a262a-2b83-4d82-9bc4-85362c8aa5f4)

### How

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

We have added this in the plugin middleware.

V3_GIT_ORIGIN_REV_ID: 270d77c45d5e8cc85a5f281f59f981f210eb4547
2024-09-30 10:29:30 +00:00
paritosh-08
d394276a5a add mappings to the relationship usage analytics (#1125)
Linear:
https://linear.app/hasura/issue/APIPG-395/query-usage-analytics-report-relationship-fields

### What

This PR adds mappings to the relationship usage analytics. The goal is
to improve the tracking of relationships between models in the system by
mapping relationship fields (source to target fields) and relationship
arguments, ensuring that analytics around these mappings can be
accurately captured.

No changelog entry is required as the change is not user-facing.

### How

The implementation introduces the following changes:
- Added `get_relationship_model_mappings` and
`get_relationship_command_mappings` functions to extract mappings of
relationship fields and arguments.
- Updated the `RelationshipUsage` structure to include the new
`mappings` field for both model and command mappings.

These changes affect various components handling relationships within
the analytics system, as seen in files such as
`query_usage_analytics.rs`, where mappings are now tracked across
different relationship types.

### Example analytics:

For the following query:
```graphql
query MyQuery {
  ArticleMany {
    # relationship to command
    AuthorFromCommand {
      id
    }
    # relationship to a model
    Author {
      id
    }
  }
}
```
The query usage analytics looks something like:

- For relationship to model:
  ```yaml
  used:
  - relationship:
      name: article
      source:
        subgraph: default
        name: commandArticle
      target:
        model:
          model_name:
            subgraph: default
            name: Articles
          opendd_type:
            subgraph: default
            name: article
          relationship_type: Object
          mapping:
          - source_field: article_id
            target_field: article_id
      deprecated: false
      deprecated_reason:
  ```
- For relationship to command:
  ```yaml
  used:
  - relationship:
      name: AuthorFromCommand
      source:
        subgraph: default
        name: article
      target:
        command:
          command_name:
            subgraph: default
            name: get_author_by_id
          opendd_type:
            subgraph: default
            name: commandAuthor
          mapping:
          - source_field: author_id
            target_argument: author_id
      deprecated: false
      deprecated_reason:
  ```

V3_GIT_ORIGIN_REV_ID: e26d30af7a2b77156d1120bd1a51f8d44b9dc443
2024-09-30 10:09:23 +00:00
Daniel Harvey
a8deb88f4e Move model aggregate planning to 'plan' crate (#1171)
<!-- The PR description should answer 2 important questions: -->

### What

Much in the vein of https://github.com/hasura/v3-engine/pull/1166, we
move the model aggregate planning from `sql` to the `plan` crate. No
tests actually exercise this code in the OpenDD IR pipeline yet, perhaps
if we extend the GraphQL -> OpenDD IR pipeline we can put it under test.

### How

Move the code, fix the errors. Functional no-op.

V3_GIT_ORIGIN_REV_ID: 7beee0aec828296fefa24c975d4662a20aa0d2e5
2024-09-30 09:09:38 +00:00
dependabot[bot]
d6c8f5906b Bump syn from 2.0.77 to 2.0.79 (#1174)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.77 to 2.0.79.
<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.79</h2>
<ul>
<li>Fix infinite loop on parsing chained ranges (<a
href="https://redirect.github.com/dtolnay/syn/issues/1741">#1741</a>)</li>
<li>Fix panic in parsing <code>use</code> items containing absolute
paths (<a
href="https://redirect.github.com/dtolnay/syn/issues/1742">#1742</a>)</li>
</ul>
<h2>2.0.78</h2>
<ul>
<li>Fix infinite loop on chained comparison (<a
href="https://redirect.github.com/dtolnay/syn/issues/1739">#1739</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="732e6e3940"><code>732e6e3</code></a>
Release 2.0.79</li>
<li><a
href="af63396422"><code>af63396</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1742">#1742</a>
from dtolnay/usecrateroot</li>
<li><a
href="31e8632338"><code>31e8632</code></a>
Fix construction of UseGroup containing crate roots</li>
<li><a
href="037861ac3c"><code>037861a</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1741">#1741</a>
from dtolnay/binoploop</li>
<li><a
href="8df4dd0fa4"><code>8df4dd0</code></a>
Force cursor to advance in parse_expr calls</li>
<li><a
href="09d020f5a1"><code>09d020f</code></a>
Release 2.0.78</li>
<li><a
href="7eaebfbb47"><code>7eaebfb</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1739">#1739</a>
from dtolnay/chainedcomparison</li>
<li><a
href="b3d2886fc9"><code>b3d2886</code></a>
Fix infinite loop on chained comparison</li>
<li><a
href="3f3d0c57ac"><code>3f3d0c5</code></a>
Add regression test for issue 1738</li>
<li><a
href="346efaec55"><code>346efae</code></a>
Touch up PR 1737</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/syn/compare/2.0.77...2.0.79">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.77&new-version=2.0.79)](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: bc56f0e5a76ae84d54e24ad11c786202a278dec8
2024-09-30 08:43:46 +00:00
dependabot[bot]
34ce39fa94 Bump async-trait from 0.1.82 to 0.1.83 (#1175)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.82
to 0.1.83.
<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.83</h2>
<ul>
<li>Prevent needless_arbitrary_self_type lint being produced in
generated code (<a
href="https://redirect.github.com/dtolnay/async-trait/issues/278">#278</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e6b4d471c6"><code>e6b4d47</code></a>
Release 0.1.83</li>
<li><a
href="bfe8d61766"><code>bfe8d61</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/async-trait/issues/278">#278</a>
from dtolnay/arbself</li>
<li><a
href="7bd974b3a4"><code>7bd974b</code></a>
Ignore needless_arbitrary_self_type clippy lint in generated code</li>
<li><a
href="b53b4e7554"><code>b53b4e7</code></a>
Add regression test for issue 277</li>
<li>See full diff in <a
href="https://github.com/dtolnay/async-trait/compare/0.1.82...0.1.83">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.82&new-version=0.1.83)](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: f1b834b7b1078af67662dfd1d55a94c1ba5494f7
2024-09-30 08:43:41 +00:00
dependabot[bot]
3473fc5663 Bump async-graphql-parser from 7.0.9 to 7.0.11 (#1176)
Bumps
[async-graphql-parser](https://github.com/async-graphql/async-graphql)
from 7.0.9 to 7.0.11.
<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.11] 2024-09-26</h1>
<ul>
<li>fix <a
href="https://redirect.github.com/async-graphql/async-graphql/issues/1598">#1598</a></li>
</ul>
<h1>[7.0.10] 2024-09-24</h1>
<ul>
<li>add <code>SchemeBuilder.limit_directives</code> method to set the
maximum number of directives on a single field.</li>
<li>remove needless ?Sized <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1593">#1593</a></li>
<li>fix: generate each variant description correctly. <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1589">#1589</a></li>
<li>Make <code>From&lt;T&gt;</code> for [Error] set source <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1561">#1561</a></li>
<li>feat(graphiql): add support for WS connection params <a
href="https://redirect.github.com/async-graphql/async-graphql/pull/1597">#1597</a></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.9&new-version=7.0.11)](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: 49257197190f6dd1a1a207d058245a582592a4d4
2024-09-30 08:25:10 +00:00
Tom Harding
c3987ff712 Factor build-artifacts out of v3-engine (#1167)
### What

In order to talk about artifacts in MBS, we pull in the entirety of
engine-multitenant, which pulls in the entirety of engine, which is
quite a big dependency tree. This PR factors that code out into a
separate package, `build-artifacts`, to lighten the MBS dependency
burden.

---------

Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com>
V3_GIT_ORIGIN_REV_ID: ad60badb5b793a80cf60cf4b040501eb6abc6bb2
2024-09-27 15:34:49 +00:00
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