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

feat: Make schema file path configurable in router registry plugin #3751

Conversation

thrawny
Copy link

@thrawny thrawny commented Jan 4, 2024

Background

Make it easier to as non root by allowing the user to specify where to download the supergraph schema file from the hive cdn. Typically, /tmp is writable and is a suitable place to download the file to. Alternatively, if using kubernetes, one could create an emptyDir volume and download the schema file to there.

Description

The change affects the router rust package, specifically the registry module.

Checklist

  • Input validation
  • Output encoding
  • Authentication management
  • Session management
  • Access control
  • Cryptographic practices
  • Error handling and logging
  • Data protection
  • Communication security
  • System configuration
  • Database security
  • File management
  • Memory management
  • Testing

Copy link

changeset-bot bot commented Jan 4, 2024

⚠️ No Changeset found

Latest commit: 8794de5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -76,6 +79,12 @@ impl HiveRegistry {
}
}

if config.schema_file_path.is_none() {
if let Ok(schema_file_path) = env::var("HIVE_CDN_SCHEMA_FILE_PATH") {
Copy link

Choose a reason for hiding this comment

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

I think you should update the docs too!

  • Document new env var HIVE_CDN_SCHEMA_FILE_PATH
  • Document new config option schema_file_path
  • Add schema_file_path to the commented router.yaml - not sure if this is a docs only thing or actually part of the code bootstrapping the config too?

Copy link
Author

Choose a reason for hiding this comment

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

schema_file_path cant be configured in router.yaml, since this is not a router plugin

Copy link
Author

Choose a reason for hiding this comment

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

did update the docs regarding the new env var

@thrawny thrawny force-pushed the router-registry-plugin-configurable-schema-path branch from ef69936 to 8794de5 Compare January 5, 2024 13:25
@kamilkisiela kamilkisiela merged commit 1e78334 into graphql-hive:main Jan 9, 2024
23 of 29 checks passed
kamilkisiela added a commit that referenced this pull request Jan 9, 2024
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