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

Pytests failing locally; not on arax.ncats.io (I think) #1900

Closed
amykglen opened this issue Aug 17, 2022 · 24 comments
Closed

Pytests failing locally; not on arax.ncats.io (I think) #1900

amykglen opened this issue Aug 17, 2022 · 24 comments

Comments

@amykglen
Copy link
Member

amykglen commented Aug 17, 2022

strangely, since merging NewFmt into master this afternoon, a bunch of pytests now seem to fail for me locally in master, complaining with this error from ARAX_query.py:

pytest -vsk test_curie_list_query
 .....
            # Fill out the message with data
            response.envelope.status = response.error_code
            response.envelope.description = response.message
            if response.envelope.operations is None:
                response.envelope.operations = operations
    
            #### Provide the total results count in the Response if it is available
            try:
                response.envelope.total_results_count = response.total_results_count
            except:
                pass
    
            #response.envelope.operations['actions'] = operations.actions
    
            # Update the reasoner_id to ARAX if not already present
            for result in response.envelope.message.results:
                if result.reasoner_id is None:
                    result.reasoner_id = 'ARAX'
    
            # Store the validation and provenance metadata
            trapi_version = '1.2.0'
            try:
                validate(response.envelope,'Response',trapi_version)
                if 'description' not in response.envelope or response.envelope['description'] is None:
                    response.envelope['description'] = 'reasoner-validator: PASS'
                response.envelope['validation_result'] = { 'status': 'PASS', 'version': trapi_version, 'message': '' }
    
            except ValidationError as error:
                timestamp = str(datetime.now().isoformat())
>               if 'logs' not in response.envelope or response.envelope['logs'] is None:
E               TypeError: argument of type 'Response' is not iterable

../ARAXQuery/ARAX_query.py:864: TypeError

I tried out this same query on arax.ncats.io/test, and it seems to complete without errors there (https://arax.ncats.io/test/?r=56728), so I'm assuming the other failing queries are probably ok on arax.ncats.io as well. not sure what might be going on? (@edeutsch)
I don't have any local changes, so that couldn't be the cause.

@edeutsch
Copy link
Collaborator

oh, oops, thanks, this is my issue. I was rushing to resolve a conflict before my next meeting and botched it. will fix.

edeutsch pushed a commit that referenced this issue Aug 17, 2022
@edeutsch
Copy link
Collaborator

Did that push fix your problem?

@edeutsch
Copy link
Collaborator

So I think I fixed it, and devLM is now up and running fine as far as I can tell, but I did get another Run Failed message, so there may still be a problem on ITRB

@amykglen
Copy link
Member Author

hm, ok, I'll check on ITRB

@amykglen
Copy link
Member Author

it seems to be working for me locally

@amykglen
Copy link
Member Author

amykglen commented Aug 18, 2022

huh, yeah ITRB CI ARAX and KG2 seem unhappy, even though Jenkins says they successfully built at about 5:30pm

on arax.ci.transltr.io:

Screen Shot 2022-08-17 at 5 35 48 PM

@amykglen
Copy link
Member Author

strangely, I'm seeing a different error on kg2.ci.transltr.io:

Screen Shot 2022-08-17 at 5 37 37 PM

@amykglen
Copy link
Member Author

do we see these errors when rolling out the current master to our arax.ncats.io endpoints? I'm guessing we would?

@edeutsch
Copy link
Collaborator

So I just did a rollout of master to /test, expecting there to be nothing new, but instead there was lots new:

 .github/workflows/pytest.yml                                            |  5 +++--
 code/ARAX/ARAXQuery/ARAX_database_manager.py                            | 25 +++++++++++++++++++++++--
 code/ARAX/ARAXQuery/ARAX_infer.py                                       | 16 ++++++++++++----
 code/ARAX/ARAXQuery/ARAX_query.py                                       | 25 ++++++++++++++++++++++---
 code/ARAX/ARAXQuery/Overlay/GraphSage_train/py_scripts/BuildMapID.py    | 18 +++++++++++++++---
 code/ARAX/test/test_ARAX_expand.py                                      |  1 +
 code/RTXConfiguration.py                                                |  3 ---
 code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml | 10 +++++-----
 code/UI/interactive/cytoscape.min.js                                    | 11 +----------
 code/UI/interactive/rtx.js                                              |  7 +++++--
 code/UI/interactive/rtx.version                                         |  2 +-

But now when I go to test:
https://arax.ncats.io/test/

I see:
image
which is new.

and I also don't get the usual tabs:
image

So I think Luis and I need to do some troubleshooting tonight.
Some is definitely wrong with master. Will fix.

@edeutsch
Copy link
Collaborator

okay, a change has been pushed to master fixing my observed problem above.
But it's not obvious that that would fix itrb

@amykglen
Copy link
Member Author

nice! huh, so https://kg2.ci.transltr.io/ is now working normally, apparently.

but https://arax.ci.transltr.io/ is still unhappy. complaining about ERROR: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. (without starting query processing).

@amykglen
Copy link
Member Author

amykglen commented Aug 18, 2022

aha! so after arax.ci.transltr.io finished rebuilding from the latest commit in master (at about 8:40pm pacific), now it seems to work!

although strangely its request to get KG2's meta knowledge graph during my query failed, so it doesn't have results from KG2. not sure why that was. guessing it was bad timing, when KG2 was very briefly down (for a few seconds I think) during the auto-deployment?

@amykglen
Copy link
Member Author

amykglen commented Aug 18, 2022

and now even it's query of KG2 seemed to work! magically. (https://arax.ci.transltr.io/?r=56843) so I think we're all good again!

@edeutsch
Copy link
Collaborator

hmm, I'm not getting ci to work..
https://arax.ci.transltr.io/api/arax/v1.3/ui/

@amykglen
Copy link
Member Author

really? the UI just worked for me https://arax.ci.transltr.io

@edeutsch
Copy link
Collaborator

yes, but does this work? https://arax.ci.transltr.io/api/arax/v1.3/ui/

@edeutsch
Copy link
Collaborator

It's a bit of a mystery why the UI works if that API url doesn't work...

@amykglen
Copy link
Member Author

yeah, that's strange...

@amykglen
Copy link
Member Author

does that page ever work for the ITRB instances? it also seems not to work for the Prod ITRB ARAX v1.2:

https://arax.transltr.io/api/arax/v1.2/ui/

@edeutsch
Copy link
Collaborator

oh, maybe the Dockerfile doesn't install the UI widget. if everything else works, then we're good.

@edeutsch
Copy link
Collaborator

I think sometimes doing a pip3 install -r requirements.txt skips this one:

connexion[swagger-ui]

for some unknown reason

@amykglen
Copy link
Member Author

oh strange. I just confirmed that directly curl querying the ITRB ARAX CI API works. so I think we're ok?

curl -X 'POST' \
  'https://arax.ci.transltr.io/api/arax/v1.3/query' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "message": {
    "query_graph": {
      "edges": {
        "e00": {
          "object": "n01",
          "predicates": [
            "biolink:physically_interacts_with"
          ],
          "subject": "n00"
        }
      },
      "nodes": {
        "n00": {
          "ids": [
            "CHEMBL.COMPOUND:CHEMBL112"
          ]
        },
        "n01": {
          "categories": [
            "biolink:Protein"
          ]
        }
      }
    }
  }
}'

@edeutsch
Copy link
Collaborator

yes, I agree, we're good! thank you!

@amykglen
Copy link
Member Author

awesome! I'll close this issue out then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants