-
Notifications
You must be signed in to change notification settings - Fork 597
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
Make sure the GATK tool python package is present before executing streaming commands. #5819
Conversation
@cmnbroad I see. The "CI" variable does seem brittle, especially since I'm not strictly sure where it is set. I think a somewhat safer place would be to add some global test flag to the docker image would be to add it to the run_unit_tests.sh script. That way we know it is getting triggered exactly before we run the tests in just the docker environment. Is there some way of detecting what conda environment is active outside of conda. |
Codecov Report
@@ Coverage Diff @@
## master #5819 +/- ##
===============================================
- Coverage 87.031% 80.298% -6.733%
+ Complexity 32107 30526 -1581
===============================================
Files 1972 1975 +3
Lines 147194 147487 +293
Branches 16201 16233 +32
===============================================
- Hits 128104 118429 -9675
- Misses 13184 23343 +10159
+ Partials 5906 5715 -191
|
@jamesemery @cmnbroad Can we try to get this one in in time for the release? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me if you have empirically observed the tests (and that you have seen that they run on the non-docker image travis machine).
// skip this test if we're running on the Docker because the Python environment is always | ||
// activated there. | ||
final String isDockerCI = System.getenv("CI"); | ||
if (isDockerCI != null && isDockerCI.equalsIgnoreCase("true")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still maintain that we should change the "CI" variable and set it ourselves as part of the run-docker script so we are not relying on some feature of the environment that might change. Otherwise i'm not too bothered by this being a skip exception.
// skip this test if we're running on the Docker because the Python environment is always | ||
// activated there. | ||
final String isDockerCI = System.getenv("CI"); | ||
if (isDockerCI != null && isDockerCI.equalsIgnoreCase("true")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ehh... this could be extracted out into a skipIfNotInDockerImage()
since it's copied in two places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good, feel free to merge when tests pass 👍
Fixes #5751 and #4591. Longer term we'll still want to do package version-checking/verification per #4995 as well.
@jamesemery I included tests for this change, but I need the tests to only run when the conda env is NOT activated. Unit tests are always run on the docker image, so thats out. Integration tests are run on both the docker and the travis image, so I throw a skip exception on the docker, which I detect using the "CI" env variable. But that seems fragile and confusing. Is there a better way to do this ?