Open wvandeun opened 3 months ago
It seems that the first part of this issue has been taken care of when we fixed error handling in infrahubctl
. The second part where we have String cannot represent a non-string value
error, is something that needs addressing in the backend. This is actually the raw error from the GraphQL API. Should we relocate this issue to the backend repo?
It seems that the first part of this issue has been taken care of when we fixed error handling in
infrahubctl
. The second part where we haveString cannot represent a non-string value
error, is something that needs addressing in the backend. This is actually the raw error from the GraphQL API. Should we relocate this issue to the backend repo?
Yes
Component
Python SDK
Infrahub version
0.12.1
Current Behavior
infrahubctl generator
command seems to swallow useful information when you run into some error conditions:when you access a non existing key in a dictionary you get an error message blabla in this case is the string value of the key we tried to access
when you pass a wrong type to a filter for a graphql query using the
client.get
methodIn a large generator script it could be hard to figure out where exactly these conditions happened. Using
--debug
does not seem to provide more information.Expected Behavior
--debug
could provide us the complete exception / tracebackSteps to Reproduce
testing_targets
in Infrahub.infrahub.yml
config file with this contentsgenerators/testing.py
class Generator(InfrahubGenerator): async def generate(self, data: dict) -> None: print(data["invalid key"])
infrahubctl generator testing
generators/testing.py
infrahubctl generator testing
Additional Information
No response