<!-- Thank you for submitting this PR! :) -->
## Description
We'd like to split metadata resolve into it's own crate to enforce
module boundaries better. In doing so, discovered that it's using a type
from the later schema stage called `PredicateRelationshipAnnotation`,
which isn't really an annotation type at all, just a data structure for
a resolved predicate.
This moves that types back into metadata resolve, renaming it to
`PredicateRelationshipInfo`.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 5b37ca77fb4ddf17093277e6727360d6077c4e06
## Description
When regenerating goldenfiles, all tests formatting go out of order.
This adds a subsequent formatting step afterwards.
V3_GIT_ORIGIN_REV_ID: 5cddd4cc4ec6c1d684b1841be9347f1fcaa3aade
The massive `Error` enum from `execute.rs` disintegrates into the
following independent error types.
- `RequestError`: All exceptions occurred before executing the root
field plans. Each variant in this error enum contains the error type
stemming from isolated steps in the pipeline involving parsing,
validation, IR conversion, and plan generation.
- `FieldError`: Exception occurred when resolving a field through its
plan. Multiple root fields are executed isolated, and field errors are
collected in a list.
Code paths for `explain` and `execute` query are split into two
functions. This is done to avoid few error variants and unburden the
function that previously does both.
V3_GIT_ORIGIN_REV_ID: 21f2f43ee4805a955fa0ce7d9b45c4b1902def63
<!-- Thank you for submitting this PR! :) -->
## Description
We named this stage after the least interesting thing about it, this
resolves that.
`data_connector_type_mappings` -> `object_types`.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 67c94356cc7207e94eb3b696abbd32efe31551ac
<!-- Thank you for submitting this PR! :) -->
## Description
I think this broke when moving folders around, realised we weren't even
building it other than in `main`, this rectifies that.
V3_GIT_ORIGIN_REV_ID: f822290f9a00159d4b1b55553f31175b697a16c1
<!-- Thank you for submitting this PR! :) -->
## Description
`data_connector_type_mappings` is a map of data connector information
keyed by `CustomTypeName`. We create it when we resolve object types,
which are also keyed by `CustomTypeName`, however we pass them around
separately and it's not immediately obvious that they are related.
This PR stops passing `data_connector_type_mappings` around and instead
includes them with the object information.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 3ac1341907ea88c11fbc3639adf63140aa702262
## Description
1. I've moved the architecture information we had in `CONTRIBUTING.md`
to a separate document `docs/architecture.md` so we can evolve both
separately in the future.
2. I've introduced a couple of sub directories: `utils` and `auth`, for
supporting crates that are not the core functionality of the engine so
it is easier to find the most relevant crates.
New structure:
```
crates
├── auth
│ ├── dev-auth-webhook
│ ├── hasura-authn-core
│ ├── hasura-authn-jwt
│ └── hasura-authn-webhook
├── custom-connector
├── engine
├── lang-graphql
├── metadata-schema-generator
├── open-dds
└── utils
├── opendds-derive
├── recursion_limit_macro
└── tracing-util
```
V3_GIT_ORIGIN_REV_ID: e0e9394da2fcd911f329c48107a76f8492fa304c
## Description
To clarify the purpose of the `"source"` field, we've decided to rename
it to `"sourceType"`. This hopefully makes it clearer that the value
should be a type name.
`"source"` is still accepted as an alias in order to stop this from
being a breaking change.
I have added the aliasing capability for struct fields in
`opendds_derive`.
All test metadata has been updated to use `"sourceType"`, but I've added
one test case that uses `"source"` instead just to make sure that it
still works.
## 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
- [ ] bugfix
- [x] 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
-->
- OpenDDS: The `"source"` field for relationships has been renamed to
`"sourceType"`. Metadata using `"source"` will continue to work as
usual, but new metadata should be authored with `"sourceType"` instead.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 305cbf7a62ee49a715e95ad892b8d00647f05cef
I found myself wanting to rewrite JSON files with `sed`. The problem is,
then I want to run a formatter over them afterwards, and this will
change the whole file, not just the area I touched.
I would like to propose the nuclear option in remedying this: format
everything now. This is a very large change that should make it easier
to keep files to a consistent format in the future.
I have chosen to use Prettier for this because (a) it has a useful
`--write` command and (b) it also does GraphQL, Markdown, YAML, etc.
I've elected to exclude two sets of files:
1. `crates/custom-connector/data/*.json`, because they are actually
multiple JSON objects, one per line, which Prettier cannot parse.
2. `crates/lang-graphql/tests/**/*.graphql`, because it contains invalid
GraphQL, and the parser is intended to work with strangely-formatted
GraphQL.
The main changes are standardizing whitespace, adding a newline at the
end of files, and putting JSON arrays on one line when they fit.
V3_GIT_ORIGIN_REV_ID: 92d4a535c34a3cc00721e8ddc6f17c5717e8ff76
By wrapping the errors we can work with both `syn` and `darling` errors,
allowing us to avoid `.unwrap` and `.expect`. This makes failures way
more useful.
V3_GIT_ORIGIN_REV_ID: bd7c4a4e7de4a2360b4533d9238199f098a09a8d
<!-- Thank you for submitting this PR! :) -->
## Description
This stacks on top of https://github.com/hasura/v3-engine/pull/526 and
is the tidying up step following it.
There is a lot going on here, none of it particularly interesting.
- We remove the old `resolve_metadata` function, so all of "the action"
for resolving metadata happens inside `resolved::stages::mod`.
- We move the remaining modules into two folders, `helpers` and `types`.
This is a pretty rough cut, and there are definitely better homes for
the things here, I just wanted the separation of stages and "other bits"
to be clearer.
- We split the `types` helpers into `types` and `type_mappings`, as the
`type_mappings` stuff was clearly defined and didn't belong with the
grab-bag of functions that remain in `types`.
- We explicitly export everything used outside metadata resolve, and
stop other modules dipping into it's internal structure. This will make
future changes (particularly refactors that change the stages etc) a lot
easier as we don't need the rest of the app concerning itself with it.
- I _think_ we may now be able to move metadata resolve into a separate
crate. I have not tried yet, this PR is already silly enough.
When given a choice between "fixing" something, and doing the most
mechanical obvious change, I have opted for the latter. That is to
derisk this big change, and to ensure it doesn't linger, collecting
awful merge conflicts.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 2b52403cbfddb0427b8a3e61ad2edaef9d1b3b46
<!-- Thank you for submitting this PR! :) -->
## Description
Following work in https://github.com/hasura/v3-engine/pull/523 and
friends, this resolves `model_permissions` in a fresh step, creating a
new `ModelWithPermissions` type to differentiate from the regular
`Model` which no longer has any notion of permissions.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: fdf928ae12159a6c4ef87effc4704193c5306e46
<!-- Thank you for submitting this PR! :) -->
## Description
Follow up to https://github.com/hasura/v3-engine/pull/523
This removes the `Option` from the Command permissions. Seperated from
the pure "moving things around" PR for clarity, it should be a
functional no-op though, as Command permissions are opt-in, so `None`
and `Some(HashMap::new())` are equivalent, and this layer can be
removed.
V3_GIT_ORIGIN_REV_ID: ebd8fbb54c0f771b7128ff499af2abea85f73808
<!-- Thank you for submitting this PR! :) -->
## Description
Following https://github.com/hasura/v3-engine/pull/522 and friends, this
breaks out the command permissions into a discreet metadata step. This
creates a new `CommandWithPermissions` with type which is available
after this step, and removes the `Option<CommandPermission>` from the
regular `Command` type.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: ac076a93257d25ec5f9367a5a0b280f8b63371fc
<!-- Thank you for submitting this PR! :) -->
## Description
This separates out the stage that resolves relationships. The most
important thing here is that we no longer have a `relationships` field
in `ObjectTypeRepresentation` that may or may not be populated, and
instead add a new wrapper type `ObjectTypeWithRelationships`, which is
used downstream of this stage.
Stacked on top of https://github.com/hasura/v3-engine/pull/521
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 1e6ca41e55b8cc470385c35bbd7999fa7a2bce6e
<!-- Thank you for submitting this PR! :) -->
## Description
Following https://github.com/hasura/v3-engine/pull/520, there are a
couple of loose things that occur in the big metadata resolve, given
them their own stages too. Functional no-op.
V3_GIT_ORIGIN_REV_ID: 2b7454ce997411da7dd9551ac05a4180b137e0a0
<!-- Thank you for submitting this PR! :) -->
## Description
Following https://github.com/hasura/v3-engine/pull/519 here is the
equivalent change for `commands` which are fortunately, much simpler.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 24ec7107018ed29e251452c9ca19c5b0538cd0c6
<!-- Thank you for submitting this PR! :) -->
## Description
As per https://github.com/hasura/v3-engine/pull/483 and all PRs
proceeding it, this moves the resolving of Models into a discreet
metadata stage. The `resolve::model` module was a bit of a dumping
ground, so I have tried to find more sensible homes for a lot of things,
but some things remain (model permissions) and will be homed when
sorting later stages.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: b41bcc9f413a867f21dd72b5d7affee8d55e02df
<!-- Thank you for submitting this PR! :) -->
## Description
More metadata resolving into stages, this time the resolving of boolean
expressions. Functional no-op.
V3_GIT_ORIGIN_REV_ID: 5b74f7cd17f919dc54b82c003b7dd937eb69b65e
<!-- Thank you for submitting this PR! :) -->
## Description
This implements the first part of passing boolean expressions as command
arguments. It adds a `BooleanExpression` arm to `ValueExpression`, and
allows them to be resolved in the context of an ObjectType rather than
an entire model.
This means that if a boolean expression is passed to a command argument
that uses a field that doesn't exist, this happens:
<img width="960" alt="Screenshot 2024-04-05 at 15 54 20"
src="https://github.com/hasura/v3-engine/assets/4729125/cd795bc1-9fda-4cfb-bad3-1e70dd6227a0">
The output of this PR is that we can resolve metadata for boolean
expressions in command arguments, and generate a GraphQL schema for
them, but will throw an error if one is actually used. This will be
resolved in the follow-up PR.
V3_GIT_ORIGIN_REV_ID: 20b8840c313d7ee1f56ebd5becdb28bbe7743350
<!-- Thank you for submitting this PR! :) -->
## Description
As part of moving types and functions into resolve stages, this gets rid
of the root-level `data_connector` module and moves it's types into
`data_connectors` and `data_connector_scalar_types` as appropriate.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 3109cc17931f0db42c7a4448c6d6194033f700e4
<!-- Thank you for submitting this PR! :) -->
## Description
In order to test things quicker, we'd like to be able to build custom
connector and friends in Nix, and then use the containers when running
tests. First step here is to be able to build Docker containers in Nix,
and add a CI job to ensure it still works.
Then we'll move onto publishing and using these images.
No-op build times:
<img width="336" alt="Screenshot 2024-04-25 at 15 53 56"
src="https://github.com/hasura/v3-engine/assets/4729125/47cbc0c5-6e54-4583-aa01-0528d4a21080">
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 8f9d609e26cdd3b0801e61fd361c241ad504dcdf
<!-- Thank you for submitting this PR! :) -->
## Description
As everything is taking shape we're finding more loose bits and pieces
around, this moves `TypeMappings` and `FieldMappings` into the
`data_connector_type_mappings` stage. Functional no-op.
V3_GIT_ORIGIN_REV_ID: 2357e47b68d361b373f9fa886683ceb1fcff7cc3
<!-- Thank you for submitting this PR! :) -->
## Description
I wondered why some benchmarks were very quick seconds and others very
slow (hours). Turns out I only told half of them that I would prefer
them to be fast. Rectified.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 40bbcc6829e9a4ea85058f2983136024a9971e3b
<!-- Thank you for submitting this PR! :) -->
## Description
The function changed, the name did not, now it makes no sense. Also it's
friend wasn't even used anymore. Functional no-op.
V3_GIT_ORIGIN_REV_ID: 626316acd06f15d89e504365d21131177a41dada
<!-- Thank you for submitting this PR! :) -->
## Description
Benchmarks are running pretty slowly in Github, let's check it's not an
old library version problem.
---------
Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: db1a70c5465cf475fa66d2afc981fd496eccacaa
<!-- Thank you for submitting this PR! :) -->
## Description
Listen, I love copy paste, but even I have my limits. Functional no-op.
V3_GIT_ORIGIN_REV_ID: b917cffdfa9289f3fabc105a0d4581fb64998e44
<!-- Thank you for submitting this PR! :) -->
## Description
This splits calculating permissions for types into it's own discreet
stage, and adds a separate `ObjectTypeWithPermissions` type that is
different from the `ObjectTypeRepresentation` type.
90% of this is changing the types that later stages in metadata resolve
use.
Functional no-op.
---------
Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: 304a0b7f047dde65b23a7dbcb7775720cebd928e
<!-- Thank you for submitting this PR! :) -->
## Description
The docs.hasura.io site pulls through these examples for documentation.
We'd like to make them more copy/paste-friendly, so we add these fields
even though they're technically discriminators from parent types.
## 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: 9c121367fba187b11801f023208733b1c9ce0337
## Description
This allows the engine to be configured to listen on a specific host.
Mostly useful in testing on macOS, as it can be told to listen on
localhost (`::1`) to avoid firewall notifications.
I have also added doc comments to arguments, which will show up in the
help text when running the engine with `--help`.
## 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
- [ ] 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
-->
The v3 engine can now be configured to listen on a specific host IP
(e.g. `::1` for localhost). This can be useful when securing the service
or in testing.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: ac988ce3c6fcdf4545dcb38d29e1aaf5d2fd7d2e
<!-- Thank you for submitting this PR! :) -->
## Description
Resolving stages should own their types, this moves
`ObjectTypeRepresentation` and friends. Functional no-op.
V3_GIT_ORIGIN_REV_ID: ad1933ed547e72e35e853cae22beadf1de5f0459
<!-- Thank you for submitting this PR! :) -->
## Description
Previously boolean expressions were only used on where clauses for
models. We'd also like to use them for arguments for commands to make
permissions work. This PR splits a boolean expression from it's model.
This has the nice side effect of allowing the same boolean expression
type to used across multiple models, which is a sensible thing to want
to be able to do.
Before this change, using the same boolean expression type on two models
would give you this error:
<img width="783" alt="Screenshot 2024-04-19 at 11 53 23"
src="https://github.com/hasura/v3-engine/assets/4729125/bcc7a4b9-8b6f-4d82-9860-190621c0f5fd">
<!--
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 the same `ObjectBooleanExpressionType` to be shared between
multiple models.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 6c9979ddaad50d476c0996d1ece48f0cf1c8e99d
This ensures only Criterion benchmarks get called by `cargo bench`.
Previously, some tests were being loaded too. This is an issue because
if we want to provide command-line arguments to Criterion, it will fail
if we run a non-Criterion benchmark.
We need to specify `harness = false` for each benchmark so that they
don't get wrapped by Cargo, and `bench = false` for everything that
doesn't contain benchmarks but _could_ (i.e. unit and integration
tests). I find Cargo very strange in this regard.
In addition, I fixed the validation benchmark by providing a valid SDL
schema.
V3_GIT_ORIGIN_REV_ID: 338ac5b1411eec7af32923863c5b6f3933c0454b
This shrinks the Docker image size by half.
I have also normalized the two Dockerfiles so they share a cache for
longer.
V3_GIT_ORIGIN_REV_ID: f976725b09ad2c8022a912b15cdcde55ce5a9486
The benchmarks were not working because they couldn't access Git
information. While this is fair, they didn't actually fail, they kept
going, so I have improved the script to fail hard, and fixed the bug by
setting `RELEASE_VERSION` so the build script doesn't bother trying to
read Git.
V3_GIT_ORIGIN_REV_ID: 9573ea32371d7a4d7b99c87017a8d5d77815832c
## Description
This PR adds support for GraphQL variables in test cases. This can be
done by adding variables in `variables.json` file in the same directory
as the `request.gql`, `session_variables.json` files. This file is
optional.
Note that it expects a list of variable sets. Each item in the list
corresponds to a variable for each session in `session_variables.json`.
This is useful to run the same query, but with different variables for
different sessions.
Example `session_variables.json` -
```json
[
{
"x-hasura-role": "admin"
},
{
"x-hasura-role": "user_1"
},
{
"x-hasura-role": "user_2"
}
]
```
Example `variables.json`
```json
[
{
"upper_bound": 4
},
{
"upper_bound": 3
},
{
"upper_bound": 2
}
]
```
PS: this PR only modifies the `test_execution_expectation` function, and
not the `test_execution_expectation_legacy` function.
This PR is required to add some tests for #454
V3_GIT_ORIGIN_REV_ID: 31a6f8adc3521367960986d2bc070271ba3e2d73
<!-- Thank you for submitting this PR! :) -->
## Description
Resolving stages should contain the types they produce, so this moves
`ScalarTypeRepresentation` to the `scalar_types` stage and updates
imports. Functional no-op.
V3_GIT_ORIGIN_REV_ID: 24681009ddbf216d3a57b7cb729d644f687cb0c6
<!-- Thank you for submitting this PR! :) -->
## Description
This PR fixes the bug where passing a null value to a nullable input
field resulted in an error. It also uncomments the test for that.
JIRA: https://hasurahq.atlassian.net/browse/V3ENGINE-97
According to [the graphql
spec](https://spec.graphql.org/October2021/#sec-Null-Value):
>
>
> ```graphql
> {
> field(arg: null)
> field
> }
> ```
> The first has explicitly provided null to the argument “arg”, while
the second has implicitly not provided a value to the argument “arg”.
These two forms may be interpreted differently.
We are also considering the two cases separately, i.e., if something is
absent and nullable vs if something is set to null and is nullable. We
are not manually adding the nullable fields and setting them to null if
not specified explicitly.
## 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
-->
allow null for nullable field
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
---------
Co-authored-by: Anon Ray <ecthiender@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: 4aa181899379905aaca1a71f498b85515180ae1d
As per
[V3ENGINE-112](https://hasurahq.atlassian.net/browse/V3ENGINE-112), we
now require that subgraph names be valid graphql identifiers. This PR
updates the type of an `OpenDdSubgraph` to reflect this.
<!-- Thank you for submitting this PR! :) -->
## Description
<!--
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)_
- [ ] 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
- [x] 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
-->
Subgraph names are now required to be valid GraphQL identifiers (that
is, to match `"^[_a-zA-Z][_a-zA-Z0-9]*$"`).
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
[V3ENGINE-112]:
https://hasurahq.atlassian.net/browse/V3ENGINE-112?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Co-authored-by: Tom Harding <tom.harding@hasura.io>
V3_GIT_ORIGIN_REV_ID: 616c77a41490e079f6fb03a919f83d3e61270cc5
This splits out a `debug.Dockerfile` which makes use of out-of-band
caching to speed up builds drastically, at the expense of
reproducibility.
It is used to run tests and auxiliary test services (i.e. the custom
connector).
The new `debug.Dockerfile` marks the Cargo dependency and build caches
as Docker caches, which means they are shared between builds. This is
probably fine for local work and testing. The `Dockerfile` continues to
not use a cache like this, to guarantee that it is not polluted by extra
information, at the expense of build speed.
In addition, we build a `nextest` archive ahead of time to avoid
building tests when attempting to run them.
On my machine, a re-run of `just test` now takes seconds.
I have also sped up the `postgres` container start time by creating a
database called "finished" last, and then waiting for that to show up.
V3_GIT_ORIGIN_REV_ID: 7ef0548361987175b68a0cad44c8f2295110a1fb
<!-- Thank you for submitting this PR! :) -->
## Description
Making the graphs is taking too long, re-adding this advisory
measurement time to them.
V3_GIT_ORIGIN_REV_ID: e45ef4b8b8c8fd0cf45aacb989dd2e382b6b958a
<!-- Thank you for submitting this PR! :) -->
## Description
Had two types that were identical except for their `scalars` field. Have
extracted the commonality to make this easier to change in future.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 4ab5582e8ca62fc85345c6273cab3b0c4741b38b
I was on a roll.
I also replaced `futures` with `futures-util`, which is theoretically
smaller.
V3_GIT_ORIGIN_REV_ID: 27228a506f1edb6d0e33a4c61499e500cc5d0df7
This changes the way we build the custom connector so that the data is
baked in at compile time, not loaded from the file system at runtime.
This simplifies packaging.
I also took the liberty to switch out `.unwrap()` for `anyhow`, and to
avoid parsing a string to construct the socket address.
V3_GIT_ORIGIN_REV_ID: d562e0a9852b4e3ecde45bd6938d8eb1b066211b
## Description
We set W3C and B3 trace headers when making JWT authentication HTTP
requests to obtain JWKs. This will allow us to figure out what's going
on if we spend a lot of time here.
## 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
- [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
-->
- JWT authentication requests over HTTP now propagate trace headers when
making request for JWKs. These can be used to identify latency in
authentication.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 70fa68c85eb4ffcc76e445771263ce08496dc4b4
When trying to reduce the number of dependencies we use in the engine, I
was blocked by a few `.clone()` calls that, on inspection, turned out to
be completely unnecessary.
I have replaced those with passing by reference, and then gone on a
pedant spree. I enabled the `needless_pass_by_value` Clippy warning and
fixed it everywhere that it highlighted. In most places, this meant
adding `&`, but I also marked some types as `Copy`, which makes
pass-by-value the right move.
In one place, I replaced calls to `async_map` with `if` and `else`, to
avoid constructing closures that capture across async boundaries. This
means I could just delete `async_map`.
V3_GIT_ORIGIN_REV_ID: 6ff71f0c553b707889d89552eff3e8c001e898cc
<!-- Thank you for submitting this PR! :) -->
## Description
Following https://github.com/hasura/v3-engine/pull/470 , split data
connector scalar type representations resolve step into a separate stage
and files etc. Functional no-op.
V3_GIT_ORIGIN_REV_ID: 3bcef6b58c0a4f4f7fa529456cb4261667a7e0ce
<!-- Thank you for submitting this PR! :) -->
## Description
Following from https://github.com/hasura/v3-engine/pull/469 , we split
scalar type resolution too. That will need to be merged before this so
we can tidy up the data passing between them.
No functional change.
V3_GIT_ORIGIN_REV_ID: 5e157c4d15d0223d2bbd24f911ebee24e98b81cd
<!-- Thank you for submitting this PR! :) -->
## Description
Fairly mechanical change to split the data connector type mappings
resolve into own folders / stage. No functional changes.
V3_GIT_ORIGIN_REV_ID: 805c9d056a64a47afa9005674298e7417e58dad7
This uses the `json!` macro in the JWT client code and its associated
tests, rather than embedding a string and parsing it. This will make
compilation fail if the JSON is invalid, which seems better than a
runtime/test-time failure.
There are a few cases where we were constructing a JSON string by
concatenating strings using `format!`. `json!` also handles these cases
better, as you can refer to a JSON value by its variable name too, and
it doesn't require escaping `{` and `}`.
V3_GIT_ORIGIN_REV_ID: 4c40299b71d583efae7b0cdbabee8cff21b09bef
## Description
There are no user-facing changes in this PR. It just adds the
`Deserialize` trait to `AuthConfig` and makes some changes to internal
functions to avoid clones.
---------
Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: 2e8956bdd3827715693eb14239c808baf737d588
Previously, negative values for `offset` and `limit` input fields
resulted in an internal error and not exposed in the API response. The
reason is that these errors are raised from normalized_ast conversion
after GraphQL validation. The validation will only check for the type,
but not the value of the input fields.
This Commit:
- Introduces a utility function to lift any unexpected value internal
error to external.
- Use the function for `limit` and `offset` input field value coercion.
V3_GIT_ORIGIN_REV_ID: a186eb89a836359427e58f7a847eab3e2f8fafa4
<!-- Thank you for submitting this PR! :) -->
## Description
In https://github.com/hasura/v3-engine/pull/441 we made all our skipped
Clippy rules explicit. This enables one (pretty arbitrarily) and fixes
what comes up.
V3_GIT_ORIGIN_REV_ID: 406692a2a134cb2a6cf5785acd0ac7c5b9f90c61
## Description
This modifies handling of the NDC response so we deserialize it once,
not twice.
The previous code deserialized first to `serde_json::Value`, and then
again to the required type. This is costly and unnecessary. By
parameterizing over the type, we can go directly to the type we're
looking for.
We still want to do the two-step process for errors, but it's probably
fine if they remain a little slower as the error response shouldn't be
too large.
Analysis with flamegraphs before and after shows a dramatic drop in CPU
time as a result.
V3_GIT_ORIGIN_REV_ID: d7574bd8c82f0863372e1463fda020a8174c7341
Support both W3C and Zipkin B3 headers and connectors will
prefer B3 headers to extract traces because Cloud Run doesn't respect
those headers.
V3_GIT_ORIGIN_REV_ID: 1471b848e71d87420bc75b9adee60951f306c856
Revert the local docker-compose to expose ndc-postgres on port `8080` to
match the metadata. Otherwise running tests locally fails.
V3_GIT_ORIGIN_REV_ID: 6ca104a3041f758f13dfb2a05c2a6ab0b449e7cf
<!-- Thank you for submitting this PR! :) -->
## Description
<img width="435" alt="Screenshot 2024-04-15 at 14 19 21"
src="https://github.com/hasura/v3-engine/assets/4729125/bcaf856a-7dbc-44d5-83af-f05d62232379">
<img width="1445" alt="Screenshot 2024-04-15 at 14 15 07"
src="https://github.com/hasura/v3-engine/assets/4729125/c825ba1c-3004-4145-bbf2-974f627910f6">
This reverts prettifying of span names in
https://github.com/hasura/v3-engine/pull/419/files and instead includes
a `display.name` attribute that we use to include a human readable span
name. Because this doesn't need to be a `'static &str` we can use
`format!` to include dynamic content such as field and data connectors
names.
<!--
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
-->
Add human readable `display.name` attribute to spans.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 145046812050e493e164017ae52927b6c463c0de
[//]: # (dependabot-start)
⚠️ **Dependabot is rebasing this PR** ⚠️
Rebasing might not happen immediately, so don't worry if this takes some
time.
Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.
---
[//]: # (dependabot-end)
Bumps [strum](https://github.com/Peternator7/strum) from 0.25.0 to
0.26.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Peternator7/strum/releases">strum's
releases</a>.</em></p>
<blockquote>
<h2>v0.26.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix AsRefStr docs to specify lifetime constraints by <a
href="https://github.com/DTrippe"><code>@DTrippe</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/330">Peternator7/strum#330</a></li>
<li>Fix missing generics on impl for EnumTryAs by <a
href="https://github.com/hasali19"><code>@hasali19</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/337">Peternator7/strum#337</a></li>
<li>feat(as_ref_str): enable <code>prefix</code> attribute for
<code>AsRefStr</code> derive by <a
href="https://github.com/vbrvk"><code>@vbrvk</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/334">Peternator7/strum#334</a></li>
<li>Add dependabot by <a
href="https://github.com/oriontvv"><code>@oriontvv</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/333">Peternator7/strum#333</a></li>
<li>Fix docs that say array instead of slice by <a
href="https://github.com/Peternator7"><code>@Peternator7</code></a> in
<a
href="https://redirect.github.com/Peternator7/strum/pull/343">Peternator7/strum#343</a></li>
<li>Hide EnumTable by <a
href="https://github.com/Peternator7"><code>@Peternator7</code></a> in
<a
href="https://redirect.github.com/Peternator7/strum/pull/344">Peternator7/strum#344</a>
<ul>
<li>EnumTable will likely be deprecated.</li>
</ul>
</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/DTrippe"><code>@DTrippe</code></a> made
their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/330">Peternator7/strum#330</a></li>
<li><a href="https://github.com/hasali19"><code>@hasali19</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/337">Peternator7/strum#337</a></li>
<li><a href="https://github.com/vbrvk"><code>@vbrvk</code></a> made
their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/334">Peternator7/strum#334</a></li>
<li><a href="https://github.com/oriontvv"><code>@oriontvv</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/333">Peternator7/strum#333</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Peternator7/strum/compare/v0.26.1...v0.26.2">https://github.com/Peternator7/strum/compare/v0.26.1...v0.26.2</a></p>
<h2>v0.26.1</h2>
<h2>0.26.1</h2>
<ul>
<li><a
href="https://redirect.github.com/Peternator7/strum/pull/325">#325</a>:
use <code>core</code> instead of <code>std</code> in VariantArray.</li>
</ul>
<h2>0.26.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li>The <code>EnumVariantNames</code> macro has been renamed
<code>VariantNames</code>. The deprecation warning should steer you in
the right direction for fixing the warning.</li>
<li>The Iterator struct generated by EnumIter now has new bounds on it.
This shouldn't break code unless you manually
added the implementation in your code.</li>
<li><code>Display</code> now supports format strings using named fields
in the enum variant. This should be a no-op for most code.
However, if you were outputting a string like <code>"Hello
{field}"</code>, this will now be interpretted as a format
string.</li>
<li>EnumDiscriminant now inherits the repr and discriminant values from
your main enum. This makes the discriminant type
closer to a mirror of the original and that's always the goal.</li>
</ul>
<h3>New features</h3>
<ul>
<li>
<p>The <code>VariantArray</code> macro has been added. This macro adds
an associated constant <code>VARIANTS</code> to your enum. The constant
is a <code>&'static [Self]</code> slice so that you can access all
the variants of your enum. This only works on enums that only
have unit variants.</p>
<pre lang="rust"><code>use strum::VariantArray;
<p>#[derive(Debug, VariantArray)]
enum Color {
Red,
Blue,
Green,
</code></pre></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Peternator7/strum/blob/master/CHANGELOG.md">strum's
changelog</a>.</em></p>
<blockquote>
<h2>0.26.2</h2>
<ul>
<li><a
href="https://redirect.github.com/Peternator7/strum/pull/337">#337</a>:
Fix missing generic impls for <code>EnumTryAs</code></li>
<li><a
href="https://redirect.github.com/Peternator7/strum/pull/334">#334</a>:
Support prefix in <code>AsRefStr</code>. Technically a breaking change,
but <code>prefix</code> was just added in <code>0.26.0</code> so it's a
newer feature and it makes the feature more consisent in general.</li>
</ul>
<h2>0.26.1</h2>
<ul>
<li><a
href="https://redirect.github.com/Peternator7/strum/pull/325">#325</a>:
use <code>core</code> instead of <code>std</code> in VariantArray.</li>
</ul>
<h2>0.26.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li>The <code>EnumVariantNames</code> macro has been renamed
<code>VariantNames</code>. The deprecation warning should steer you in
the right direction for fixing the warning.</li>
<li>The Iterator struct generated by EnumIter now has new bounds on it.
This shouldn't break code unless you manually
added the implementation in your code.</li>
<li><code>Display</code> now supports format strings using named fields
in the enum variant. This should be a no-op for most code.
However, if you were outputting a string like <code>"Hello
{field}"</code>, this will now be interpretted as a format
string.</li>
<li>EnumDiscriminant now inherits the repr and discriminant values from
your main enum. This makes the discriminant type
closer to a mirror of the original and that's always the goal.</li>
</ul>
<h3>New features</h3>
<ul>
<li>
<p>The <code>VariantArray</code> macro has been added. This macro adds
an associated constant <code>VARIANTS</code> to your enum. The constant
is a <code>&'static [Self]</code> slice so that you can access all
the variants of your enum. This only works on enums that only
have unit variants.</p>
<pre lang="rust"><code>use strum::VariantArray;
<p>#[derive(Debug, VariantArray)]
enum Color {
Red,
Blue,
Green,
}</p>
<p>fn main() {
println!("{:?}", Color::VARIANTS); // prints:
["Red", "Blue", "Green"]
}
</code></pre></p>
</li>
<li>
<p>The <code>EnumTable</code> macro has been <em>experimentally</em>
added. This macro adds a new type that stores an item for each variant
of the enum. This is useful for storing a value for each variant of an
enum. This is an experimental feature because
I'm not convinced the current api surface area is correct.</p>
<pre lang="rust"><code>use strum::EnumTable;
</code></pre>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/Peternator7/strum/commits/v0.26.2">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=strum&package-manager=cargo&previous-version=0.25.0&new-version=0.26.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: e3add1ec70f4a1ba2d8a25ef953dde94f5c8ea66
Bumps [nonempty](https://github.com/cloudhead/nonempty) from 0.8.1 to
0.10.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/cloudhead/nonempty/commits">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nonempty&package-manager=cargo&previous-version=0.8.1&new-version=0.10.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: 11c6454b5e7e9877b52075f0e0efe6839ecf3be1
## Description
This PR iterates on #459.
Rather than serving the engine metadata it serves an arbitrary file,
given by the command line argument `--introspection-metadata`.
Specifying this argument gives rise to endpoints `/metadata` and
`/metadata-hash`.
![image](https://github.com/hasura/v3-engine/assets/358550/63040f02-876a-4c29-8cf1-52a305ffff67)
Update: We only load the file in at engine startup and serve that
version. Changing the file on disk will not change what the engine
serves.
---------
Co-authored-by: Gil Mizrahi <gil@gilmi.net>
V3_GIT_ORIGIN_REV_ID: db88adb5c08c4489cc1abd5fb5236b8d5ba51b9a
<!-- Thank you for submitting this PR! :) -->
## Description
Previously we moved all our types around in one big bucket, meaning we
often had to check we had the thing we wanted, this splits it up so
dependencies are more granular and clearer.
This means instead of passing `types` around, we'll have both
`scalar_types` or `object_types`. Usually just `object_types` though.
V3_GIT_ORIGIN_REV_ID: 6a6b8d6265b0391f8910f3d4f8932ad151453c18
<!-- Thank you for submitting this PR! :) -->
## Description
As per https://github.com/hasura/v3-engine/pull/450, break out creation
of `data_connectors` info (and related types) into it's own files.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 7a8d445217a4fac2bbb135aa48baa20a0789e785
This injects trace context headers into requests to the auth hook,
allowing us to figure out how much time is spent here.
I added a basic tracing setup to the dev-auth-webhook, using
`tracing-util`, allowing me to verify that this works. This required
moving the Dockerfile to the root so the context contains the
`tracing-util` crate too.
I have also fixed the reference agent (by updating it), and patched our
Docker Compose files to correctly set up connectivity to Jaeger.
V3_GIT_ORIGIN_REV_ID: 2ff930bda4147d00dcc73268a814b08c8a07a359
<!-- Thank you for submitting this PR! :) -->
## Description
This is an attempt to somewhat document how roles / annotations work in
`v3-engine`. The main purpose of this exercise was to solidify my
understanding, so I would very much welcome any corrections.
V3_GIT_ORIGIN_REV_ID: 28600998c8a01ef7f95198b44b875f4f14873793
<!-- Thank you for submitting this PR! :) -->
## Description
I needed this, so I made it. It's nothing too complex: we just
pretty-print the `schemars` schema for the root `Metadata` type.
<!--
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)_
- [ ] 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: a9e75bfa06c35577c17d8cbf0d021b1f56826a28
<!-- Thank you for submitting this PR! :) -->
## Description
Further breaking up the big error type. Functional no-op.
V3_GIT_ORIGIN_REV_ID: d34acb7fd6421c250c214b133b8a107e03155c70
<!-- Thank you for submitting this PR! :) -->
## Description
Resolving metadata is pretty messy, so we're breaking it into more
explicit steps. This breaks out the first, and arguably most trivial
step.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: eca1ce3276f826e769ac4a29d62504542e41848d
Generate default `deprecationReason` in GraphQL schema for OpenDd
metadata marked as deprecated without a reason.
V3_GIT_ORIGIN_REV_ID: 6979bd264b5c11d24b6c634115b6fbd8405a5ba6
<!-- Thank you for submitting this PR! :) -->
## Description
More work to break down the giant `Error` type in metadata resolve step.
Functional no-op.
V3_GIT_ORIGIN_REV_ID: 8cfa4ad0bef254e93241d254123910bf3d5357f3
<!-- Thank you for submitting this PR! :) -->
## Description
Following the approach taken here:
https://github.com/hasura/ndc-postgres/pull/402
This moves the `clippy` settings into the Cargo workspace file instead
of passing them for each invocation.
We enable all pedantic settings, run `cargo clippy --fix` to auto fix a
few things, and then manually disable all other lints.
Plenty of them are worth enabling and fixing in future IMO.
---------
Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: aa0e6ccb8d72a7393e14b5c58b82077a67d9cb15
<!-- Thank you for submitting this PR! :) -->
## Description
- Update to `ndc-spec`-`0.1.2`
- Use `ndc_models` since `ndc_client` was removed
- Use `Int32` in `custom_connector` everywhere
<!--
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?
-->
V3_GIT_ORIGIN_REV_ID: 00c6e7a6c213ab0de31303a93f8446c1d371c538
<!-- Thank you for submitting this PR! :) -->
# ⚠️ Behaviour change in query execution
## Description
<!--
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?
-->
This PR fixes a bug (different behaviour from v2) with boolean
expressions.
Slack thread:
https://hasurahq.slack.com/archives/C066TKMH79R/p1711987325682919
JIRA: https://hasurahq.atlassian.net/browse/V3ENGINE-67
## 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: 4fcfc16a9a88ed6362315ca2f47911e0c97b7829
<!-- Thank you for submitting this PR! :) -->
## Description
Fix a bug which was causing an internal error when `null` was returned
by NDC for a field of array or object type.
### 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 a bug which was causing an internal error when `null` was returned
by NDC for a field of array or object type.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 5c935ccd6720b5e5966dfa87c2e21dbb7a2b36f2
- Introduce a field in NDC `Configuration` struct that carries an
optional limit (`usize`) value.
- When set, reject NDC response that is greater than the limit.
- Define a `HttpContext` struct that captures both `reqwest::Client` and
an optional limit value. Replace the `http_client` argument with
`http_context: &HttpContext` in all execute related functions.
- The `execute_query` function caller in multitenant code need to pass a
reference to `HttpContext` with appropriate NDC response size limit.
V3_GIT_ORIGIN_REV_ID: 85a3647c4d136cc8d887f343736cc011166f036f
<!-- Thank you for submitting this PR! :) -->
## Description
Set our `ndc-postgres` connector in tests to use new mutations versions
so we can test Boolean Expressions. Also does some house-keeping, like
ensuring we pull the latest `ndc-postgres` in CI and exposing `8080`
from `ndc-postgres` to fix local dev flow.
V3_GIT_ORIGIN_REV_ID: 4c92670e9976a3f75ec31e1224079799380ef6e2
<!-- Thank you for submitting this PR! :) -->
## Description
We'll shortly be adding `BooleanExpression` to `ValueExpression`, which
will require resolving the internal `ModelPredicate`. This PR adds a
resolving step for `ValueExpression` to simplify that later step. It is
essentially a no-op to introduce a new type.
V3_GIT_ORIGIN_REV_ID: 8bfe4a180e12ae50d8f131072886054c0e618ec4
- Move redundant code in `client.rs` into a separate function.
- Doc utility functions through comments
V3_GIT_ORIGIN_REV_ID: f172ec2309b48c627f4ab9179efcb4c278e82989
This seems appropriate now that we've stabilized the new configuration.
Of note are the configuration updates and the use of an environment
variable to specify the connection URI. This upgrade also fixes the
health checks.
Regenerating the configuration lost the table descriptions, which seems
to be because they were not present in the Chinook SQL. I have dragged
the Chinook SQL in from ndc-postgres and kept it separate from the
initialization of other tables.
The auto-generated configuration is slightly different from the
manually-created configuration in that the collection names are
singular, not plural. This means that I had to change a lot of test
metadata files too.
V3_GIT_ORIGIN_REV_ID: 2b66fd3049aaf4daeb386915ea3b64a209b1f393
- Adds titles to json schemas where missing
- Adds tests to ensure we don't miss titles in the future (modulo some
exceptions)
This is required to be able to autogenerate the docs for the metadata
V3_GIT_ORIGIN_REV_ID: e2027f3e3d5ee3546af99ff5c2d6de59604a3aec
Ref: https://github.com/hasura/ndc-spec/pull/130
- Avoid using NDC client code from ndc-spec for ndc API requests.
Instead, copy the client related code from ndc-spec into v3-engine.
- Code is copied into `.../execute/ndc/client.rs` module with the
following changes:
- API, configuration and error type related code is consolidated into a
single `client.rs` module.
- Derive error implementation for the error type using
`thiserror::Error` derive-macro
- Replace `opentelemetry` crate usage with `tracing_util` with necessary
changes
- Lot of redundant logic still there which will be addressed through
https://hasurahq.atlassian.net/browse/APG-53
V3_GIT_ORIGIN_REV_ID: 5766e407495c483cc4814d1286121b233aed3af0
I am struggling to diagnose some errors and `.unwrap` is not helping, as
it doesn't properly capture stack traces or anything else that might be
useful.
`anyhow` was built for this. Let's use it.
I had to convert `SessionError` to a real `Error`, which I don't think
is a bad thing.
V3_GIT_ORIGIN_REV_ID: 3b8a70bb87e12e7b9e39515cd5f769fbd2cbfb39
<!-- Thank you for submitting this PR! :) -->
## Description
When I run `cargo fmt` on my branches, it makes more diff than I want.
This PR fixes that by adding `just format` / `just fmt`, and adding it
to a CI job.
<!--
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)_
- [ ] 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: e31e352f27b9ad0129c3759fead051b1a8d86758
## Description
Listening on `0.0.0.0` only binds to IPv4 addresses. We can listen on
IPv4 and IPv6 by using `::`.
I have opted to use the constants for this rather than parsing a string,
both for clarity and to avoid errors.
## 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
- [ ] 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
-->
The v3 engine now binds to all IPv4 and IPv6 addresses. Previously it
only used IPv4.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: d63b5544bfbf2ad067113980fa61dd74213c7b78
If we're running a mockito server in async tests, we must use
`new_async`.
The latest version enforces this.
V3_GIT_ORIGIN_REV_ID: cb58f248336c7bab08329d311b8b97b8244437a1