Most of our span names were in the format `snake_case` and usually
reflected `name_of_the_function`. This is unfriendly, so we've changed
it to match the format used by data connectors, which use a format like
"Database request" or "Waiting for connection".
It would be nice if `Execute request plan for query field` could be
`Execute request plan for query field "person"` but it seems changing
the currently used `&'static str` for `String` causes all sorts of other
lifetime issues, so I suppose we're better including more information as
span attributes instead. Therefore, all our span names need to be pretty
much static (or at least, dynamically chosen from a list of static
names).
Note: I have not changed the `SpanVisibility::Internal` span names for
now. Most of these reflect function names and this is pretty useful IMO.
Happy to change this later if other feel strongly though.
V3_GIT_ORIGIN_REV_ID: f2226b2466e8592676f3f4635d483289f0e3f6aa
<!-- Thank you for submitting this PR! :) -->
## Description
I have upgraded ndc-spec to v0.1.1. This pulls in an upgrade to
opentelemetry v0.22 so I've done that too.
We had issues with the `traceresponse` response header disappearing when
using an opentelemetry version > v0.20. This seems to be resolved here,
probably because we have pinned a single version of opentelemetry rather
than loading multiple at once. I added the `traceresponse` header to
verify this, and have left it in because it doesn't seem to hurt
anything.
I verified that everything works as expected with the OSS components,
but not multitenant.
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [x] community-edition
- [x] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [x] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
v3 engine GraphQL queries now include a "traceresponse" header.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: f37b6bdb1331b55c49f0bd953f522f5eca298d1d
`IndexMap::remove` has been deprecated in favor of
`IndexMap::swap_remove` (which has the same behavior, but is clearer
about breaking ordering) or `IndexMap::shift_remove`, which retains
order but is O(n) complexity.
I have taken a look at the areas where we use `.remove`. Where we
discard the map afterwards, I've changed it to `.swap_remove`. In one
case, we do return the data in the event of error, but we probably care
more about consistency of ordering than the actual precise order, so
I've used a `HashMap` and just sorted it instead.
V3_GIT_ORIGIN_REV_ID: 479e1013a4a9938f973b5ed85dbf3837896151e4
## Description
In order to implement transactions for the connectors that allow it, we
want to group mutation commands by connector. Then, we can execute a
group in a single transaction if possible, else just loop through it as
we always have. Grouping by connector also means we can access things
like capabilities for whole batches at a time.
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [ ] community-edition
- [ ] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
_Replace with changelog entry_
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 928715b78b214a3ac2452e8d1e5f33c87b20de33
<!-- Thank you for submitting this PR! :) -->
## Description
For some reason, `cargo test` fails because of missing types in doc
comment code, but `cargo nextest run` in CI does not. Re-adding `axum`
as a dep dependency to `tracing-util` fixes this.
---------
Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: 518e6faf702895d9c434056a57c40c2db6f4b0a8
<!-- Thank you for submitting this PR! :) -->
## Description
My memory is bad and I want to make it easy to run the `engine` to try
it out. This adds the `just run-local` command which uses the schema
from the tests (and so is very likely to continue working).
<img width="1445" alt="Screenshot 2024-03-28 at 09 44 46"
src="https://github.com/hasura/v3-engine/assets/4729125/5dc9a8d6-612e-418e-be24-ef0fefd0da99">
V3_GIT_ORIGIN_REV_ID: b5cd009b19805f5e9ed6180f68878207ece50d98
`cargo machete` is a very useful tool that figures out when you aren't
using a dependency. I have run this locally to remove unused
dependencies.
I've also added a CI job to make sure we catch these in the future.
Sometimes it reports false positives, e.g. when a dependency isn't used
directly but in macro-generated code (e.g. with `strum`). I have added
`"ignored"` clauses to the `Cargo.toml` files where appropriate.
V3_GIT_ORIGIN_REV_ID: ed015089b695cec8eeb03ce455d6dd3cd312a016
- Use `rust-toolchain.toml` to specify tools.
- Drop the unused version field from the compose files.
- Use a modern Docker base for the dev-auth-webhook.
- Handle signals in the test servers so `docker stop` is quick.
- Upgrade Jaeger.
V3_GIT_ORIGIN_REV_ID: b5fee1d5dc953a1fdb0aabd75ba02df6846b7518
When there are no allowed fields for a type (via `TypePermissions`),
engine creates related input object types (like `<TypeName>OrderBy`)
with no fields. This results in an invalid introspection result. Client
libraries fail with validation error.
This PR fixes the issue.
V3_GIT_ORIGIN_REV_ID: a45a56b1f503f6ab99f250884957b6fc723cf9c8
This was a simple solution to prevent crashes from the cases that I was
able to discover, refactored into a macro that can be used elsewhere;
but I suspect there's a more idiomatic rust solution
(entailing a big refactor?). There's also the stacker crate, and see
also discussion here:
https://hasurahq.slack.com/archives/C04PUMV4X16/p1707337409839869?thread_ts=1701302324.058369&cid=C04PUMV4X16
Note that the compiled binary was built and fuzzed with `--release`.
Many discovered cases caused crashes when run into non-optimized binary
(probably stack overflows but I did not look into it)
V3_GIT_ORIGIN_REV_ID: 31acfc9e358c807be80ba6a5efa78ace78306291
Give types / titles to all maps in the metadata jsonschema
This helps in automatically generating the metadata docs page. Without a
title/type it's hard to refer to what is the type of the fields which
have a map type.
V3_GIT_ORIGIN_REV_ID: 8d13012b95910be13fdee6a7af1372f7b6cf2b89
An upcoming version of ndc-spec will split out this module as a new
crate named `ndc_models`. This PR gets ahead of this change by aliasing
so that we can simply delete the `use` lines in the future.
This is a very boring, mechanical change that does not modify any
behavior at all.
V3_GIT_ORIGIN_REV_ID: 078d3f5fbc2961fcd93b924134de40ba693f0061
Fixes descriptions defined on `ObjectType`s and their fields in metadata
not showing up when that type is expressed as an input object type in
GraphQL.
V3_GIT_ORIGIN_REV_ID: de5cb2d545441fdebdf85fa84c90e9f0a4cbaac7
If we're going to be unstable, let's go all the way.
This change was motivated by needing to upgrade cargo-machete to make it
work with Rust v1.77, and not having the upgrade in nixos-unstable.
V3_GIT_ORIGIN_REV_ID: 8191a376a6aeebc08787f973d58d373f8ab9ad0d
<!-- Thank you for submitting this PR! :) -->
## Description
`check_conflicting_graphql_types` actually inserts a new GraphQL type
into a set (and explodes on failure).
Renamed to `store_new_graphql_type` which I feel is a bit clearer.
V3_GIT_ORIGIN_REV_ID: 4b774b9cd9e479c16f3de8af4df263f97cfab107
## Description
We don't need the per-node mutation plan because, where at all possible,
we won't run per-node mutations. This change doesn't change the
behaviour of anything, but changes the structure of mutation plans to be
whole-request, rather than per-node.
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [ ] community-edition
- [ ] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
_Replace with changelog entry_
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 9accc9696fabd05f992c6245ccc411a781cf5790
<!-- Thank you for submitting this PR! :) -->
## Description
Missed this in https://github.com/hasura/v3-engine/pull/355, apologies.
V3_GIT_ORIGIN_REV_ID: 360b4a3a218f6ba754814c5b3083a8151a7886fb
For remote joins, if join field already exists in the selection set, do
not request it again. Include the join field only if it is not in the
selection set.
A field selection might be expensive, so we do not want to duplicate it.
Fixes: https://hasurahq.atlassian.net/browse/V3API-296
V3_GIT_ORIGIN_REV_ID: d09e4298557ca098433b0758c15703295ccbfd39
<!-- Thank you for submitting this PR! :) -->
## Description
As noted in https://github.com/hasura/v3-engine/pull/398, the metadata
resolver works by passing a lot of mutable references around, making the
flow of data quite difficult to follow. This changes the passing of
`types` to make it more explicit. Where possible, any mutation is pushed
up to the top-level, or we return owned values.
V3_GIT_ORIGIN_REV_ID: 61251929cbc9b9410fabba85b58738037dfcb586
## Description
Fixes various spelling errors in the JSON schema descriptions.
No behavioural changes.
V3_GIT_ORIGIN_REV_ID: 56454b3193baa8257caa6116a35fbdda4be1d5eb
<!-- Thank you for submitting this PR! :) -->
## Description
Was trying to work out where mutation was happening in this massive
function, so broke it up into lots of smaller functions so it's easier
to tell from the inputs what is going on. There is definitely lots of
room for improvement here, have avoided making any functional changes in
lieu of just mechanically moving the code.
Behavioural no-op.
V3_GIT_ORIGIN_REV_ID: 19fa239319d348d486eb18e15d62614d6af2bd9b
<!-- Thank you for submitting this PR! :) -->
## Description
The `Error` enum in `resolved/error.rs` is absolutely giant. Going to
break it down into smaller structures, this is the first of those. There
are probably some missing items in here, but I am starting with rough
cuts and expect the right place for everything to appear over time.
No behavioural change.
V3_GIT_ORIGIN_REV_ID: 69d4ae880ad9cbffdc66adde10996e9f92cee8f4
<!-- Thank you for submitting this PR! :) -->
## Description
We don't want `v3-engine-multitenant` to import any opentelemetry
libraries directly, so we add more functions and re-exports here
instead.
V3_GIT_ORIGIN_REV_ID: 2e38b9b1ba6fda23d1bfe8e20549c3a95bd5a2fa
<!-- Thank you for submitting this PR! :) -->
## Description
This PR adds the capability to expose _entities and _service fields.
Apollo Federation uses these fields to extend types in other subgraphs
using the types from a subgraph. We can now use Hasura v3 as a subgraph
in an Apollo federated supergraph.
To make this possible, we had to do the following metadata changes:
- Add `apolloFederation` in `ObjectType.graphql`:
```yaml
apolloFederation:
keys:
- fields:
- id
```
- Add `apolloFederation` in `Model.graphql`:
```yaml
apolloFederation:
entitySource: true
```
- Add `apolloFederation` in `GraphqlConfig`:
```yaml
apolloFederation:
enableRootFields: true
```
https://github.com/hasura/v3-engine/assets/85472423/b3223c61-360a-4ed6-b8ab-b394469957ce
RFC:
https://github.com/hasura/graphql-engine/pull/10141/files#diff-a9f74850aca6ecad1556723e4b3c7395e59f26cd40d9de20bfef83cb9c64f028
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [ ] community-edition
- [ ] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
_Replace with changelog entry_
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 73cb9e6c8ef4bfe64d0f0cd9ce3ccbd32e208712
I got frustrated by the lack of useful output when services failed to
start in CI, so I thought I'd mess around.
I made some changes so that:
1. we wait for services with health checks to report as healthy,
2. we do not rebuild the engine or custom connector when they start,
3. the health checks work (apart from ndc-postgres, which will come
later), and
4. we use environment variables rather than command-line arguments where
possible.
I have also renamed the "agent" binary to "custom-connector", matching
its crate, because it was driving me a little crazy.
V3_GIT_ORIGIN_REV_ID: 8d672b0b25438b54d47368ce82cd236cfdd4e554
<!-- Thank you for submitting this PR! :) -->
## Description
Forgot this case in https://github.com/hasura/v3-engine/pull/350 - we
should allow strings to be used for GraphQL `ID` values.
<!--
Questions to consider answering:
1. What user-facing changes are being made?
2. What are issues related to this PR? (Consider adding `(close
#<issue-no>)` to the PR title)
3. What is the conceptual design behind this PR?
4. How can this PR be tested/verified?
5. Does the PR have limitations?
6. Does the PR introduce breaking changes?
-->
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [X] community-edition
- [X] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [X] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
Allow JSON strings to be passed for arguments with ID scalar type.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: df2a81a891a6aa0af54c9792916e1469b823f769
This means that we can pass arguments to the Criterion benchmarks
because the test binaries do not try and run.
For example, if you run this:
```
cargo bench -- --warm-up-time=1 --measurement-time=1
```
… it will currently fail, because it will also pass these arguments to
the tests. Disabling the benchmarks for the tests fixes this.
V3_GIT_ORIGIN_REV_ID: 10fe0683b82c506e1a11b24ca0a0a4041e37b655
## Description
This PR adds a check which ensures that empty selection sets (i.e.,
selecting a field of object type (or list of object type)) in queries
raise an error.
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [x] community-edition
- [x] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [x] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
Ensure to reject queries with empty selection sets
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 79049c39b58288f39ec29ecf713cc3622842d47e
<!-- Thank you for submitting this PR! :) -->
## Description
This PR downgrades the opentelemetry versions to 0.20. This fixed the
tracing propagation issues faced
[here](https://hasurahq.slack.com/archives/C066TKMH79R/p1710177836329809).
### TODOs:
- [ ] Figure out the exact issue which caused the context propagation to
stop working
- [ ] Open an issue with
[opentelemetry](https://github.com/open-telemetry/opentelemetry-rust)
(if required).
Co-authored-by: Anon Ray <ecthiender@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 0bc4d8142bd2f671e04d1cbf806f4626e2217332
Reverts hasura/v3-engine#367
This is causing downstream problems in `v3-metadata-build-service`,
let's roll back for now to unblock things.
V3_GIT_ORIGIN_REV_ID: 3261f2f12825c8eac3353a2282b982f0f3bac80e
## Description
This PR fixes a bug when remote joins is used within nested selections.
The bug is described in #318
Closes: https://hasurahq.atlassian.net/browse/V3ENGINE-20
The fix is to remove the replacement tokens data type. And instead use
each `Argument` as the key to lookup in RHS response and join with LHS
response.
<!--
Questions to consider answering:
1. What user-facing changes are being made?
2. What are issues related to this PR? (Consider adding `(close
#<issue-no>)` to the PR title)
3. What is the conceptual design behind this PR?
4. How can this PR be tested/verified?
5. Does the PR have limitations?
6. Does the PR introduce breaking changes?
-->
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [x] community-edition
- [x] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [x] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
Fix bug when remote joins are used within nested selections
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
---------
Co-authored-by: Gil Mizrahi <gil@hasura.io>
V3_GIT_ORIGIN_REV_ID: 3c0648f5fb21eb4f1d6cc004db2f3ee61a731c38
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 2.3.3 to
3.7.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.7.0</h2>
<h3>Added</h3>
<ul>
<li>Implement <code>JsonSchemaAs</code> for <code>EnumMap</code> by <a
href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/697">#697</a>)</li>
<li>Implement <code>JsonSchemaAs</code> for
<code>IfIsHumanReadable</code> by <a
href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/717">#717</a>)</li>
<li>Implement <code>JsonSchemaAs</code> for <code>KeyValueMap</code> by
<a href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/713">#713</a>)</li>
<li>Implement <code>JsonSchemaAs</code> for <code>OneOrMany</code> by <a
href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/719">#719</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Detect conflicting <code>schema_with</code> attributes on fields
with <code>schemars</code> annotations by <a
href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/715">#715</a>)
This extends the existing avoidance mechanism to a new variant fixing <a
href="https://redirect.github.com/jonasbb/serde_with/issues/712">#712</a>.</li>
</ul>
<h2>serde_with v3.6.1</h2>
<h3>Changed</h3>
<ul>
<li>Eliminate dependency on serde's "derive" feature by <a
href="https://github.com/dtolnay"><code>@dtolnay</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/694">#694</a>)
This allows parallel compilation of <code>serde</code> and
<code>serde_derive</code> which can speed up the wallclock time.
It requires that downstream crates do not use the "derive"
feature either.</li>
</ul>
<h2>serde_with v3.6.0</h2>
<h3>Added</h3>
<ul>
<li>Add <code>IfIsHumanReadable</code> for conditional implementation by
<a href="https://github.com/irriden"><code>@irriden</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/690">#690</a>)
Used to specify different transformations for text-based and binary
formats.</li>
<li>Add more <code>JsonSchemaAs</code> impls for all
<code>Duration*</code> and <code>Timestamp*</code> adaptors by <a
href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/685">#685</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Bump MSRV to 1.65, since that is required for the <code>regex</code>
dependency.</li>
</ul>
<h2>serde_with v3.5.1</h2>
<h3>Fixed</h3>
<ul>
<li>The <code>serde_as</code> macro now better detects existing
<code>schemars</code> attributes on fields and incorporates them by <a
href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/682">#682</a>)
This avoids errors on existing <code>#[schemars(with = ...)]</code>
annotations.</li>
</ul>
<h2>serde_with v3.5.0</h2>
<h3>Added</h3>
<ul>
<li>Support for <code>schemars</code> integration added by <a
href="https://github.com/swlynch99"><code>@swlynch99</code></a> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/666">#666</a>)
The support uses a new <code>Schema</code> top-level item which
implements <code>JsonSchema</code>
The <code>serde_as</code> macro can now detect <code>schemars</code>
usage and emits matching annotations for all fields with
<code>serde_as</code> attribute.
Many types of this crate come already with support for the
<code>schemars</code>, but support is not complete and will be extended
over time.</li>
</ul>
<h2>serde_with v3.4.0</h2>
<ul>
<li>
<p>Lower minimum required serde version to 1.0.152 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/653">#653</a>)
Thanks to <a href="https://github.com/banool"><code>@banool</code></a>
for submitting the PR.</p>
<p>This allows people that have a problem with 1.0.153 to still use
<code>serde_with</code>.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bcda3fa3ff"><code>bcda3fa</code></a>
Bump version to 3.7.0 (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/720">#720</a>)</li>
<li><a
href="a446da1e12"><code>a446da1</code></a>
Bump version to 3.7.0</li>
<li><a
href="7e9772ff1e"><code>7e9772f</code></a>
Implement <code>JsonSchemaAs</code> for <code>OneOrMany</code> (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/719">#719</a>)</li>
<li><a
href="5e360837b0"><code>5e36083</code></a>
Add impls and tests for OneOrMany</li>
<li><a
href="c5c35db655"><code>c5c35db</code></a>
Implement JsonSchemaAs for KeyValueMap (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/713">#713</a>)</li>
<li><a
href="046f820610"><code>046f820</code></a>
Bump the github-actions group with 1 update (<a
href="https://redirect.github.com/jonasbb/serde_with/issues/718">#718</a>)</li>
<li><a
href="7e87fe5632"><code>7e87fe5</code></a>
Bump the github-actions group with 1 update</li>
<li><a
href="ffade779c5"><code>ffade77</code></a>
Add <code>JsonSchemaAs</code> impl for <code>IfIsHumanReadable</code>
(<a
href="https://redirect.github.com/jonasbb/serde_with/issues/717">#717</a>)</li>
<li><a
href="bb2ab60a3a"><code>bb2ab60</code></a>
Add JsonSchemaAs impl for IfIsHumanReadable</li>
<li><a
href="a80425783f"><code>a804257</code></a>
Implement JsonSchemaAs for KeyValueMap</li>
<li>Additional commits viewable in <a
href="https://github.com/jonasbb/serde_with/compare/v2.3.3...v3.7.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=2.3.3&new-version=3.7.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: 1db291014bc664f7e9d46c8f187989994980ea85
## Description
The `just dev` command had ceased to work because the path to the auth
hook dockerfile had changed with the move to the `crates/` folder.
V3_GIT_ORIGIN_REV_ID: 52c21e41ff39125daeffb7e1a8e5b77664617d7b
Add `serde(deny_unknown_fields)` attribute for `Deprecated` struct. In
v3-metadata-build-service, there's a test to ensure no arbitrary
additional properties exists for any schema definition except
`JWTClaimsMap` struct. It actually caught the missing
`deny_unknown_fields` attribute for `Deprecated` struct. This PR also
includes the same test to catch such misses in the future.
V3_GIT_ORIGIN_REV_ID: 2c0a9d2efcd76946885f2e54a364a388e80c283b
Bumps [bson](https://github.com/mongodb/bson-rust) from 2.7.0 to 2.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/bson-rust/releases">bson's
releases</a>.</em></p>
<blockquote>
<h2>v2.9.0</h2>
<p>The MongoDB Rust driver team is pleased to announce the v2.9.0
release of the <code>bson</code> crate.</p>
<h2>Highlighted Changes</h2>
<p>This release adds several externally contributed improvements!</p>
<ul>
<li>A new <code>RawIter</code> type that iterates over elements in a
document without deserializing them,</li>
<li>An improvement to the <code>doc</code> and <code>bson</code> macros
(and their <code>raw</code> counterparts) that allows using types that
implement <code>Into<Bson></code> or
<code>Into<RawBson></code>,</li>
<li>An impl of <code>From<&mut T></code> for <code>Bson</code>
for types that implement <code>Into<Bson></code>,</li>
<li>A smaller dependency tree thanks to updating the indexmap
crate,</li>
<li>And a fix for the <code>serde_with</code> 3.x support for the
<code>Uuid</code> type.</li>
</ul>
<h2>Full Release Notes</h2>
<h2>New Features</h2>
<ul>
<li>RUST-1815 provide lazy iterator implementation (thanks <a
href="https://github.com/tychoish"><code>@tychoish</code></a>!)</li>
<li>RUST-1716 Add BSON Binary Data subtype Sensitive (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/454">#454</a>)</li>
</ul>
<h2>Improvements</h2>
<ul>
<li>RUST-1822 Allow using the {,raw}{bson,doc} with types implementing
Into<!-- raw HTML omitted --> (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/450">#450</a>)
(thanks <a
href="https://github.com/tyilo"><code>@tyilo</code></a>!)</li>
<li>RUST-1825 Implement From<!-- raw HTML omitted --> for Bson (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/452">#452</a>)
(thanks <a
href="https://github.com/tyilo"><code>@tyilo</code></a>!)</li>
<li>RUST-1814 minor: bump indexmap to 2.1.0 (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/448">#448</a>)
(thanks <a
href="https://github.com/froydnj"><code>@froydnj</code></a>!)</li>
</ul>
<h2>Bugfixes</h2>
<ul>
<li>RUST-1828 Fix feature name for serde_with Uuid implementation (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/453">#453</a>)
(thanks <a
href="https://github.com/jonasbb"><code>@jonasbb</code></a>!)</li>
</ul>
<h2>v2.8.1</h2>
<p>The MongoDB Rust driver team is pleased to announce the v2.8.1
release of the <code>bson</code> crate.</p>
<h2>Highlighted Changes</h2>
<p>This release fixes compilation for the <code>wasm32-wasi</code>
target, which broke in the 2.8.0 release.</p>
<h2>Full Release Notes</h2>
<h2>Bugfixes</h2>
<ul>
<li>Fix compilation on wasm32-wasi target <a
href="https://redirect.github.com/mongodb/bson-rust/issues/445">#445</a>
(thanks <a
href="https://github.com/tyranron"><code>@tyranron</code></a>!)</li>
</ul>
<h2>v2.8.0</h2>
<p>The MongoDB Rust driver team is pleased to announce the v2.8.0
release of the <code>bson</code> crate.</p>
<h2>Highlighted Changes</h2>
<p>This release adds optimizations to the <code>serde</code> integration
that show up to 50% deserialization speed improvement in our benchmarks,
as well as a variety of user-submitted fixes.</p>
<h2>Full Release Notes</h2>
<h2>Improvements</h2>
<ul>
<li>RUST-1132 Implement DeserializeSeed for owned and borrowed raw
documents (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/433">#433</a>)</li>
<li>RUST-1780 Bump MSRV to 1.61.0, upgrade ahash to 0.8.5 in
<code>Cargo.lock.msrv</code> (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/436">#436</a>)
(thanks <a
href="https://github.com/stIncMale"><code>@stIncMale</code></a>!)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="38ffff5343"><code>38ffff5</code></a>
release v2.9.0 (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/455">#455</a>)</li>
<li><a
href="230dab13f5"><code>230dab1</code></a>
RUST-1716 Add BSON Binary Data subtype Sensitive (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/454">#454</a>)</li>
<li><a
href="81a9895089"><code>81a9895</code></a>
Fix feature name for serde_with Uuid implementation (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/453">#453</a>)</li>
<li><a
href="8247d271b2"><code>8247d27</code></a>
Implement From<&mut T> for Bson (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/452">#452</a>)</li>
<li><a
href="622007da1d"><code>622007d</code></a>
minor: update clippy to 1.75 (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/451">#451</a>)</li>
<li><a
href="7e114303ae"><code>7e11430</code></a>
Allow using the {,raw}{bson,doc} with types implementing
Into<{,Raw}Bson> (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/450">#450</a>)</li>
<li><a
href="9294ee5b45"><code>9294ee5</code></a>
provide lazy iterator implementation (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/449">#449</a>)</li>
<li><a
href="d044889a9f"><code>d044889</code></a>
minor: bump indexmap to <code>2.1.0</code> (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/448">#448</a>)</li>
<li><a
href="4af5805248"><code>4af5805</code></a>
Fix compilation on <code>wasm32-wasi</code> target (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/445">#445</a>)</li>
<li><a
href="6981c342c7"><code>6981c34</code></a>
release v2.8.0 (<a
href="https://redirect.github.com/mongodb/bson-rust/issues/443">#443</a>)
(<a
href="https://redirect.github.com/mongodb/bson-rust/issues/444">#444</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mongodb/bson-rust/compare/v2.7.0...v2.9.0">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bson&package-manager=cargo&previous-version=2.7.0&new-version=2.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: 8e483de7788695902efdfbb2c9fe0b9b185b4bf7
Add an optional `deprecated` key to the following OpenDD metadata
- Object type field definitions
- Model select unique and select many graphql API
- Command GraphQL API
- Relationship
The `deprecated` value is an object with an optional `reason` key.
```
"deprecated": {
"reason": "Optional reason"
}
```
Produce `@deprecated` against GraphQL fields generated from
aforementioned OpenDD metadata using `deprecated` config.
V3_GIT_ORIGIN_REV_ID: b26fe8a8b62de24d04820578b8201d3ff8585375
<!-- Thank you for submitting this PR! :) -->
## Description
Following on https://github.com/hasura/v3-engine/pull/340 (and stacked
on top of it, as such) - this adds preset arguments for models, allowing
hard coded values for different roles.
```yaml
kind: ModelPermissions
version: v1
definition:
modelName: ActorsByMovie
permissions:
- role: admin
select:
filter:
argumentPresets:
- argument: movie_id
value:
literal: 3
```
<!--
Questions to consider answering:
1. What user-facing changes are being made?
2. What are issues related to this PR? (Consider adding `(close
#<issue-no>)` to the PR title)
3. What is the conceptual design behind this PR?
4. How can this PR be tested/verified?
5. Does the PR have limitations?
6. Does the PR introduce breaking changes?
-->
## Changelog
- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.
### Product
_(Select all products this will be available in)_
- [X] community-edition
- [X] cloud
<!-- product : end : DO NOT REMOVE -->
### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [X] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->
### Changelog entry
<!--
- Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
- For Highlights start with a H4 heading (#### <entry title>)
- Get the changelog entry reviewed by your team
-->
Allow setting preset values for arguments on models, based on user's
role.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 7dd23bf78e92980384cb2b2e109305cdb42d1c0b
<!-- Thank you for submitting this PR! :) -->
## Description
This moves all the crates into a `/crates` folder. Everything appears to
just work, thanks Cargo!
V3_GIT_ORIGIN_REV_ID: 8e3ef287b1a46cabdb4d919a50e813ab2cddf8b1
## Description
Following on from #347, this PR separates "query requests" and "mutation
requests" at the level of the query plan, rather than the individual
fields. The result of this is that we can separate the functions to plan
and execute the two things entirely, which will make it easier in the
forthcoming PR to add support for transactions.
There's almost certainly some further refactoring that could be done
here, but I'm choosing to wait until transactions are in place before
getting too excited.
V3_GIT_ORIGIN_REV_ID: 849f4682cc01d3b9e44d2748e4cc34382c8547a7
Outputs traces to stdout in addition to exporting via otlp. Stdout contains one JSON object per line, with a single span resource in each output line. This will make it quite a bit easier for me to get a quick look at what is going on in the engine during local development.
The first commit makes the change using the existing opentelemetry crate versions. The second commit upgrades the opentelemetry dependencies. I thought I would include that just because I went to the trouble of figuring out how to do that upgrade.
The JSON output is noisy, but can be formatted nicely with some shell functions. For example in nushell I use these functions to process the opentelemetry data coming via docker-compose or arion-compose log output:
```nu
# Get log output from arion/docker-compose services with JSON parsing. If an
# argument is given filters to logs from the given service
def logs [
service?: string@docker_compose_services
--file (-f): string = "./arion-compose.nix" # Use FILE instead of the default ./arion-compose.nix
] {
let args = [$service] | compact
let input = if ($file | path exists) {
arion --file $file logs ...$args
} else {
docker-compose logs ...$args
}
$input
| lines
| parse -r '^(?<service>\S+)\s*\|\s*(?<log>.*)$'
| where {|it| is_json $it.log}
| update log {|it| $it.log | from json }
| flatten
}
# Gets log output from a given docker-compose service, and extracts and formats
# relevant opentelemetry data
def otel [
service: string@docker_compose_services
--file (-f): string = "./arion-compose.nix" # Use FILE instead of the default ./arion-compose.nix
] {
logs $service -f $file | get resourceSpans | each {|it| $it.scopeSpans.0.spans.0 | select name attributes status }
}
# Helper to provide autocompletion for inputs to the logs command
def docker_compose_services [] {
let compose_file = if ("arion-compose.nix" | path exists) {
arion cat | from json
} else if ("docker-compose.yaml" | path exists) {
open docker-compose.yaml
} else {
return []
}
$compose_file | get services | columns
}
# Helper for the logs command
def is_json [input: string] {
($input | from json | describe) =~ '^(record|table|list)'
}
```
V3_GIT_ORIGIN_REV_ID: 38fd62f321a363a52b03d661b66d4dd49ac922de
This fixes a bug with collection_relationships not being populated by relationships constructed from where and/or order by clauses.
We fix this by not only collecting relationships from field selection, but also considering relationships introduced by order by and where clauses.
V3_GIT_ORIGIN_REV_ID: c612ceed8b3831257ca2c7d23ec9ed23261efedf