jhu-bids / TermHub

Web app and CLI tools for working with biomedical terminologies. https://github.com/orgs/jhu-bids/projects/9/views/7
https://bit.ly/termhub
GNU General Public License v3.0
11 stars 10 forks source link

Bugs on Dev: Comparison reports #869

Open joeflack4 opened 1 month ago

joeflack4 commented 1 month ago

Overview

Both the "N3C Recommended" and "N3C recommended comparison after voc changes" pages are having issues.

Sub-tasks

Details

1. Fix broken page: N3C recommended

Replication:

  1. Go to Help/About
  2. Click "N3C Recommended"
  3. Get blank screen w/ error: TypeError: Cannot read properties of null (reading 'replaceAll')

2. Fix broken link on: "N3C recommended comparison after voc changes"

Replication:

  1. Go to Help/About
  2. Click ""N3C recommended comparison after voc changes"
  3. In the "Compare" column, click one of the hyperlinks where for any entry where there are changes.
  4. Get indefinite "Loading..." w/ errors

At first we were getting 502, but I'm not seeing that anymore.

Error log 1

Log snippets from Chrome: ``` - `GET https://termhub-dev.azurewebsites.net/get-bundle-names? net::ERR_FAILED 502 (Bad Gateway)` - `Error fetching data: Error: AxiosError: Network Error` ```

Now we're getting 422 (logs).

Error log 2 (current)

``` 2024-09-06T20:59:05.7941621Z n3c-comparison-rpt call from: 174.99.50.174 2024-09-06T20:59:05.7941679Z INFO: 169.254.130.2:60220 - "GET /n3c-comparison-rpt?api_call_group_id=30208& HTTP/1.1" 200 OK 2024-09-06T20:59:06.6362318Z http://termhub-dev.azurewebsites.net/concepts?api_call_group_id=30208& 2024-09-06T20:59:06.6363419Z 174.99.50.174:40428; 169.254.130.2 2024-09-06T20:59:06.6363867Z INFO: 169.254.130.2:60220 - "POST /concepts?api_call_group_id=30208& HTTP/1.1" 200 OK 2024-09-06T20:59:08.4437675Z http://termhub-dev.azurewebsites.net/next-api-call-group-id 2024-09-06T20:59:08.4438688Z INFO: 169.254.130.2:60220 - "GET /next-api-call-group-id HTTP/1.1" 200 OK 2024-09-06T20:59:08.4952328Z http://termhub-dev.azurewebsites.net/whoami?api_call_group_id=30209& 2024-09-06T20:59:08.4953107Z http://termhub-dev.azurewebsites.net/concept-graph?api_call_group_id=30209& 2024-09-06T20:59:08.4953181Z INFO: 169.254.130.2:60222 - "GET /concept-graph?api_call_group_id=30209& HTTP/1.1" 422 Unprocessable Entity 2024-09-06T20:59:08.8842236Z curl -H "authorization: TOKEN"\ 2024-09-06T20:59:08.8842312Z -H "Content-type: application/json" \ 2024-09-06T20:59:08.8842357Z 'https://unite.nih.gov/multipass/api/me' 2024-09-06T20:59:08.8842406Z INFO: 169.254.130.2:60220 - "GET /whoami?api_call_group_id=30209& HTTP/1.1" 200 OK ``` The 422 also shows up in [this alternative log](https://termhub-dev.scm.azurewebsites.net/api/vfs/LogFiles/2024_09_05_ln1ldlwk0001KP_default_docker.log), but for some reason doesn't show as much detail

Additional info

Works on local.

Possible solutions: Is there a difference in frontend or backend packages in our local vs what's deployed?

Sigfried commented 6 days ago

I think this is almost fixed, but there's a problem now with compare_opt option where it stays on after going to the compare page and it can mess things up if codeset_ids selected changes. Probably need to get rid of option and just show the comparison if and only if it's precalculated.