-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce the surface area of the configuration crate. #297
Conversation
This is only relevant for a test suite, so let's put it there.
It's been deprecated.
This allows us to make `occurring_scalar_types` private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some thoughts, but otherwise nice.
justfile
Outdated
@@ -234,6 +234,8 @@ generate-chinook-configuration: build start-dependencies | |||
echo "$(tput bold)$(tput setaf 3)WARNING:$(tput sgr0) Not updating the Aurora configuration because the connection string is unset."; \ | |||
fi | |||
|
|||
./scripts/archive-old-ndc-metadata.sh '{{POSTGRES_V3_CHINOOK_NDC_METADATA}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's much point to keeping these older versions around in this breaking-changes-epoch. (Even this PR makes changes to an archived version, which is non-sensical)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll just remove it.
@@ -15,6 +15,8 @@ use serde::{Deserialize, Serialize}; | |||
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)] | |||
#[serde(rename_all = "camelCase")] | |||
pub struct Metadata { | |||
#[serde(default)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think scalar_types
belong in Metadata
because the set of scalar types is not itself a root observable/introspected entity but instead derived from the column types and comparison operators etc.
I don't think having the set of scalar types be part of the metadata enables any new behaviors for a user, except maybe the ability to provoke the ndc to expose an inconsistent schema (I'm not sure).
IMO it'd be more appropriate to have the scalar types be part of RuntimeConfiguration
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's revert this for now and bring it back once RuntimeConfiguration
is stored rather than re-computed per request.
This reverts commit 65482a4.
We do not want to work with old configurations until the beta release.
What
This makes a few changes to the configuration (version 3) to reduce the surface area.
All changes are refactors.
How
unqualified_schemas
was deprecated and has been removed.set_connection_uri
is only used in tests, so I moved it to the tests.ConfigureOptions
has been moved to its own file to keep things a bit more private.