tracetest
tracetest copied to clipboard
Provide more information when showing error:
When provisioning a server, an error can be thrown if a resource type is specified that does not exist. We want to show more information in this error so the end user knows which of the resource names are causing the issue. I believe you can duplicate the issue by creating a resource name in a provisioning file which does not exist.
This is the line that needs to be enhanced to give more context about what is causing the error: https://github.com/kubeshop/tracetest/blob/ebbc1e85fb2dfa96f6718389e412d08f9a4266fd/server/provisioning/provisioning.go#L108
This is what the logs currently show when it hits a resource it does not know how to handle:
2023-08-08 07:43:55 2023/08/08 12:43:55 Config file used: /app/tracetest.yaml
2023-08-08 07:43:55 2023/08/08 12:43:55 [provisioning] attempting file: /app/provision.yaml
2023-08-08 07:43:55 2023/08/08 12:43:55 [provisioning] error: invalid resource type from yaml
2023-08-08 07:43:55 tracetest-server v0.11.9 (main)
2023-08-08 07:43:55 Starting
2023-08-08 07:43:55 New install? true
2023-08-08 07:43:55 sending event "Install" (beacon)
2023-08-08 07:43:55 event sent "Install" (beacon)
2023-08-08 07:43:55 OTLP server started on :4317 (grpc) and :4318 (http)