Commit Graph

608 Commits

Author SHA1 Message Date
Philip Lykke Carlsen
1f96e8aff3 Promote warnings to errors based on flags (#1011)
### What

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

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

### How

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

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

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

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

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

### What

Make the plugin execution trace user-facing.

### How

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

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

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

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

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

### What

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

### How

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

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

---------

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

Upgrade to the latest version of Rust.

### How

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

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

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

### How

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

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

### What

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

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

### What

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

### How

Move `CompatibilityConfig` and `CompatibilityDate`.

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

### What

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

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

### How

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

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

### What

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

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

### How

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

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

### What

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

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

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

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

### What

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

### How

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

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

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

### How

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

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

### What

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

### How

Use new `opendd` `json_schema` options.

---------

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

### What

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

Functional no-op.

### How

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

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

### What

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

### How

Another group of SQL test files

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

### What

Supports calling functions from the SQL interface

### How

Similar to models.

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

### What

Adds tests for select, filter and order by.

### How

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

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

### What

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

### How

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

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

### What

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

### How

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

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

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

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

TODO:

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

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

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

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

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

### How

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

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

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

### How

```
$ cargo update
```

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

### What

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

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

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

### How

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

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

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

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

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

### What

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

### How

Update types and generate metadata expression for adjacent tagged enums.

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

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

### What

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

### How

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

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

### What

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

### How

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

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

### What

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

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

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

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

---------

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

### What

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

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

### How

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

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

### What

Breaking down the big `Error` type more. This creates `ModelsError`.
Functional no-op.

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

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

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

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

### How

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

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

V3_GIT_ORIGIN_REV_ID: 79b14085ca1111489621b8b7d3490492a4c30ead
2024-08-13 09:22:38 +00:00
Vamshi Surabhi
6051c2f359 update datafusion to 41.0.0 (#959)
<!-- The PR description should answer 2 important questions: -->

### What

Updates datafusion dependency to `41`.

### How

Fixes for breaking changes.

V3_GIT_ORIGIN_REV_ID: cc957f6c7ff9b3c004cc5e0cbb48387c1f963b7a
2024-08-12 23:31:27 +00:00
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
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
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