Component(s)
router
Component version
0.347.1
wgc version
0.130.4
controlplane version
0.249.3
router version
0.347.1
What happened?
Description
Fallback storage URL configuration for the execution config in the router.yaml fails on schema validation errors.
Steps to Reproduce
Configure the router with these settings, copied from https://cosmo-docs.wundergraph.com/router/configuration#example-yaml-config-27 - the fallback-storage tab
storage_providers:
s3:
- id: gcs
endpoint: storage.googleapis.com
bucket: <>
region: eu-west-4
secure: true
access_key: "${S3_ACCESS_KEY_ID}"
secret_key: "${S3_SECRET_ACCESS_KEY}"
cdn:
- id: cdn
url: <>
execution_config:
storage:
provider_id: cdn
fallback_storage:
enabled: true
provider_id: gcs
object_path: <>/routerconfigs/latest.json
Expected Result
The router to work and use the config-setting
Actual Result
The router does not start and throws these error-messages:
Could not load config: errors while loading config files: router config validation error for /config.yaml: jsonschema validation failed with 'https://raw.githubusercontent.com/wundergraph/cosmo/main/router/pkg/config/config.schema.json#'
- at '/execution_config': additional properties 'storage' not allowed
- at '/execution_config/storage': missing property 'object_path'
- at '/execution_config': additional properties 'storage', 'fallback_storage' not allowed
- at '/execution_config': additional properties 'fallback_storage' not allowed
- at '/execution_config': oneOf failed, none matched
- at '/execution_config': oneOf failed, none matched
Environment information
Environment
Running the full stack on self-hosted GKE environment, based on the provided helm-charts.
Router configuration
Router execution config
Log output
Additional context
I was able to work around the error by providing the configuration with environment variables, e.g:
EXECUTION_CONFIG_STORAGE_PROVIDER_ID=cdn
EXECUTION_CONFIG_FALLBACK_STORAGE_ENABLED=true
EXECUTION_CONFIG_FALLBACK_STORAGE_PROVIDER_ID=gcs
EXECUTION_CONFIG_FALLBACK_STORAGE_OBJECT_PATH=<>/routerconfigs/latest.json
It seems that the schema-json is not updated after the fallback-storage was added, I see 2 things missing:
- the fallbackStorage option should always be allowed, next to the 'oneOf'
- if the storage indicated is a CDN, the objectPath should be optional
Component(s)
router
Component version
0.347.1
wgc version
0.130.4
controlplane version
0.249.3
router version
0.347.1
What happened?
Description
Fallback storage URL configuration for the execution config in the router.yaml fails on schema validation errors.
Steps to Reproduce
Configure the router with these settings, copied from https://cosmo-docs.wundergraph.com/router/configuration#example-yaml-config-27 - the fallback-storage tab
storage_providers:
s3:
- id: gcs
endpoint: storage.googleapis.com
bucket: <>
region: eu-west-4
secure: true
access_key: "${S3_ACCESS_KEY_ID}"
secret_key: "${S3_SECRET_ACCESS_KEY}"
cdn:
- id: cdn
url: <>
execution_config:
storage:
provider_id: cdn
fallback_storage:
enabled: true
provider_id: gcs
object_path: <>/routerconfigs/latest.json
Expected Result
The router to work and use the config-setting
Actual Result
The router does not start and throws these error-messages:
Could not load config: errors while loading config files: router config validation error for /config.yaml: jsonschema validation failed with 'https://raw.githubusercontent.com/wundergraph/cosmo/main/router/pkg/config/config.schema.json#'
Environment information
Environment
Running the full stack on self-hosted GKE environment, based on the provided helm-charts.
Router configuration
Router execution config
Log output
Additional context
I was able to work around the error by providing the configuration with environment variables, e.g:
EXECUTION_CONFIG_STORAGE_PROVIDER_ID=cdn
EXECUTION_CONFIG_FALLBACK_STORAGE_ENABLED=true
EXECUTION_CONFIG_FALLBACK_STORAGE_PROVIDER_ID=gcs
EXECUTION_CONFIG_FALLBACK_STORAGE_OBJECT_PATH=<>/routerconfigs/latest.json
It seems that the schema-json is not updated after the fallback-storage was added, I see 2 things missing: