neurobagel / planning

MIT License
0 stars 0 forks source link

Set up internal Neurobagel node at BIC `neurobagel-node` #111

Closed alyssadai closed 8 months ago

alyssadai commented 9 months ago

Need root:

alyssadai commented 8 months ago

Some issues encountered:

alyssadai commented 8 months ago

For reviewer

Check out:

See new Docker/Docker Compose troubleshooting tips documented here, based on encountered problems that were resolved: https://github.com/neurobagel/documentation/wiki/Docker#troubleshooting-dockerdocker-compose-recipes

Some things learned about our own tools/machines:

On neurobagel-node and st-viateur:

(Query tool)

  1. When our local_federation Compose recipe is used, the resulting query tool cannot access the f-API when API_QUERY_URL is set to localhost:<fAPI port on host>, even though this is the default recommended in https://neurobagel.org/federate/#fedenv
    • also doesn't work: using the container name federation with the internal port, or host.docker.internal with the published port
    • Instead, API_QUERY_URL must be set to the public IP of the machine on which the f-API is running (followed by the <fAPI port on host>), or the subdomain for the f-API if NGINX is set up on the machine
  2. The latest image has not been updated following the breaking change https://github.com/neurobagel/query-tool/pull/343, and as a result cannot fetch the node list from the f-API -> solution is to switch to using nightly image
  3. Fetching of diagnosis + assessment options currently failing:
    • This is likely due to an issue with the latest f-API image
    • The current f-API latest version includes support for the new mixed-response structure for cohort queries (/query/), but not for /attributes/{data_element_URI} queries (which was added after we switched the default tag to nightly) - consequently, it looks like the /attributes/{data_element_URI} route in the image doesn't know how to handle responses of the now-async CRUD function which is used by both endpoints
    • This incompatibility with the query tool makes sense, but what is less good is that the API tests didn't previously clue us into this potential issue (they were still passing after https://github.com/neurobagel/federation-api/pull/55, which switched the CRUD function to be asyncronous, but probably at this point /attributes/{data_element_URI} endpoint already stopped working)
  4. Federated queries succeed (2xx status code in network tab), but query tool doesn't show any results
    • expected as query tool doesn't know how to handle the new response JSON structure yet

(f-API)

On neurobagel-node only:

(UNRESOLVED)

surchs commented 8 months ago

Thanks a lot @alyssadai for digging through all of these issues / debugging the docker networking problems we encountered with this deployment! This will likely be very useful for some users!

Review

Check out:

I think NGINX for the query and federate API is not feeling well.

Within the node API, all query endpoints work correctly - datasets are shown in protected mode as expected!

Thanks very much also for documenting these problems. I think we should start collecting some of these things that are more edge cases / problems that we are not going to build generic solutions for, and then put them in the user docs - e.g. in a FAQ or "Common Problems" section.

@alyssadai, could you please

And then let's close with excitement (our Douglas friends are already inquiring when we're ready for them) -> 🧑‍🍳

alyssadai commented 8 months ago

Thanks Seb!

The query tool and federate API should be working now - I think you tested it the other night just as I was playing around with the .env variables and relaunching containers (which probably wasn't smart timing on my part haha).

Here are the new issues: