Commit Graph

8658 Commits

Author SHA1 Message Date
Vamshi Surabhi
173ec9a1e5 [PACHA-12] sql: fix failing introspection queries (#958)
### What

Introspection queries (on 'hasura' schema) would fail when there is no
data in the underlying tables.

### How

A more robust 'MemTable' with a comprehensive set of tests is introduced
which shouldn't run into these issues.

V3_GIT_ORIGIN_REV_ID: e09de03e8d093fb4348514cfed6b6dc1d9b0b0c8
2024-08-12 22:04:36 +00:00
Phil Freeman
6f9e92c160 [PACHA-1] Handle nested fields in /sql endpoint (#936)
<!-- The PR description should answer 2 important questions: -->

### What

- Add columns with nested fields to the SQL schema
- Alias nested fields appropriately in order to support them for query
execution

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

- Translate OpenDD types to Arrow types during schema generation
(`to_arrow_type`)
- Generate `NestedField` structures during planning to prepare data in
the right format during execution (`fields_for`)

V3_GIT_ORIGIN_REV_ID: d37d2eade2fd5c0f08861c1bbc6368a88299b0f3
2024-08-12 21:25:11 +00:00
Daniel Harvey
eb9d6563b1 Bring back benchmarks (#957)
<!-- The PR description should answer 2 important questions: -->

### What

Renables Github benchmarking after we removed it in
https://github.com/hasura/v3-engine/pull/819

### How

Tell Criterion to only sample for 5 seconds each time to stop each
benchmark going on forever. This makes the whole run take a reasonable
10 minutes.

V3_GIT_ORIGIN_REV_ID: 364be6490f4f4b21877849daf1f734fa51ecf542
2024-08-12 16:46:08 +00:00
Daniel Harvey
69c3011633 Bump to Rust 1.80.0 (#954)
<!-- The PR description should answer 2 important questions: -->

### What

Upgrade to [Rust
1.80.0](https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html)

### How

Update `rust-toolchain.yaml` and Dockerfiles, fix warnings.

V3_GIT_ORIGIN_REV_ID: ba797e1aba6b9623a921734473a6b70a2a38c8b7
2024-08-12 11:16:49 +00:00
Vamshi Surabhi
db80b37ece [PACHA-2] sql: handle ndc responses with empty rows (#947)
<!-- The PR description should answer 2 important questions: -->

### What

When querying a table with no data through SQL would result in an error.

### How

Instead of returning a `RecordBatch`, arrow_json's implementation
returns an `Option<RecordBatch>`, we now account for `None`.

V3_GIT_ORIGIN_REV_ID: 459440e82aeb1b2faa009405e025fc024497d5b4
2024-08-12 09:52:31 +00:00
dependabot[bot]
a1542e4a52 Bump syn from 2.0.72 to 2.0.74 (#953)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.72 to 2.0.74.
<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.74</h2>
<ul>
<li>Fix <em>&quot;temporary is dropped and runs the destructor for type
`impl Iterator`&quot;</em> regression affecting certain use of
<code>Generics</code> iterator methods (<a
href="https://redirect.github.com/dtolnay/syn/issues/1719">#1719</a>)</li>
</ul>
<h2>2.0.73</h2>
<ul>
<li>Support parsing unnamed C varargs within function pointer types (<a
href="https://redirect.github.com/dtolnay/syn/issues/1711">#1711</a>)</li>
<li>Improve synthesized error message on unexpected tokens at the end of
the expected contents of a delimited group (<a
href="https://redirect.github.com/dtolnay/syn/issues/1713">#1713</a>)</li>
<li>Support parsing unstable tail call syntax (<a
href="https://redirect.github.com/dtolnay/syn/issues/1714">#1714</a>, <a
href="https://redirect.github.com/rust-lang/rust/issues/112788">rust-lang/rust#112788</a>)</li>
<li>Add <a
href="https://docs.rs/syn/2.0.73/syn/enum.Fields.html#method.members"><code>Fields::members</code></a>
iterator (<a
href="https://redirect.github.com/dtolnay/syn/issues/1716">#1716</a>,
thanks <a
href="https://github.com/Fancyflame"><code>@​Fancyflame</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b15ae28409"><code>b15ae28</code></a>
Release 2.0.74</li>
<li><a
href="6cf2344440"><code>6cf2344</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1719">#1719</a>
from dtolnay/iterators</li>
<li><a
href="2955ac55b7"><code>2955ac5</code></a>
Expose non-impl-Trait iterator return types</li>
<li><a
href="7dc05a5643"><code>7dc05a5</code></a>
Add regression test for issue 1718</li>
<li><a
href="857942e411"><code>857942e</code></a>
Revert &quot;Define Fields::members iterator type privately inside
method&quot;</li>
<li><a
href="65ec30d659"><code>65ec30d</code></a>
Revert &quot;Embed Generics iterator implementations into method
bodies&quot;</li>
<li><a
href="b5a5a8c177"><code>b5a5a8c</code></a>
Release 2.0.73</li>
<li><a
href="8cdb5c734d"><code>8cdb5c7</code></a>
Add example of using Fields::members iterator</li>
<li><a
href="2afdc12674"><code>2afdc12</code></a>
Remove redundancy of Generics::split_for_impl cfg with type's cfg</li>
<li><a
href="64b0dc8d0d"><code>64b0dc8</code></a>
Combine Generics impl blocks into one</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/syn/compare/2.0.72...2.0.74">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.72&new-version=2.0.74)](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>
V3_GIT_ORIGIN_REV_ID: 79522dd492c62fe9ae9260e6553847845859d7ce
2024-08-12 08:31:46 +00:00
dependabot[bot]
631316f7a5 Bump indexmap from 2.2.6 to 2.3.0 (#952)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.2.6 to
2.3.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.3.0</h2>
<ul>
<li>Added trait <code>MutableEntryKey</code> for opt-in mutable access
to map entry keys.</li>
<li>Added method <code>MutableKeys::iter_mut2</code> for opt-in mutable
iteration of map
keys and values.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="22c0b4e0f3"><code>22c0b4e</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/335">#335</a>
from epage/mut</li>
<li><a
href="39f7cc097a"><code>39f7cc0</code></a>
Release 2.3.0</li>
<li><a
href="6049d518a0"><code>6049d51</code></a>
feat(map): Add MutableKeys::iter_mut2</li>
<li><a
href="65c3c46e37"><code>65c3c46</code></a>
feat(map): Add MutableEntryKey</li>
<li><a
href="7f7d39f734"><code>7f7d39f</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/332">#332</a>
from waywardmonkeys/missing-indentation-in-doc-comment</li>
<li><a
href="8222a59a85"><code>8222a59</code></a>
Fix missing indentation in doc comment.</li>
<li><a
href="1a71dde63d"><code>1a71dde</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/327">#327</a>
from waywardmonkeys/dep-update-dev-dep-itertools</li>
<li><a
href="ac2a8a5a40"><code>ac2a8a5</code></a>
deps(dev): Update <code>itertools</code></li>
<li>See full diff in <a
href="https://github.com/indexmap-rs/indexmap/compare/2.2.6...2.3.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.2.6&new-version=2.3.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>
V3_GIT_ORIGIN_REV_ID: a1bcf216fdc94b327c7f078046478f40d0eed4e8
2024-08-12 08:27:46 +00:00
dependabot[bot]
aba590fa71 Bump serde_json from 1.0.122 to 1.0.124 (#950)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.122 to
1.0.124.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.124</h2>
<ul>
<li>Fix a bug in processing string escapes in big-endian architectures
(<a
href="https://redirect.github.com/serde-rs/json/issues/1173">#1173</a>,
thanks <a
href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
</ul>
<h2>v1.0.123</h2>
<ul>
<li>Optimize string parsing by applying SIMD-within-a-register: 30.3%
improvement on <a
href="https://github.com/miloyip/nativejson-benchmark/blob/v1.0.0/data/twitter.json">twitter.json</a>
from 613 MB/s to 799 MB/s (<a
href="https://redirect.github.com/serde-rs/json/issues/1161">#1161</a>,
thanks <a
href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cf771a0471"><code>cf771a0</code></a>
Release 1.0.124</li>
<li><a
href="8b314a77bf"><code>8b314a7</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1173">#1173</a>
from iex-rs/fix-big-endian</li>
<li><a
href="8eba7863b1"><code>8eba786</code></a>
Fix skip_to_escape on BE architectures</li>
<li><a
href="2cab07e686"><code>2cab07e</code></a>
Release 1.0.123</li>
<li><a
href="346189a524"><code>346189a</code></a>
Fix needless_borrow clippy lint in new control character test</li>
<li><a
href="859ead8e6d"><code>859ead8</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1161">#1161</a>
from iex-rs/vectorized-string-parsing</li>
<li><a
href="e43da5ee0e"><code>e43da5e</code></a>
Immediately bail-out on empty strings</li>
<li><a
href="8389d8a112"><code>8389d8a</code></a>
Don't run the slow algorithm from the beginning</li>
<li><a
href="1f0dcf791a"><code>1f0dcf7</code></a>
Allow clippy::items_after_statements</li>
<li><a
href="a95d6df9d0"><code>a95d6df</code></a>
Big endian support</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/json/compare/v1.0.122...v1.0.124">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.122&new-version=1.0.124)](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>
V3_GIT_ORIGIN_REV_ID: bf3ef8f9c7404cc0dafb1e4d4dd5fed896061971
2024-08-12 08:27:39 +00:00
dependabot[bot]
e6407fabc8 Bump serde from 1.0.204 to 1.0.206 (#949)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.204 to
1.0.206.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/serde/releases">serde's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.206</h2>
<ul>
<li>Improve support for <code>flatten</code> attribute inside of enums
(<a
href="https://redirect.github.com/serde-rs/serde/issues/2567">#2567</a>,
thanks <a
href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
</ul>
<h2>v1.0.205</h2>
<ul>
<li>Use serialize_entry instead of serialize_key + serialize_value when
serialize flattened newtype enum variants (<a
href="https://redirect.github.com/serde-rs/serde/issues/2785">#2785</a>,
thanks <a
href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
<li>Avoid triggering a collection_is_never_read lint in the
deserialization of enums containing flattened fields (<a
href="https://redirect.github.com/serde-rs/serde/issues/2791">#2791</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="85c73ef8de"><code>85c73ef</code></a>
Release 1.0.206</li>
<li><a
href="5ba1796a7e"><code>5ba1796</code></a>
Resolve doc_markdown pedantic lint on regression test function</li>
<li><a
href="e52b7b380f"><code>e52b7b3</code></a>
Touch up PR 2567</li>
<li><a
href="84c7419652"><code>84c7419</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2794">#2794</a>
from dtolnay/neverread</li>
<li><a
href="536221b1f9"><code>536221b</code></a>
Temporarily ignore collection_is_never_read on
FlattenSkipDeserializing</li>
<li><a
href="fc55ac70d3"><code>fc55ac7</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2567">#2567</a>
from Mingun/fix-2565</li>
<li><a
href="2afe5b4ef9"><code>2afe5b4</code></a>
Add regression test for issue <a
href="https://redirect.github.com/serde-rs/serde/issues/2792">#2792</a></li>
<li><a
href="b4ec2595c9"><code>b4ec259</code></a>
Correctly process flatten fields in enum variants</li>
<li><a
href="c3ac7b675a"><code>c3ac7b6</code></a>
Add regression test for issue <a
href="https://redirect.github.com/serde-rs/serde/issues/1904">#1904</a></li>
<li><a
href="24614e44bf"><code>24614e4</code></a>
Add regression test for issue <a
href="https://redirect.github.com/serde-rs/serde/issues/2565">#2565</a></li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.206">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.204&new-version=1.0.206)](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>
V3_GIT_ORIGIN_REV_ID: 50cd5a67d87a37060b2197f1355699d5701df396
2024-08-12 08:23:53 +00:00
paritosh-08
8233d6caa3 if no plugins make middleware no-op (#948)
<!-- 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? -->

Just an improvement to the middleware plugin

### How

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

We now take a nonempty list of plugins. This ensures that we only do
things if we have plugins.

V3_GIT_ORIGIN_REV_ID: c8fb548f763cdefe3526c67d7c801104ad5c527a
2024-08-09 15:33:20 +00:00
paritosh-08
2c94e0b1dd extract pre-parse plugins in build step (#946)
<!-- The PR description should answer 2 important questions: -->

### What

We want to store the pre-plugins as artifacts. For this, we need to get
the list of pre-plugins while building the artifacts.

### How

This can be achieved by extracting the pre-plugins during the build
step.

---------

Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 64e8697d90092acad0cb8a338becb7868af78350
2024-08-09 09:00:14 +00:00
Rob Dominguez
a371737c92 Docs: Fix build refs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10990
GitOrigin-RevId: 36822d9310ed8fa29cbc98c5cce13eb3ca74b655
2024-08-08 21:57:59 +00:00
Rob Dominguez
f29ee63c23 Docs: Update cloud plans page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10989
GitOrigin-RevId: 350bd13b50c985d892ca8bc49f847d5a3b5ebe52
2024-08-08 20:55:51 +00:00
Rikin Kachhia
0d88c5826e ci: update latest stable release as v2.42.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10988
GitOrigin-RevId: a9b184bce3c17d907df8cafcc8ef7a1b978f1fee
2024-08-08 11:20:00 +00:00
paritosh-08
7e3e8264d8 plugins as opendd objects (#889)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

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

This PR introduces a new OpenDD object of kind `LifecyclePluginHook`. An
example
```json
{
  "kind": "LifecyclePluginHook",
  "version": "v1",
  "definition": {
    "pre": "parse",
    "name": "test",
    "url": "http://localhost:8787",
    "config": {
      "request": {
        "headers": {
          "additional": {
            "hasura-m-auth": {
              "value": "zZkhKqFjqXR4g5MZCsJUZCnhCcoPyZ"
            }
          }
        },
        "session": {},
        "rawRequest": {
          "query": {},
          "variables": {}
        }
      }
    }
  }
}
```

The plugin configs (only pre-parse plugins for now) are stored in the
engine state and used wherever required.

### How

We have added the OpenDD object.

V3_GIT_ORIGIN_REV_ID: aa02315362e5fc9a36b63ead48909e1baa92779f
2024-08-08 09:17:05 +00:00
Rakesh Emmadi
aa287dbd44 add a check for description in json schema validation (#943)
### What
Add a check for presence of descriptions in JSON schema. Add missing
descriptions for types.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- Extend the `validate_root_json_schema` utility with a check for
descriptions.
- Add a doc comment for types that need a description in their JSON
schema.

---------

Co-authored-by: Abhinav Gupta <127770473+abhinav-hasura@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 5c411aa0cf33ac1fde076c29020edd4957fbc27c
2024-08-08 05:47:47 +00:00
Samir Talwar
38c0e1470b CI: Fix the Rust cache. (#942)
### What

Try not to pollute the CI cache with the wrong thing.

### How

1. Remove the package selector as we don't care about production builds
here any more.
2. Tell the test build to not save the cache so there is no write
contention.
3. Downgrade `mockito` to v1.4 reduce the size of the cache, because
`v1.5` depends on `http` v1.

V3_GIT_ORIGIN_REV_ID: 2109c8c7db5d80e3b2c29d2949423e8faebd10b2
2024-08-07 15:34:22 +00:00
Samir Talwar
9c88a3a16f Only schedule cleanup for event triggers if any exist.
Users were seeing spurious log entries saying that cleanup could not be scheduled for BigQuery sources as event triggers are not supported.

This makes the error go away by enforcing non-emptyness on the list of triggers, which means we cannot call the function throwing the error, as there will never be any event triggers for which to schedule cleanup.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10987
GitOrigin-RevId: ce9bd6a340bbc8f45f4c74cf9c69f65c4ee91bf5
2024-08-07 13:56:58 +00:00
Daniel Harvey
e1bceb4b8e [changelog] release v2024.08.07 (#940)
Get ready for `v2024.08.07`, update changelog.

V3_GIT_ORIGIN_REV_ID: e79021814eaf65d4153ab4fbbe67572ae97edd14
2024-08-07 10:18:59 +00:00
Daniel Harvey
7e7426fa74 Store graphql type names in boolean expressions stage (#939)
<!-- The PR description should answer 2 important questions: -->

### What

Resolve a TODO from boolean expressions stage.

There is a small chance this cause a build error - will check the schema
diff tests before merging.

### How

Use `store_new_graphql_type` on the graphql types of boolean
expressions.

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

V3_GIT_ORIGIN_REV_ID: 0498f8f3480ef2d5bbdbb57a0e50cae3bbdef868
2024-08-07 09:56:01 +00:00
David Overton
9f43576e0b Avoid some unnecessary cloning (#938)
<!-- The PR description should answer 2 important questions: -->

### What

Avoid some unnecessary cloning during metadata resolve.

### How

Some data structures, such as `graphql_types` which are updated by
various stages of metadata resolve, were being unnecessarily cloned.
Instead of cloning from an immutable reference, we now move the value
into each stage and return it as part of the stage output.

V3_GIT_ORIGIN_REV_ID: 067698c3e004c70165fb0a8190542115a9f6cfb6
2024-08-07 08:59:01 +00:00
Anon Ray
f9e4502c96 add AuthConfig v2 example (#937)
### What

- Added `AuthConfig` v2 config example in
`static/auth/auth_config_v2.json`
- Moved exisiting `auth_config.json` to `static/auth/`
- Removed unused `pre_plugins.json`

If one wants to start the engine with a v2 of AuthConfig,
`static/auth/auth_config_v2.json` can be used.

V3_GIT_ORIGIN_REV_ID: 471f8ae43ab02c2182457804a24b8445bb41f06c
2024-08-07 06:51:17 +00:00
Vijay Prasanna
27c8e0085c console: update actionWithTransform.e2e.test.ts snapshot file
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10985
GitOrigin-RevId: 45e8d26a4f6f87f226d768e56f9250104c4a3240
2024-08-07 05:34:19 +00:00
David Overton
e80436355b Metadata resolve for OrderByExpression (#840)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

- Add metadata resolver for the new `OrderByExpression` metadata object
kind.
- When resolving a v1 `Model`, generate an `OrderByExpression` based on
the model's `orderable_fields`.

### How

`OrderByExpression` was added to OpenDD in
https://github.com/hasura/v3-engine/pull/780. This PR adds metadata
resolvers for this new metadata object kind. The OpenDD changes involved
a new version v2 of `Model` where `orderableFields` was moved out of the
out of the model definition. The model now references an
`OrderByExpression` instead.

To retain backwards compatibility with `Model` v1, the model metadata
resolver now extracts the `orderableFields` from a v1 model and uses
them to create a new `OrderByExpression` for internal use by the
resolved metadata.

V3_GIT_ORIGIN_REV_ID: a7dbafe860e586efdb2e03c23020a067011c57a1
2024-08-06 23:00:19 +00:00
Vamshi Surabhi
6c9dad1786 Remove references to 'SmolStr's in QueryNode (#934)
Specifically, DataConnectorColumnName and DataConnectorName which are
wrappers on `SmolStr` and hence cheap to clone.

We want to use `Plan` as a physical node in the sql layer but given
datafusion's architecture, a physical node cannot contain references.
This is a small PR towards this effort.

V3_GIT_ORIGIN_REV_ID: 284dcfb4e8e7ce83705b415611c22e8a6e25e4be
2024-08-06 15:30:59 +00:00
Gil Mizrahi
9b1111e0d9 Native queries validation: use existing pool instead of creating a new one
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10975
GitOrigin-RevId: f8f6a740e28c4b8d1491181dff075992285b60e8
2024-08-06 14:28:00 +00:00
Anon Ray
88eea4b285 add B3 and W3C tracing headers to CORS exposed headers (#883)
### What

Added all relevant W3C and Zipkin/B3 trace response headers, to exposed
headers for CORS.

The headers list (as pointed out by Samir) -

For Zipkin/B3:

- `X-B3-TraceId`
- `X-B3-SpanId`
- `X-B3-ParentSpanId`
- `X-B3-Sampled`

For W3C:

- `traceparent`
- `tracestate`

This is generally useful for any client accessing the API to retrieve
tracing information.

### How

Created a constant array of relevant header names. And initialize the
CORS middleware, with these as exposed headers.

V3_GIT_ORIGIN_REV_ID: c7aaf2507b03e1897971ca6cd2bbaa06b08dfa52
2024-08-06 10:01:29 +00:00
Rakesh Emmadi
d5909e8c48 Fix permission filter usage reporting in query analytics (#933)
<!-- 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? -->
Fields involved in the relationship's inner predicates were incorrectly
reported as fields of the root model. This PR resolves the issue. Also,
fixes the predicates inside `And` or `Or` are not reported.

Note: Changelog not required, as query usage analytics are Hasura
internal and hidden from users.
### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- Use `for` loop instead of `Iterator map` to avoid confusion around the
execution of lambda passed to the `map` function (more context in this
[slack](https://hasurahq.slack.com/archives/C04PUMV4X16/p1722871834852519)
thread)
- Introduce a new struct, to report predicate relationship fields, that
has a field to report its inner filter predicate usage.

V3_GIT_ORIGIN_REV_ID: 9ca23e6005ccb09f2321a2ae30ef575f99e84e06
2024-08-06 05:57:25 +00:00
Abhinav Gupta
180c1dbc59 Refactor SQL layer to use OpenDD query IR (#925)
As per the multiple frontends RFC:
https://github.com/hasura/v3-engine/blob/vamshi/multiple-frontends/rfcs/multiple-frontends.md

V3_GIT_ORIGIN_REV_ID: 07f7c5323179a62fd08717d6d49f9415da139873
2024-08-05 23:38:19 +00:00
Vamshi Surabhi
4aefdabb65 avoid using raw Strings in more places (#923)
- `DataConnectorAggregationFunctionName` and `AggregateFunctionName` now
use `str_newtype`.
- All usages of `String`s for subgraph names are removed.

(This is part of a larger effort to remove references in
`execute::plan::QueryPlan`).

V3_GIT_ORIGIN_REV_ID: d51f0a2335e8dabbc9efdad1d1efff285ddb74c3
2024-08-05 22:27:47 +00:00
Rakesh Emmadi
9bf0ad967f Query usage analytics | include deprecated info in field usage (#932)
<!-- 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? -->
When reporting query usage analytics, mention whether a field is
deprecated.

Note: The changelog is not required, as the usage analytics are for
Hasura internal use.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
OpenDd allows marking an ObjectType's field as deprecated with an
optional reason. Plumb the deprecation context to the input/output
schema annotation. Report the field usage with a deprecated boolean
field.

V3_GIT_ORIGIN_REV_ID: 430cdcf3e1ff0c43812caecb8d06a64b729665be
2024-08-05 13:13:01 +00:00
ashwiniag
16d8037937 ci: stable release v2.42.0 catalogue update
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10979
GitOrigin-RevId: d7dc3dd2600d410e087c3a954b7314c5c6927979
2024-08-05 10:30:33 +00:00
Anon Ray
4d31c4b42e add a flag to log traces to stdout (#931)
### What

Add a flag `--export-traces-stdout` to log traces to stdout. Default is
disabled.

Command-line flag - `--export-traces-stdout`
Env var - `EXPORT_TRACES_STDOUT`

### How
Introduce a new command line flag. Make `initialize_tracing` accept a
`bool`, and setup the stdout exporter based on that.

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

V3_GIT_ORIGIN_REV_ID: f39d6f863fd2bca65ad89f1cef4b077aa9eabc5b
2024-08-05 08:29:46 +00:00
dependabot[bot]
12ed058661 Bump regex from 1.10.5 to 1.10.6 (#930)
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.5 to 1.10.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex's
changelog</a>.</em></p>
<blockquote>
<h1>1.10.6 (2024-08-02)</h1>
<p>This is a new patch release with a fix for the <code>unstable</code>
crate feature that
enables <code>std::str::Pattern</code> trait integration.</p>
<p>Bug fixes:</p>
<ul>
<li>[BUG <a
href="https://redirect.github.com/rust-lang/regex/issues/1219">#1219</a>](<a
href="https://redirect.github.com/rust-lang/regex/pull/1219">rust-lang/regex#1219</a>):
Fix the <code>Pattern</code> trait implementation as a result of nightly
API breakage.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ab88aa5c68"><code>ab88aa5</code></a>
1.10.6</li>
<li><a
href="76f2d30d85"><code>76f2d30</code></a>
changelog: 1.10.6</li>
<li><a
href="2970d2940d"><code>2970d29</code></a>
unstable: fit <code>Pattern</code> trait implementation</li>
<li><a
href="8856fe36ac"><code>8856fe3</code></a>
regex-cli-0.2.1</li>
<li><a
href="c4c76a19b8"><code>c4c76a1</code></a>
regex-test-0.1.1</li>
<li><a
href="c2f9ca49a6"><code>c2f9ca4</code></a>
regex-test: bump toml dependency</li>
<li><a
href="1288b83af3"><code>1288b83</code></a>
regex-lite-0.1.6</li>
<li>See full diff in <a
href="https://github.com/rust-lang/regex/compare/1.10.5...1.10.6">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=regex&package-manager=cargo&previous-version=1.10.5&new-version=1.10.6)](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>
V3_GIT_ORIGIN_REV_ID: 527f0e7680e48f2c97e6e36acc28fab7fcc82e2a
2024-08-05 05:59:51 +00:00
dependabot[bot]
e1f0974a07 Bump mockito from 1.4.0 to 1.5.0 (#929)
Bumps [mockito](https://github.com/lipanski/mockito) from 1.4.0 to
1.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lipanski/mockito/releases">mockito's
releases</a>.</em></p>
<blockquote>
<h2>1.5.0</h2>
<ul>
<li><strong>[Breaking]</strong> <a
href="https://redirect.github.com/lipanski/mockito/pull/198">Upgrade</a>
to hyper v1</li>
</ul>
<p>Thanks to <a
href="https://github.com/tottoto"><code>@​tottoto</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f1c3fe1b7f"><code>f1c3fe1</code></a>
Bump to 1.5.0</li>
<li><a
href="08f2fa322d"><code>08f2fa3</code></a>
Merge pull request <a
href="https://redirect.github.com/lipanski/mockito/issues/199">#199</a>
from tottoto/refactor-response-body</li>
<li><a
href="42e3efe734"><code>42e3efe</code></a>
Refactor response body</li>
<li><a
href="f477e54857"><code>f477e54</code></a>
Merge pull request <a
href="https://redirect.github.com/lipanski/mockito/issues/198">#198</a>
from tottoto/update-to-hyper-1</li>
<li><a
href="e8694ae991"><code>e8694ae</code></a>
Update to hyper 1</li>
<li><a
href="b152b76130"><code>b152b76</code></a>
Depend on some crate directly</li>
<li>See full diff in <a
href="https://github.com/lipanski/mockito/compare/1.4.0...1.5.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mockito&package-manager=cargo&previous-version=1.4.0&new-version=1.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: db7b12bcbffe55aa820bedd72ba517d9f2152bf2
2024-08-05 05:59:00 +00:00
dependabot[bot]
a7c994af3f Bump clap from 4.5.11 to 4.5.13 (#928)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.11 to 4.5.13.
<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.13</h2>
<h2>[4.5.13] - 2024-07-31</h2>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Improve error message when
<code>#[flatten]</code>ing an optional <code>#[group(skip)]</code></li>
<li><em>(help)</em> Properly wrap long subcommand descriptions in
help</li>
</ul>
<h2>v4.5.12</h2>
<h2>[4.5.12] - 2024-07-31</h2>
</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.13] - 2024-07-31</h2>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Improve error message when
<code>#[flatten]</code>ing an optional <code>#[group(skip)]</code></li>
<li><em>(help)</em> Properly wrap long subcommand descriptions in
help</li>
</ul>
<h2>[4.5.12] - 2024-07-31</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="66b5a122ec"><code>66b5a12</code></a>
chore: Release</li>
<li><a
href="a83b724fc1"><code>a83b724</code></a>
docs: Update changelog</li>
<li><a
href="e19469f0e2"><code>e19469f</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5615">#5615</a>
from epage/wrap</li>
<li><a
href="360bb3bc11"><code>360bb3b</code></a>
fix(help): Properly wrap subcommand about</li>
<li><a
href="58b5bd89ea"><code>58b5bd8</code></a>
test(help): Show bad subcommand wrapping</li>
<li><a
href="e1f6320730"><code>e1f6320</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5614">#5614</a>
from epage/snap</li>
<li><a
href="7b5b61b021"><code>7b5b61b</code></a>
test(help): Switch to snapbox</li>
<li><a
href="1490e2434a"><code>1490e24</code></a>
chore: Update snapbox</li>
<li><a
href="6671d93500"><code>6671d93</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5613">#5613</a>
from epage/flatten</li>
<li><a
href="13dfdb3870"><code>13dfdb3</code></a>
fix(derive): Improve flattening-skipped-group assert</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.11...v4.5.13">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.11&new-version=4.5.13)](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>
V3_GIT_ORIGIN_REV_ID: 898ddf94dc4357f35e50b1599dedef672c18cd8a
2024-08-05 05:56:02 +00:00
dependabot[bot]
a13cd55056 Bump bytes from 1.6.1 to 1.7.1 (#927)
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.6.1 to 1.7.1.
<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.1</h2>
<h1>1.7.1 (August 1, 2024)</h1>
<p>This release reverts the following change due to a regression:</p>
<ul>
<li>Reuse capacity when possible in <code>&lt;BytesMut as
Buf&gt;::advance</code> impl (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/698">#698</a>)</li>
</ul>
<p>The revert can be found at <a
href="https://redirect.github.com/tokio-rs/bytes/issues/726">#726</a>.</p>
<h2>Bytes 1.7.0</h2>
<h1>1.7.0 (July 31, 2024)</h1>
<h3>Added</h3>
<ul>
<li>Add conversion from <code>Bytes</code> to <code>BytesMut</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/695">#695</a>,
<a
href="https://redirect.github.com/tokio-rs/bytes/issues/710">#710</a>)</li>
<li>Add reclaim method without additional allocation (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/686">#686</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>Clarify how <code>BytesMut::zeroed</code> works (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/714">#714</a>)</li>
<li>Clarify the behavior of <code>Buf::chunk</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/717">#717</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Change length condition of <code>BytesMut::truncate</code></li>
<li>Reuse capacity when possible in <code>&lt;BytesMut as
Buf&gt;::advance</code> impl (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/698">#698</a>)</li>
<li>Improve <code>must_use</code> suggestion of
<code>BytesMut::split</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/699">#699</a>)</li>
</ul>
<h3>Internal changes</h3>
<ul>
<li>Use <code>ManuallyDrop</code> instead of <code>mem::forget</code>
(<a
href="https://redirect.github.com/tokio-rs/bytes/issues/678">#678</a>)</li>
<li>Don't set <code>len</code> in <code>BytesMut::reserve</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/682">#682</a>)</li>
<li>Optimize <code>Bytes::copy_to_bytes</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/688">#688</a>)</li>
<li>Refactor <code>BytesMut::truncate</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/694">#694</a>)</li>
<li>Refactor <code>BytesMut::resize</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/696">#696</a>)</li>
<li>Reorder assertion in <code>Bytes::split_to</code>,
<code>Bytes::split_off</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/689">#689</a>,
<a
href="https://redirect.github.com/tokio-rs/bytes/issues/693">#693</a>)</li>
<li>Use <code>offset_from</code> in more places (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/705">#705</a>)</li>
<li>Correct the wrong usage of <code>IntoIter</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/707">#707</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.1 (August 1, 2024)</h1>
<p>This release reverts the following change due to a regression:</p>
<ul>
<li>Reuse capacity when possible in <code>&lt;BytesMut as
Buf&gt;::advance</code> impl (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/698">#698</a>)</li>
</ul>
<p>The revert can be found at <a
href="https://redirect.github.com/tokio-rs/bytes/issues/726">#726</a>.</p>
<h1>1.7.0 (July 31, 2024)</h1>
<h3>Added</h3>
<ul>
<li>Add conversion from <code>Bytes</code> to <code>BytesMut</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/695">#695</a>,
<a
href="https://redirect.github.com/tokio-rs/bytes/issues/710">#710</a>)</li>
<li>Add reclaim method without additional allocation (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/686">#686</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>Clarify how <code>BytesMut::zeroed</code> works (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/714">#714</a>)</li>
<li>Clarify the behavior of <code>Buf::chunk</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/717">#717</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Change length condition of <code>BytesMut::truncate</code></li>
<li>Reuse capacity when possible in <code>&lt;BytesMut as
Buf&gt;::advance</code> impl (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/698">#698</a>)</li>
<li>Improve <code>must_use</code> suggestion of
<code>BytesMut::split</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/699">#699</a>)</li>
</ul>
<h3>Internal changes</h3>
<ul>
<li>Use <code>ManuallyDrop</code> instead of <code>mem::forget</code>
(<a
href="https://redirect.github.com/tokio-rs/bytes/issues/678">#678</a>)</li>
<li>Don't set <code>len</code> in <code>BytesMut::reserve</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/682">#682</a>)</li>
<li>Optimize <code>Bytes::copy_to_bytes</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/688">#688</a>)</li>
<li>Refactor <code>BytesMut::truncate</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/694">#694</a>)</li>
<li>Refactor <code>BytesMut::resize</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/696">#696</a>)</li>
<li>Reorder assertion in <code>Bytes::split_to</code>,
<code>Bytes::split_off</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/689">#689</a>,
<a
href="https://redirect.github.com/tokio-rs/bytes/issues/693">#693</a>)</li>
<li>Use <code>offset_from</code> in more places (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/705">#705</a>)</li>
<li>Correct the wrong usage of <code>IntoIter</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/707">#707</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="dc4fb3e8f4"><code>dc4fb3e</code></a>
chore: prepare bytes v1.7.1 (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/727">#727</a>)</li>
<li><a
href="f488be48d0"><code>f488be4</code></a>
Revert &quot;Reuse capacity when possible in &lt;BytesMut as
Buf&gt;::advance impl&quot; (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/726">#726</a>)</li>
<li><a
href="03fdde9dcf"><code>03fdde9</code></a>
chore: prepare v1.7.0 (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/724">#724</a>)</li>
<li><a
href="f8c7b574c0"><code>f8c7b57</code></a>
Merge 'v1.6.1' into 'master' (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/721">#721</a>)</li>
<li><a
href="9965a04b56"><code>9965a04</code></a>
Remove unnecessary file (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/719">#719</a>)</li>
<li><a
href="3443ca5a0b"><code>3443ca5</code></a>
docs: clarify the behavior of <code>Buf::chunk</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/717">#717</a>)</li>
<li><a
href="8cc940779f"><code>8cc9407</code></a>
Allow reclaiming the current allocation (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/686">#686</a>)</li>
<li><a
href="7a5154ba8b"><code>7a5154b</code></a>
Clarify how <code>BytesMut::zeroed</code> works and advantages to manual
impl (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/714">#714</a>)</li>
<li><a
href="fa1daac3ae"><code>fa1daac</code></a>
Change Bytes::make_mut to impl From&lt;Bytes&gt; for BytesMut (closes <a
href="https://redirect.github.com/tokio-rs/bytes/issues/709">#709</a>)
(<a
href="https://redirect.github.com/tokio-rs/bytes/issues/710">#710</a>)</li>
<li><a
href="caf520ac7f"><code>caf520a</code></a>
Fix iter tests to use the actual bytes IntoIter instead of std (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/707">#707</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/bytes/compare/v1.6.1...v1.7.1">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.6.1&new-version=1.7.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>
V3_GIT_ORIGIN_REV_ID: f62b65cc14db0002cdd17da8b5c992c2d1b43ac2
2024-08-05 05:55:54 +00:00
dependabot[bot]
3449b49487 Bump serde_with from 3.8.3 to 3.9.0 (#926)
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.8.3 to
3.9.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.9.0</h2>
<h3>Added</h3>
<ul>
<li>
<p>Deserialize a map` and skip all elements failing to deserialize by <a
href="https://github.com/johnmave126"><code>@​johnmave126</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/763">#763</a>)</p>
<p><code>MapSkipError</code> acts like a map
(<code>HashMap</code>/<code>BTreeMap</code>), but keys or values that
fail to deserialize, like are ignored.</p>
<p>For formats with heterogeneously typed maps, we can collect only the
elements where both key and value are deserializable.
This is also useful in conjunction to <code>#[serde(flatten)]</code> to
ignore some entries when capturing additional fields.</p>
<pre lang="text"><code>// JSON
&quot;value&quot;: {&quot;0&quot;: &quot;v0&quot;, &quot;5&quot;:
&quot;v5&quot;, &quot;str&quot;: &quot;str&quot;, &quot;10&quot;: 2},
<p>// Rust
#[serde_as(as = &quot;MapSkipError&lt;DisplayFromStr, _&gt;&quot;)]
value: BTreeMap&lt;u32, String&gt;,</p>
<p>// Only deserializes entries with a numerical key and a string value,
i.e.,
{0 =&gt; &quot;v0&quot;, 5 =&gt; &quot;v5&quot;}
</code></pre></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c3e489f4e5"><code>c3e489f</code></a>
Bump version to 3.9.0 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/770">#770</a>)</li>
<li><a
href="57ad8778c4"><code>57ad877</code></a>
Bump version to 3.9.0</li>
<li><a
href="d038657903"><code>d038657</code></a>
Implement <code>MapSkipError</code>, analogous to
<code>VecSkipError</code>, but for map-like data ...</li>
<li><a
href="aaa0a29589"><code>aaa0a29</code></a>
Update serde_with/src/guide/serde_as_transformations.md</li>
<li><a
href="17dec1112b"><code>17dec11</code></a>
Add tests to make sure syntax errors are not suppressed.</li>
<li><a
href="97543d0c2d"><code>97543d0</code></a>
Implement MapSkipError, skipping un-deserializable entries.</li>
<li><a
href="bf6724d2c0"><code>bf6724d</code></a>
Move VecSkipError to a separate file, preparing for MapSkipError</li>
<li><a
href="31e9172cab"><code>31e9172</code></a>
Fix dead code warning by correcting a typo (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/769">#769</a>)</li>
<li><a
href="f5b2626307"><code>f5b2626</code></a>
Fix dead code warnings in tests</li>
<li><a
href="4ad4a1b4e9"><code>4ad4a1b</code></a>
Fix dead code warning by correcting a typo</li>
<li>See full diff in <a
href="https://github.com/jonasbb/serde_with/compare/v3.8.3...v3.9.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.8.3&new-version=3.9.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>
V3_GIT_ORIGIN_REV_ID: ec2c5b357a416492e2b8033138aa83075023089d
2024-08-05 05:52:54 +00:00
Karthik Venkateswaran
2c70bc0538 engine: add operation_name attribute to execute_query (#913)
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

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

We would like to generate operation_name level metrics with execution
latency. Right now, the operation_name is part of validate span which
isn't really doing anything while `execute_query` is the parent span
which will represent the operation time.

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

### How

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

This PR adds `operation_name` to `execute_query` span

V3_GIT_ORIGIN_REV_ID: fc14d92c66b0245739d672b7570be1871243f241
2024-08-02 17:52:47 +00:00
Rakesh Emmadi
03c85f6985 Fix NDC relationship collection for filter predicates in nested relationship selection. (#924)
<!-- 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? -->
Fixes a bug where queries with nested relationship selection and filter
predicates fail due to an issue with NDC relationship collection.
```graphql
query MyQuery {
  Album {
    AlbumId
    Title
    ArtistId
    Tracks {
      AlbumId
      Name
      TrackId
    }
  }
}
```
A selection permission defined on the `Tracks` model with a relationship
comparison in the predicate.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->
- Previously, the collection of relationships occurred independently by
traversing through the IR AST. Consequently, during planning, the
collection of local relationships was explicitly ignored. This caused
confusion and resulted in the omission of relationship collectors when
planning nested selections for local relationships, leading to the
issue.
- In this PR, the independent collection of relationships is removed.
Instead, all NDC relationships for field selection, filter, and
permission predicates are now collected during planning. This unifies
the logic, and ensures consistency in achieving the same purpose.

V3_GIT_ORIGIN_REV_ID: cbd5bfef7a90a7d7602061a9c733ac54b764e0d3
2024-08-02 16:18:29 +00:00
Daniel Harvey
e7462f7884 Tidy boolean expression schema generation (#920)
<!-- The PR description should answer 2 important questions: -->

### What

Trying to understand what is going on here. Still no closer, but have
added a test and made some types more specific in order to clarify my
understanding.

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

Add some introspection tests for relationships with
`ObjectBooleanExpressionType`s to ensure they generate. Tried to make
relationship fields disappear to recreate build problems but could not.

Split `BooleanExpressionGraphqlConfig` and
`ObjectBooleanExpressionGraphqlConfig` to make sure we're not mixing
them up. We only want to use `BooleanExpressionGraphqlConfig` in
`metadata_resolve`, this ensures that.

Pushed some partiality in `schema/boolean_expressions.rs` out - a
function was `Option<inputs> -> Option<outputs>` and now it's `inputs ->
outputs`. We use `Option` a lot and it makes reasoning why something
hasn't been added to the schema difficult.

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

V3_GIT_ORIGIN_REV_ID: 893e6f32bfded14ea724be7eaedc519e264f4c01
2024-08-02 13:04:10 +00:00
dependabot[bot]
432c042399 Bump serde_json from 1.0.120 to 1.0.122 (#922)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.120 to
1.0.122.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.121</h2>
<ul>
<li>Optimize position search in error path (<a
href="https://redirect.github.com/serde-rs/json/issues/1160">#1160</a>,
thanks <a
href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="54381d6fee"><code>54381d6</code></a>
Release 1.0.122</li>
<li><a
href="16fb6e0b85"><code>16fb6e0</code></a>
Work around buggy rust-analyzer behavior</li>
<li><a
href="49d7d6626f"><code>49d7d66</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1166">#1166</a>
from dtolnay/allocvec</li>
<li><a
href="6827c7b3c5"><code>6827c7b</code></a>
Fix json! invocations when std prelude is not in scope</li>
<li><a
href="611b2a4fb6"><code>611b2a4</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1165">#1165</a>
from serde-rs/jsonmac</li>
<li><a
href="7633cb7f05"><code>7633cb7</code></a>
Eliminate local_inner_macros in favor of non-ident macro paths</li>
<li><a
href="eca2658a22"><code>eca2658</code></a>
Release 1.0.121</li>
<li><a
href="b0d678cfb4"><code>b0d678c</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1160">#1160</a>
from iex-rs/efficient-position</li>
<li><a
href="b1edc7d13f"><code>b1edc7d</code></a>
Optimize position search in error path</li>
<li><a
href="40dd7f5e86"><code>40dd7f5</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1159">#1159</a>
from iex-rs/fix-recursion</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/json/compare/v1.0.120...v1.0.122">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.120&new-version=1.0.122)](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>
V3_GIT_ORIGIN_REV_ID: 92ae4524a7ffab84c6b55097453b2f1484a0c747
2024-08-02 09:48:49 +00:00
Daniel Chambers
63732fe7be Bug fixes around argument presets in the DataConnectorLink (#866)
This PR fixes the following bugs:
- Fixes a bug where models and commands were allowed even though they
did not define arguments to satisfy the underlying data connector
collection/function/procedure. **UPDATE:** This only raises a warning
rather than fails the build, because existing builds on staging and
production have this issue. This will need to be transitioned to an
error once the Compatibility Date plumbing is in place.
- Fixes a bug where argument presets set in the DataConnectorLink were
sent to every connector function/procedure regardless of whether the
function/procedure actually declared that argument
- Fixes a bug where argument presets set in the DataConnectorLink were
not sent to connector collections that backed Models
- Fixes a bug where the type of the argument name in the
DataConnectorLink's argument presets was incorrect in the Open DD
schema. It was `ArgumentName` but should have been
`DataConnectorArgumentName`
- Fixes a bug where the check to ensure that argument presets in the
DataConnectorLink does not overlap with arguments defined on
Models/Commands was comparing against the Model/Command argument name
not the data connector argument name

There are a number of changes that tighten things up in this PR.
Firstly, the custom connector is improved so that it rejects requests
with arguments of the wrong type or unexpected arguments. This causes
tests that should have been failing to actually fail. Then, new tests
have been added to metadata_resolve to cover the untested edge cases
around data connector link argument presets.

Then, metadata resolve is refactored so that the link argument presets
are validated and stored on each command/model source, rather than on
the DataConnectorLink. Extra validation has been added during this
process to fix the above bugs. Any irrelevant argument presets to the
particular command/model are dropped. Then, during execution, we read
the presets from the command/model source instead of from the
DataConnectorLink, which ensures we only send the appropriate arguments.

JIRA: [V3ENGINE-290](https://hasurahq.atlassian.net/browse/V3ENGINE-290)
Fixes
https://linear.app/hasura/issue/APIPG-676/dataconnectorlink-argument-presets-are-always-sent-regardless-of

[V3ENGINE-290]:
https://hasurahq.atlassian.net/browse/V3ENGINE-290?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

V3_GIT_ORIGIN_REV_ID: dd02e52e1ff224760c5f0ed6a73a1ae56779e1f1
2024-08-02 09:25:45 +00:00
Daniel Chambers
0d37cbd71f Re-enable ndc version validation backwards compatibly (#916)
The validation added in #880 validated that the version in the
DataConnectorLink's capabilities version matched the version specified
in the schema. Unfortunately, there are existing builds with invalid
capabilities versions that failed to parse. Subsequently the validation
was removed in #907 to fix staging the deploy that broke.

This is the unique set of errors found when deploying to staging:

```
error generating artifacts: schema build error: invalid metadata: The data connector myts (in subgraph app) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector my_ts (in subgraph app) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector mydbpg (in subgraph app) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector chinook (in subgraph app) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector clickhouse (in subgraph analytics) has an error: The version specified in the capabilities ("^0.1.1") is an invalid version: unexpected character '^' while parsing major version number
error generating artifacts: schema build error: invalid metadata: The data connector chinook_link (in subgraph app) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector app_connector (in subgraph app) has an error: The version specified in the capabilities ("^0.1.1") is an invalid version: unexpected character '^' while parsing major version number
error generating artifacts: schema build error: invalid metadata: The data connector chinook (in subgraph app) has an error: The version specified in the capabilities ("^0.1.1") is an invalid version: unexpected character '^' while parsing major version number
error generating artifacts: schema build error: invalid metadata: The data connector nodejs (in subgraph app) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector db (in subgraph app) has an error: The version specified in the capabilities ("*") is an invalid version: unexpected character '*' while parsing major version number
error generating artifacts: schema build error: invalid metadata: The data connector my_pg (in subgraph my_subgraph) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector mypg (in subgraph myapp) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector mypglink (in subgraph mysubgraph) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector mypg (in subgraph app2) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
error generating artifacts: schema build error: invalid metadata: The data connector test_connector (in subgraph app) has an error: The version specified in the capabilities ("") is an invalid version: empty string, expected a semver version
```

The invalid versions are: `""`, `"*"`, "^0.1.1"`.

This PR restores the version validation code, but for NDC v0.1.x
capabilities (the only supported version right now, v0.2.x is feature
flagged off), we now accept versions that fail to parse as a valid
semver, and instead we raise an issue that gets logged as a warning.

NDC v0.2.x capabilities retains the stricter behaviour and does not
accept dodgy a capabilities version. This is backwards compatible
because trying to use NDC v0.2.x right now produces a build error.

Fixes APIPG-736

V3_GIT_ORIGIN_REV_ID: 9e9bf99123bad31e8229e8ea29343eb8aaf9786d
2024-08-02 03:17:45 +00:00
Vamshi Surabhi
d41170b06a simplify the sql context that powers datafusion (#921)
Prior to this, on every request, a datafusion catalog provider was
created from the stored sql context. This PR reworks it so that this is
cheap and also more maintainable will fewer intermediate steps. There is
also some work done towards supporting table valued functions.

---------

Co-authored-by: Abhinav Gupta <127770473+abhinav-hasura@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 8c30485366969d81d2a35760962e0383ed5e488c
2024-08-01 21:28:32 +00:00
Daniel Harvey
9af7a2b4b7 [docs]: simplify native query docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10978
GitOrigin-RevId: eff61e095d5c5401501be9174a44b1c5f99c1871
2024-08-01 18:09:06 +00:00
Tom Harding
55d7171643 Document the changes to ActionDefinition
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10977
GitOrigin-RevId: ae2b0866c1c077056c12d01d4e2724136830c15f
2024-08-01 12:50:48 +00:00
Tom Harding
d6ee312699 Add docs entries for #10921
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10976
GitOrigin-RevId: 07a6a933f1d1d8016c0e9ef6afeace6b6ee702ec
2024-08-01 12:24:25 +00:00
Daniel Harvey
06ac3ba7bf Fallback to ObjectBooleanExpressionType on Model correctly (#919)
<!-- The PR description should answer 2 important questions: -->

### What

When no `booleanExpressionType` is specified in a
`BooleanExpressionType` `comparableRelationship`, we fallback to
whatever is defined for the model. However, we were ignoring old style
`ObjectBooleanExpressionType`, meaning relationship fields were
disappearing.

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

Also match on `ModelExpressionType::ObjectBooleanExpressionType` when
looking up leaf boolean expressions for relationships.

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

V3_GIT_ORIGIN_REV_ID: 9a67b734679b8a1fe3d176a259ba579e127948b8
2024-08-01 12:15:10 +00:00
Daniel Harvey
c89809b02e Use warning/issue for nested array in bool exp to avoid breakage (#917)
<!-- The PR description should answer 2 important questions: -->

### What

Change an error down to an issue / warning to unbreak builds.

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

Introduce `BooleanExpressionIssue`, move error value to it, emit this
instead. Later we'll turn this into an error based on compatibility
date.

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

V3_GIT_ORIGIN_REV_ID: f0903cc04ea1cf328c9bf67a38d76fd670743679
2024-08-01 11:02:24 +00:00