-
Notifications
You must be signed in to change notification settings - Fork 2
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
GitHub CI actions for the test can not work because of the private dataset and the need for astrometry index files. #19
Comments
Solution for a) could be to download the private dataset in the CI before the tests (as done in lstchain https://github.com/cta-observatory/cta-lstchain/blob/a8058123c2ab44e7d19dbc44e8de83a1158e562b/.github/workflows/ci.yml#L82-L87). For b) I see no easy workaround to the usage of ~10 GB files. Maybe implement specific tests that do not make use of the entire astrometry index files, say to reduce the astrometry test files to ~10-100 MB (if possible) |
While we think or fix this to reduce all data needed down to the limits by GitHub, we might think of implementing a 'test' api endpoint in iop4api, that checkouts to a given branch (in the official repo for safety) and runs the test, returning the result. Then the CI action will be sending the branch name and testing the result. |
but how do you deal with astrometry index files? What if GH action connects to one of our machines (with the astrometry files already downloaded) and then communicates the result back to the CI action (?) |
Yes, that is what I meant. Implementing a simple api endpoint, that runs the test in our servers, either directly or in a container. It does not need to be part of IOP4 itself if we don't want to. |
Although, since the client side will be part of this repo (in .github/workflows), we might as well include the server side. I propose adding a 'view_ci_test_client` to iop4api that receives the branch and commit, runs the tests in a container for that specific version, and returns the result when it has finished. |
ah, good!
+1 |
I'm testing this approach at https://github.com/morcuended/iop4/pull/1. It basically consists of:
After discussing this, accessing our server through VPN is not the best approach here. I'll follow @juanep97 suggestion:
|
So to summarize, let's build something like iop4api/views/test.py
iop4api/urls.py
Then it can be queried from the CI cli as
Omitting the |
After some thought, I see other possible two solutions, but I have not made any of them work yet:
Let's give it some thought or try to see if any of them also work. I think both of them will require less coding / maintenance. |
It seems that for the moment, PR #29 can solve the issue. It mounts the astrometry cache as a remote directory, so the astrometry module does not try to download all the index files (5200 series, scales 0-4, ~34 GB, which was making tests fail). Instead it "only" tries to access and downloads ~11 GB (using cache). This is enough for tests to pass. This ~11GB can probably be reduced by using less scales in the tests, but I see no reason to bother, ~15min is acceptable, I think. If in the future we need to use more astrometry index files or a larger dataset, going over the limits or taking too much time, we might think of implementing the self hosted action runner solution inside isolated vms. |
This might help: https://github.com/actions/actions-runner-controller |
The problem seems to be alleviated -but not solved- in #53 by using httpdirfs in a single thread and not running the tests for python 3.10.9 and 3.11 in parallel. |
It is currently impossible to run all tests in GitHub CI Actions because a) it needs a currently private dataset (~22MB) and b) astrometry index files to test the astrometric calibration (~36GB, although it can probably be reduced to less than half of it).
Suggestions?
The text was updated successfully, but these errors were encountered: