KarrLab / datanator_frontend

Graphical web-based interface for the Datanator toolkit for discovering data for modeling cells
https://datanator.info
MIT License
1 stars 1 forks source link

Dev branch deploy preview on Netlify no longer uses testapi.datanator.info #292

Closed lzy7071 closed 4 years ago

lzy7071 commented 4 years ago

Example: API calls made in https://5eefe4ccb11f51000794e165--datanator.netlify.app/search/atp%20/Escherichia%20coli%20E1002/ are sent to api.datanator.info instead of testapi.datanator.info. Could commit 3d977113780608597dac508168cce575b9b3b890 be the cause? I added projection functionality in test REST API as discussed in the mail. I changed the corresponding files in datanator_frontend to reflect the changes in REST API. I tried testing the frontend locally on my computer but the Reaction category for some reason refuses to work, either on dev branch or master branch. Attached is the error prompt and the calls made when frontend is run locally on either dev branch or master branch. tempsnip If I cannot be sure that the new testapi will work on the frontend, I will not deploy the changes to production API at api.datanator.info. The changes that incorporate projection in FTX can be tested on testapi.datanator.info here

jonrkarr commented 4 years ago

I haven't changed the REST API address. I did comment out the netlify-cli commands because the cli is not installing anymore. My best guess is that the new version of one of the dependencies is problematic.

lzy7071 commented 4 years ago

I haven't changed the REST API address. I did comment out the netlify-cli commands because the cli is not installing anymore. My best guess is that the new version of one of the dependencies is problematic.

I see. When the build was done by netlify-cli, one can set NODE_ENV so the final build/ folder should have the correct API endpoint. It seems Netlify treats all deployments with the same build command so I don't see an obvious way to set up separate NODE_ENV (development, test, or production) for branch-based deployments. I'll look into why netlify-cli is not installing anymore.

jonrkarr commented 4 years ago

I changed the Netlify build to use scripts/deploy.sh (this can also be called via npm run deploy). I'll change script this to use the development environment for non-master branches. Netlify sets a few environment variables which I can use to implement this (see docs).

Regarding netlify-cli, I'm not sure what's going on. I'm having trouble installing it on my local machine as well.

jonrkarr commented 4 years ago

I'm trying to debug the other errors I introduced over the last couple days. Hopefully I'll push this in a few minutes.

jonrkarr commented 4 years ago

I haven't figured out the netlify-cli issue, but I can install it locally as a local package (i.e., without the -g option). I'll add netlify-cli as a dev dependency and uncomment the netlify building in the CircleCI config.

jonrkarr commented 4 years ago

I think I got everything fixed. @lzy7071, close the issue if you agree.

lzy7071 commented 4 years ago

I think I got everything fixed. @lzy7071, close the issue if you agree.

I'm going to try running it locally. This might be a different issue but the production site https://www.datanator.info is still using the old endpoints where FTX does not project out irrelevant fields.

lzy7071 commented 4 years ago

I think I got everything fixed. @lzy7071, close the issue if you agree.

master branch can be run locally with no issue now.