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

Internal IP address of host vs service name for local federation #7

Closed
1 task done
rmanaem opened this issue Dec 18, 2023 · 2 comments · Fixed by neurobagel/old-query-tool#343
Closed
1 task done
Assignees
Labels
bug:functional Functional defects resulting from feature changes. type:bug Defects in shipped code and fixes for those defects

Comments

@rmanaem
Copy link
Contributor

rmanaem commented Dec 18, 2023

In the local_federation setup, we use localhost for the API_QUERY_URL to refer to the federation API running on the host machine, This works fine for the requests made by clicking the submit query on the query tool interface from the browser (i.e., client side) but this is an issue for requests made in the fetch hook cycle that are made from the query tool container inside the docker network for which localhost refers to the query tool container. Not the host running the docker compose stack, therefore, requests to retrieve diagnosis, assessments, and nodes fail.

To resolve this

  • neurobagel/query-tool#336

See also #5

@rmanaem rmanaem added bug:performance Performance defects or response time degradation. type:bug Defects in shipped code and fixes for those defects bug:functional Functional defects resulting from feature changes. and removed bug:performance Performance defects or response time degradation. labels Dec 18, 2023
@rmanaem rmanaem self-assigned this Dec 18, 2023
@surchs
Copy link
Contributor

surchs commented Dec 18, 2023

Hey @rmanaem, agree with the problem, but I think the solution here should be to ensure we're not fetching the information during the build step but in one of the post-nuxt lifecycle hooks / on the client-side. Maybe we can have a brief chat today?

edit: the main reason for not fetching during build is that even if we could successfully resolve the locally hosted node-API (e.g. by doing what you are proposing in #336) we would still freeze the node and instance list to what it was at build time. So if after the build step we add a new instance or a new node (or remove one), this would not currently be reflected (at least that's how I understand it). Instead we should fetch this information from the API when a user navigates to the query tool - and at that point the localhost should also resolve correctly.

@rmanaem
Copy link
Contributor Author

rmanaem commented Dec 18, 2023

Let's have a chat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:functional Functional defects resulting from feature changes. type:bug Defects in shipped code and fixes for those defects
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants