Skip to content
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

Rename reporting plugin to telemetry #651

Merged
merged 8 commits into from
Mar 15, 2022
Merged

Conversation

BrynCooke
Copy link
Contributor

@BrynCooke BrynCooke commented Mar 15, 2022

Renames reporting to telemetry

Also fixes related json schema generation.

Also allows plugins section to be empty by making the map inside UserPlugins optional.

@github-actions

This comment has been minimized.

bryn added 2 commits March 15, 2022 11:04
As we are now inlining subschemas the generation does not need to include references.
@netlify
Copy link

netlify bot commented Mar 15, 2022

❌ Deploy Preview for apollo-router-docs failed.

🔨 Explore the source changes: 2692eaf

🔍 Inspect the deploy log: https://app.netlify.com/sites/apollo-router-docs/deploys/623081a0a86327000929f54e

bryn added 2 commits March 15, 2022 12:39
This way we can leave a plugins section in the config but have it empty.
@@ -131,26 +133,10 @@ impl FromStr for Configuration {
}

fn gen_schema(plugins: schemars::Map<String, Schema>) -> Schema {
let plugins_refs = plugins
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is no longer needed because we switched to incline schemas.

})),
subschemas: Some(Box::new(SubschemaValidation {
any_of: Some(plugins_refs),
additional_properties: Option::Some(Box::new(Schema::Bool(false))),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do however want to prevent random new properties being added.

@BrynCooke BrynCooke requested a review from a team March 15, 2022 13:33
@@ -79,6 +79,7 @@ struct Rhai {
}

#[derive(Deserialize, JsonSchema)]
#[serde(deny_unknown_fields)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🙏

@BrynCooke BrynCooke merged commit 1d45576 into main Mar 15, 2022
@BrynCooke BrynCooke deleted the bryn/rename-reporting-telemetry branch March 15, 2022 15:07
@abernix abernix mentioned this pull request Mar 16, 2022
@abernix abernix added this to the v0.1.0-alpha.9 milestone Mar 16, 2022
@BrynCooke BrynCooke self-assigned this Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants