-
Notifications
You must be signed in to change notification settings - Fork 119
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
[develop] cicd functional testing script #707
[develop] cicd functional testing script #707
Conversation
Signed-off-by: Bruce Kropp <Bruce.Kropp@Raytheon.com>
Signed-off-by: Bruce Kropp <Bruce.Kropp@Raytheon.com>
Some platforms are missing python3 or other support for modules and conda, but it does not necessarily harm workflow 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.
@BruceKropp-Raytheon I was able to make this script work within the current Jenkins framework on Orion with the changes that I noted in my review. Please note that the make_orog task is failing:
./run_make_orog.sh ... FAIL rc=1
The log file shows:
/work/noaa/epic-ps/mlueken/ufs-srweather-app/install_intel/exec/orog: error while loading shared libraries: libirng.so: cannot open shared object file: No such file or directory
.cicd/scripts/srw_ftest.sh
Outdated
./config_utils.py -c $(pwd)/config.yaml -v $(pwd)/config_defaults.yaml | ||
cd ${workspace} | ||
|
||
# Activate the workflow environment ... | ||
source etc/lmod-setup.sh ${platform,,} | ||
module use modulefiles | ||
module load build_${platform,,}_${SRW_COMPILER} | ||
module load wflow_${platform,,} | ||
conda activate regional_workflow |
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.
The config_utils.py script requires python3 to be available before being called. I moved the activation of the workflow environment to before line 68 and all that you should need to load the environment is:
source ${workspace}/ush/load_modules_wflow.sh ${platform,,}
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.
Great hint. Probably the documentation needs to be updated to reflect this better approach.
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.
Replacing the workflow environment with:
source ${workspace}/ush/load_modules_wflow.sh ${platform,,}
was necessary to keep the script from erroring out for me due to attempting to activate the regional_workflow conda environment.
Further testing showed that using this script is why the run_orog
task was failing (the build modulefile is purged when calling the load_modules_wflow.sh
script). I was able to create a new script, ush/load_modules_ftest.sh
, that loads the build modulefile, the wflow modulefile, then activates regional_workflow. With this script, I was able to successfully run the run_orog
wrapper script, passing the test.
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.
If you are interested in seeing what I did with the new script, please see:
/work/noaa/epic-ps/mlueken/ufs-srweather-app/ush/load_modules_ftest.sh
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.
confirmed that including module load build_${platform}_${compiler} resolves the issue with run_orog. A rework commit is on this PR.
@BruceKropp-Raytheon Thanks for updating the PR! I'm now encountering a new error while attempting to manually run these tests:
Have you seen this error during your testing? |
@MichaelLueken And I notice new change at the end of ush/config.community.yaml that might be related: rocoto: |
@BruceKropp-Raytheon On Friday, PR #676 was merged, which overhauled the parm/FV3LAM_wflow.xml file. The issue you are encountering could be related to the overhaul work (the rocoto: tasks were part of the overhaul). |
@BruceKropp-Raytheon If you replace line 86:
with:
then the consistency check should successfully pass on Orion:
This has also successfully been tested on Gaea, Hera (Intel and GNU), Jet, and Cheyenne (Intel and GNU). Issues encountered on Hera: I'm seeing the following failure in the
When setting
Issue encountered on Jet: I'm seeing the following failure in the
It looks like the script will need be updated to ensure that the following is being set in the
Further testing with this setting is still attempting to pull data from HPSS rather than use the staged data. I'm not entirely sure why this is the case. Issue encountered on Cheyenne When setting
|
@MichaelLueken The response is: The documentation suggest deriving ./config.yaml from a copy of ./config.community.yaml, then verify any changes there using this: Either way gives the same error as above. |
|
Hi Bruce, Very interesting. When I use:
I end up with the following:
In PR #701, @danielabdi-noaa has made changes that should allow the above notation to get past the |
In addition, when following instructions to enable graphics plots during the workflow: workflow_switches: checking this using config_utils.py reports this error: INVALID ENTRY: workflow_switches={'RUN_TASK_PLOT_ALLVARS': 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.
@BruceKropp-Raytheon Thank you for working with me on this PR! Approving this work now.
# Set parameters that the task scripts require ... | ||
export JOBSdir=${workspace}/jobs | ||
export USHdir=${workspace}/ush | ||
export PDY=20190615 |
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 PDY mean to stay fixed?
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.
PDY here is what is used for the default sample. If we want to allow a different sample, then we need a few of these do be variables.
Note: some of these definitions, JOBSdir, USHdir, ... were missing from the docs, and were discovered by trial+error.
# SRW_COMPILER=<intel|gnu> | ||
# | ||
# Optional: | ||
[[ -n ${ACCOUNT} ]] || ACCOUNT="no_account" |
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.
will the srw as it stands functionally accommodate $ACCOUNT
to be set as no_account
?
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.
yes. it allows the first 4 tasks to run without a valid ACCOUNT. The remaining require an ACCOUNT
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 solid and useful to me!
DESCRIPTION OF CHANGES:
This script is expected to run functional tests within the SRW application for any of the supported platforms.
The goal is to perform some basic setup and execution of the initial few workflow tasks,
as described in the user documentation section: "Run the Workflow Using Stand-Alone Scripts".
This would following a normal SRW build in an attempt to exercise environment setup, modules,
data sets, and workflow scripts, without using too much time nor account resources.
Hoping to catch any snags that might prevent follow-up WE2E fundamental testing.
Type of change
TESTS CONDUCTED:
Making this script available in .cicd/scripts/ for future use as an intermediary functional test gate after CI build stage.
DEPENDENCIES:
DOCUMENTATION:
ISSUE:
CHECKLIST
LABELS (optional):
A Code Manager needs to add the following labels to this PR:
CONTRIBUTORS (optional):