Add from_env
to dataconnector config (fix #9777)
#10077
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR enables
backend_configs.yaml
to specify data connector URIs through environment variables. As discussed in #9777, this use-case is particularly helpful for organizations who deploy the same configuration to multiple Hasura environments and utilize environment variables for env-specific arguments.Apologies in advance for any Haskell-specific errors, this is my first time working with the language.
Changelog
Component : server
Type: enhancement
Product: community-edition
Short Changelog
Creates a new data object,
DataConnectorUri
, that can be eitherBaseUrl
or afrom_env
string. Calling objects use a new parsing function,resolveDataConnectorUri
, to recover the originalBaseUrl
.Steps to test and verify
This has been tested by running hasura/weaviate_gdc in a container, starting Hasura with an env var set to the new (i.e.
WEAVIATE_GDC_HOST=http://localhost:8100
), then using the Hasura CLI to deploy new metadata with the followingbackend_config.yaml
Limitations, known bugs & workarounds
No frontend considerations have been made.
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
run_sql
auto manages the new metadata through schema diffing?run_sql
auto manages the definitions of metadata on renaming?export_metadata
/replace_metadata
supports the new metadata added?GraphQL
Breaking changes
No Breaking changes
There are breaking changes:
Metadata API
Existing
query
types:args
payload which is not backward compatibleJSON
schemaGraphQL API
Schema Generation:
NamedType
Schema Resolve:-
null
value for any input fieldsLogging
JSON
schema has changedtype
names have changed