Closed vgardner-renci closed 3 years ago
{
"callback": "http://0.0.0.0:8000/ars/api/messages/4d831953-06d0-475f-836a-ebf1293fe968",
"logs": [
{
"level": "INFO",
"message": "ARS info: Field: 'QNode/categories' must be array of CURIESs (TRAPI 1.1)."
},
{
"level": "INFO",
"message": "ARS info: tr_ars.Server: nginx"
},
{
"level": "INFO",
"message": "ARS info: tr_ars.Date: Thu, 15 Jul 2021 16:16:38 GMT"
},
{
"level": "INFO",
"message": "ARS info: tr_ars.Content-Type: text/plain;charset=utf-8"
},
{
"level": "INFO",
"message": "ARS info: tr_ars.Content-Length: 63"
},
{
"level": "INFO",
"message": "ARS info: tr_ars.Connection: keep-alive"
},
{
"level": "INFO",
"message": "ARS info: tr_ars.Last-Modified: Thu, 15 Jul 2021 16:16:38 GMT"
},
{
"level": "INFO",
"message": "ARS info: tr_ars.reason: Bad Request"
},
{
"level": "INFO",
"message": "ARS info: tr_ars.url: https://unsecret.ncats.io/query"
}
],
"max_results": 100,
"message": {
"query_graph": {
"edges": {
"e01": {
"object": "n1",
"subject": "n0"
}
},
"nodes": {
"n0": {
"categories": [
"biolink:Gene"
],
"ids": [
"NCBIGene:23221"
]
},
"n1": {}
}
}
},
"validation_result": {
"message": "Returned response is not TRAPI: Field: 'QNode/categories' must be array of CURIESs (TRAPI 1.1).",
"size": "1 kB",
"status": "NA",
"version": "1.1.1"
}
}
Current TRAPI server expects array of CURIEs but it gets a single CURIEs. TRAPI allows single CURIEs, Will need to update the code to accommodate for that. There maybe parsing issue as well. Revisit next week.
I was able to get the error trace, below. Looks like our TRAPI server is treating '#f' (the 'false' value in Racket) as an array of CURIEs. I need to track down why #f is coming from, and also ensure the code checks for extraneous '#f' values.
(base) webyrd@Williams-MBP medikanren2 % racket server.rkt
loading configuration defaults: /Users/webyrd/github/mediKanren/medikanren2/config.defaults.scm
loading configuration overrides: /Users/webyrd/github/mediKanren/medikanren2/config.scm
checking for index /Users/webyrd/github/mediKanren/medikanren2/data/semmed/cprop/concept-name-index.bytes
checking for index /Users/webyrd/github/mediKanren/medikanren2/data/rtx2/20210204/cprop/concept-name-index.bytes
loading configuration defaults: /Users/webyrd/github/mediKanren/medikanren2/config.defaults.scm
loading configuration overrides: /Users/webyrd/github/mediKanren/medikanren2/config.scm
Your Web application is running at http://localhost:8384.
Stop this program at any time to terminate the Web Server.
cpu time: 9 real time: 36374 gc time: 0
cpu time: 6 real time: 97 gc time: 0
cpu time: 19 real time: 36476 gc time: 0
2021-07-22T11:44:37 1626968641 INFO Broad response:
#"HTTP/1.1 200 OK"
2021-07-22T11:44:37 1626968641 INFO Headers: (#"Server: nginx" #"Date: Thu, 22 Jul 2021 15:44:37 GMT" #"Content-Type: application/json" #"Content-Length: 98869" #"Connection: close" #"Access-Control-Allow-Origin: *" #"Access-Control-Allow-Methods: GET, POST, OPTIONS" #"Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range" #"Access-Control-Expose-Headers: Content-Length,Content-Range")
2021-07-22T11:44:37 1626968641 INFO Broad result size: 101
2021-07-22T11:44:37 1626968641 INFO Query received: {"query_graph":{"edges":{"e01":{"object":"n1","subject":"n0"}},"nodes":{"n0":{"categories":["biolink:Gene"],"ids":["NCBIGene:23221"]},"n1":{}}}}
2021-07-22T11:44:38 1626968641 INFO Subclasses/synonyms of ("NCBIGene:23221") [cpu time: 813 real time: 822]: ("NCBIGene:23221" "ENSEMBL:ENSG00000008853" "OMIM:607352" "UniProtKB:Q9BYZ6" "HGNC:18756")
Field: 'QNode/categories' must be array of CURIESs (TRAPI 1.1).
Given #f
context...:
/Users/webyrd/github/mediKanren/medikanren2/trapi.rkt:125:4: loop
/Users/webyrd/github/mediKanren/medikanren2/dbk/dbk/syntax.rkt:75:33
/Users/webyrd/github/mediKanren/medikanren2/dbk/dbk/constraint.rkt:792:19
/Users/webyrd/github/mediKanren/medikanren2/dbk/dbk/constraint.rkt:783:0: bis:bind
/Users/webyrd/github/mediKanren/medikanren2/dbk/dbk/constraint.rkt:785:24
/Users/webyrd/github/mediKanren/medikanren2/dbk/dbk/stream.rkt:79:19
/Users/webyrd/github/mediKanren/medikanren2/dbk/dbk/stream.rkt:52:19
/Users/webyrd/github/mediKanren/medikanren2/dbk/dbk/stream.rkt:35:0: s-take/steps
/Users/webyrd/github/mediKanren/medikanren2/trapi.rkt:80:0: trapi-response
/Users/webyrd/github/mediKanren/medikanren2/server.rkt:309:6
Traced the error to an unhandled case in which neither categories nor ids (CURIEs) are specified for a node. Working on implementing the missing case.
I added the missing case, tested it locally on my machine, checked in the code, and pushed the updated code to our new ITRB CI/CD endpoint:
https://medikanren-trapi.ci.transltr.io
We should now handle this workflow, and probably others that were returning errors.
Hmmm...I'm running into an intermittent error on the ITRB CI/CD endpoint, but not locally. Investigating...
Got ITRB to fix the problem of multiple Kubernetes pods with different versions of code being run at the same time. Our new endpoint's code should fix this problem:
Returns answers cleanly when I run the query now.
https://arax.ncats.io/?source=ARS&id=df3f226a-571a-4219-ba5e-a37b7040ee18
No predicates or categories, CURIE on subject