Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Get test endpoint is returning pg error #220

Closed
mathnogueira opened this issue Apr 18, 2022 · 2 comments
Closed

Bug: Get test endpoint is returning pg error #220

mathnogueira opened this issue Apr 18, 2022 · 2 comments
Assignees
Labels
backend bug Something isn't working

Comments

@mathnogueira
Copy link
Member

mathnogueira commented Apr 18, 2022

@xoscar found this bug:

Team 😬 I found a bug, when creating a new assertion with something like this:

curl 'http://localhost:3000/api/tests/8111ab71-f8b7-4c4d-99aa-78fe2206081f/assertions' \
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9,es-US;q=0.8,es;q=0.7' \
  -H 'Connection: keep-alive' \
  -H 'Cookie: apollo-server-landing-page-redirect-to-studio-local=true' \
  -H 'Origin: http://localhost:3000/' \
  -H 'Referer: http://localhost:3000/test/8111ab71-f8b7-4c4d-99aa-78fe2206081f' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36' \
  -H 'bypasstbbsplash: any' \
  -H 'content-type: application/json' \
  -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"selectors":[{"propertyName":"service.name","value":"jaeger-server","valueType":"stringValue","locationName":"RESOURCE_ATTRIBUTES"},{"propertyName":"http.method","value":"GET","valueType":"stringValue","locationName":"SPAN_ATTRIBUTES"}],"spanAssertions":[{"locationName":"SPAN_ATTRIBUTES","propertyName":"tracetest.span.duration","comparisonValue":"63179000","operator":"EQUALS","valueType":"intValue"}]}' \
  --compressed

We get a successful 200 response, but when trying to fetch the trace again with:

curl 'http://localhost:3000/api/tests/8111ab71-f8b7-4c4d-99aa-78fe2206081f' \
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9,es-US;q=0.8,es;q=0.7' \
  -H 'Connection: keep-alive' \
  -H 'Cookie: apollo-server-landing-page-redirect-to-studio-local=true' \
  -H 'Referer: http://localhost:3000/test/8111ab71-f8b7-4c4d-99aa-78fe2206081f' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36' \
  -H 'bypasstbbsplash: any' \
  -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --compressed

We get this error back:
"sql exec: pq: invalid input syntax for type uuid: \"\""

@mathnogueira mathnogueira self-assigned this Apr 18, 2022
@mathnogueira mathnogueira mentioned this issue Apr 18, 2022
4 tasks
@mathnogueira mathnogueira added bug Something isn't working backend labels Apr 18, 2022
@mathnogueira
Copy link
Member Author

The root cause of this bug is this test update. The endpoint doesn't specify which result to load, so at the moment of the update, the result is just an empty object without an ID.

@schoren
Copy link
Collaborator

schoren commented Apr 19, 2022

This is fixed by #225

@schoren schoren closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants