-
Notifications
You must be signed in to change notification settings - Fork 9
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
logic to pick API server urls #442
Comments
May be related to https://github.com/biothings/smartapi-kg.js module |
I can start working on this, just wondering when I'm done would I make a pull request on the relevant module? |
correct! If you haven't figured it out already, check with @tokebe on which module this pertains to... |
@colleenXu Could you clarify a few things here, because I'm a little confused with your original post:
|
When I reread this issue, I see it as "can a deployed BTE instance use TRAPI api server urls that match that deployment's x-maturity level"? This is for the TRAPI APIs that are listed in the config file of BTE (aka we ingest them). It seems to me to be a bigger issue than the smartapi-kg package....like maybe there needs to be an environmental variable or something that tells BTE what x-maturity level it's being deployed at? I think we can ignore the non-TRAPI / x-bte APIs, since their x-maturity situations don't map onto whatever Translator/ITRB is doing... For example, imagine our non-ITRB instance (x-maturity:development):
|
More examples: For BTE's ITRB-CI instance (x-maturity:staging):
For BTE's ITRB-test instance (x-maturity:testing):
For BTE's ITRB-prod instance (x-maturity:production):
|
I think it's worth asking if there's still confusion regarding this issue, stuff to consider regarding ITRB and how to make BTE different on different instances, and whether we want to modify the logic I just described in the past 2 posts.... |
@colleenXu If an environment variable is added for the BTE maturity level, I could modify my code to change the priorities of maturity levels based on the BTE maturity level (my code already gives priority to HTTPS if same maturity level). Just had a question, How do I tell if an API is a TRAPI / x-bte API (ie. if the API should be put through the priority system or not)? |
@rjawesome You can use the environment variable |
Alright, I don't think a dev environment variable is necessary as if it isn't ci, test, or prod we can assume it is dev. I was still wondering about how I tell if an API is a TRAPI / x-bte API (ie. if the API should be put through the priority system or not)? |
Closed by automation, reopening until deployed to Prod |
Deployed to prod, marking as completed. |
Right now, when an API (TRAPI or not) is ingested by BTE, BTE picks the first entry in the server list of the SmartAPI yaml.
However, smarter logic would be nice (what if the first entry isn't the production or encrypted url). Also the Translator consortium may want ARAs to be able to query different sets of KP API servers ("production" vs "development" vs "staging").
Here's some ideas for how this logic would work (will have to check the priority of staging vs development):
Example SmartAPI registrations with multiple server urls to pick from:
Note that right now some APIs have separate registrations for their production levels, like ICEES right now...
The text was updated successfully, but these errors were encountered: