-
Notifications
You must be signed in to change notification settings - Fork 12
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
Jenkins physics tests #21
Conversation
launch jenkins |
launch jenkins |
launch jenkins |
…into jenkins-physics-tests
.jenkins/jenkins.sh
Outdated
fi | ||
# If the backend is a GTC backend we fetch the caches | ||
if [[ $backend != *numpy* ]];then | ||
. ${jenkins_dir}/actions/fetch_caches.sh $backend $experiment |
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.
We do not currently have a cache plan for physics, but the jenkins test only run numpy backend. Will include this when we set up the caching plan.
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.
Logging this review I forgot to submit yesterday, it looks like you've mostly fixed the issues raised so I'll re-review now.
docker/Makefile
Outdated
cd ${GT4PY_DIR} && git checkout ${GT4PY_VERSION};\ | ||
fi | ||
|
||
## build production container image | ||
fv3gfs_image: get_gt4py | ||
if [ $(PULL) == True ]; then \ | ||
if [ $(PULL) = True ]; then \ |
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.
Is this change correct? I'm not that familiar with bash, but google is saying to use ==
to check equality.
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 one was super weird. It should be ==
, and it works on my machine locally. It is also how fv3core
has it, and it works on jenkins. However, I'm getting this on jenkins gce: [/bin/sh: 1: : True: unexpected operator. But somehow =
worked fine.
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.
My guess is it is because PULL is unset on gce. You can fix this by setting the default to PULL ?= False
instead of removing the definition of PULL above altogether.
@@ -2,7 +2,7 @@ | |||
Python implementation of FV3 GFS physics built using the GT4Py domain-specific language in Python. | |||
|
|||
## Description | |||
fv3gfs-physics is still under development, more descriptions will be added. | |||
fv3gfs-physics is under active development. Currently, pace level docker environment should be used for development. |
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.
Make sure you remember to update this when it is no logner the case.
Makefile
Outdated
@@ -4,13 +4,39 @@ DOCKER_BUILDKIT=1 | |||
SHELL=/bin/bash | |||
CWD=$(shell pwd) | |||
PULL ?=True | |||
DEV ?=n |
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.
Please keep this logic contained in the physics directory. We'll need to be able to develop and test it as a self-contained directory in the long term (not in this PR), and this is a lot of its low level logic to be putting at the top level for now.
.jenkins/actions/lint.sh
Outdated
@@ -0,0 +1,9 @@ | |||
#!/bin/bash |
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.
Does this lint action block any tests? If not, we can remove it and rely on CircleCI for linting, since it gets answers in about 10 seconds. I had thought lint checks occur as part of other actions before the tests are run.
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 script runs before installing virtual env on daint, so it will block any test runs.
CONTAINER_CMD="srun" make tests physics_savepoint_tests | ||
else | ||
export TEST_ARGS="${TEST_ARGS} --junitxml=/.jenkins/${XML_REPORT}" | ||
VOLUMES="-v ${pwd}/.jenkins:/.jenkins" make tests physics_savepoint_tests |
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 volume shouldn't need to be mounted to run these make targets, should it? The physics Makefile shouldn't be accessing ../.jenkins
(and doesn't appear to be), and the tests inside the container shouldn't be reading .jenkins
either.
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.
You're right. I'm guessing it was mounted to grab xml report from gce, but it does not actually work. In the current plan, the xml report is always from daint. Removing this.
--> | ||
<!-- Pages: 1 --> | ||
<svg width="287pt" height="260pt" |
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.
Interesting how you can actually read svgs (sort of).
@@ -0,0 +1,72 @@ | |||
include ../docker/Makefile.image_names | |||
|
|||
DOCKER_BUILDKIT=1 |
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.
Not about this PR, but I'm hoping I can refactor the tests so that this logic (duplicated in each subproject with savepoint tests) can be greatly reduced.
Co-authored-by: Jeremy McGibbon <jeremym@allenai.org>
…into jenkins-physics-tests
launch jenkins |
launch jenkins |
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.
One name to fix but then it should be good to merge! Thanks!
@@ -185,7 +185,7 @@ if [ ${python_env} == "virtualenv" ]; then | |||
if grep -q "parallel" <<< "${script}"; then | |||
export MPIRUN_CALL="srun" | |||
fi | |||
export pace_PATH="${envloc}/../" | |||
export pace_PATH="${envloc}/../fv3gfs-physics/" |
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 is no longer the path of PACE, can you either revert the path and append fv3gfs-physics later or rename the variable?
Also, if PATH is allcaps then PACE should be allcaps in this name, as much as I don't like allcaps PACE...
@@ -1,3 +1,4 @@ | |||
SHELL := /bin/bash |
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.
Glad this worked!
This is a temporary change, physics should not depend on fv3core