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

Fix automatic database downloads in CICD system's Github actions #1914

Closed
amykglen opened this issue Sep 22, 2022 · 6 comments
Closed

Fix automatic database downloads in CICD system's Github actions #1914

amykglen opened this issue Sep 22, 2022 · 6 comments
Assignees

Comments

@amykglen
Copy link
Member

@sundareswarpullela and I discussed this in detail today - documenting a summary here

we had a step in RTX/.github/workflows/pytest.yml that automatically downloads databases as needed (and deletes old ones as needed) via the ARAX Database Manager; that Database Manager function works correctly but Github actions wasn't able to run it, saying it was unable to import RTXConfiguration. (this step is commented out for now.)

it seems to be that the sys.path.append([abs_path]) method for imports doesn't work for Github actions - it uses a $GITHUB_PATH... though we also weren't successful today when trying to use that.

we have two options for a fix:

  1. resolve the import error
  2. instead run the Database Manager command from within the Docker container and then copy the downloaded databases out to the host machine. we'd likely need to add another Database Manager function that's made for running from within a Docker container... and not sure whether permissions would be an issue when trying to write out of the Docker container.

but before we can work on a fix, we should get set up so we can run Github Actions locally. (which seems to be weirdly hard to do...) this might help? being able to run the actions locally will allow us to do some real debugging..

@amykglen
Copy link
Member Author

this is an example of the import error we get, fyi

https://github.com/RTXteam/RTX/actions/runs/3107811327/jobs/5036326534

amykglen added a commit that referenced this issue Oct 12, 2022
amykglen added a commit that referenced this issue Oct 12, 2022
@amykglen
Copy link
Member Author

just an fyi for everyone - as discussed at today's AHM, I added an explanation to the ARAX wiki of the manual step that needs to happen until this issue is addressed.

https://github.com/RTXteam/RTX/wiki/CI-system-(via-GitHub-actions)
Screen Shot 2022-10-21 at 11 04 07 AM

@sundareswarpullela
Copy link
Collaborator

Hey @amykglen I know this has been sitting forever but I think it is now solved and all the pytest.yml commands are running with no import error.
I just changed


     - name: Append code dir to GITHUB_PATH                # Causing RTXConfiguration import error
       run: echo "$HOME/RTX" >> $GITHUB_PATH

    - name: Download databases as needed
      run: python3 code/ARAX/ARAXQuery/ARAX_database_manager.py --mnt --skip-if-exists --remove_unused

To:

    - name: Download databases as needed
      run: python3 $HOME/RTX/code/ARAX/ARAXQuery/ARAX_database_manager.py --mnt --skip-if-exists --remove_unused

@sundareswarpullela
Copy link
Collaborator

I will update the docs and close this issue once you've given it a once-over.

@sundareswarpullela
Copy link
Collaborator

@sundareswarpullela
Copy link
Collaborator

Closing issues

@sundareswarpullela sundareswarpullela closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants