For anyone else that runs into this problem, we've coded a workaround for now:
wedge_object = WedgeAddress(self.logger, self.hq_credentials)
wedge_addresses = await wedge_object.get(short_name=self.extension_name)
if wedge_addresses:
config_json = json.loads(wedge_addresses[0].Config.text)
cognito_url = config_json['Cognito_Url']
Hello Chris,
I would need some more informaton. I would need how you are calling self.wedge_address_configs and the full stack trace. I would expect: self.wedge_address_configs['Cognito_Url'] to work.
Looking at the SDK code:
def _validate_db_configs(self, db_config_list: DbConfigList):
"""
Raises exception if required WEDGE_ADDRESS_CONFIGS are not set
"""
bad_config = False
# Sanity-check the config to make sure all expected keys are now set.
for key in [x.name for x in self.WEDGE_ADDRESS_CONFIGS.required]:
if key not in db_config_list:
bad_config = True
self.logger.error('Q2_WedgeAddress.Config missing key: %s.' % key)
# If anything went wrong, fail.
if bad_config:
self.logger.error(
'DbConfigs Misconfigured. Try running `q2 update_installed -e %s`' % (
self.extension_name
)
)
raise exceptions.ConfigurationError('Q2_WedgeAddress.Config Misconfigured')
So the only way that error can happen is if the key is not in the db_config
Traceback (most recent call last):
File "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/tornado/web.py", line 1713, in _execute
result = await result
File "./IntervalSSORequestHandler/extension.py", line 94, in get
cognito_url = self.wedge_address_configs['Cognito_Url']
File "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/q2_sdk/core/http_handlers/hq_handler.py", line 147, in wedge_address_configs
return self.db_config
File "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/q2_sdk/core/http_handlers/hq_handler.py", line 156, in db_config
self._validate_db_configs(_db_config)
File "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/q2_sdk/core/http_handlers/hq_handler.py", line 142, in _validate_db_configs
raise exceptions.ConfigurationError('Q2_WedgeAddress.Config Misconfigured')
q2_sdk.core.exceptions.ConfigurationError: Q2_WedgeAddress.Config Misconfigured