Skip to content

Add automated CI testing through cron on Orion#12

Merged
CoryMartin-NOAA merged 18 commits into
developfrom
feature/orion_cron_rt
Mar 23, 2022
Merged

Add automated CI testing through cron on Orion#12
CoryMartin-NOAA merged 18 commits into
developfrom
feature/orion_cron_rt

Conversation

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor

Closes #9

This PR adds scripts for automated CI testing on NOAA HPC platforms. First Orion, but minor additions will be needed for Hera once the python virtual environment there is set up properly.

Every 15 mins, Orion-login-1 will run $clone/ci/driver.sh -t orion.

The script will check to see which open PR(s) in GDASApp have the label Orion-RT and for each one, checkout, build, and test and report back/change labels as appropriate through @emcbot .

Note: the modulefile changed in #6 but has not been merged yet but is also included in this PR as it is needed for the GitHub CLI.

@CoryMartin-NOAA CoryMartin-NOAA added the orion-RT Queue for automated testing on Orion label Mar 22, 2022
@CoryMartin-NOAA CoryMartin-NOAA self-assigned this Mar 22, 2022
@emcbot emcbot added orion-RT-Running Automated testing running on Orion and removed orion-RT Queue for automated testing on Orion labels Mar 22, 2022
@emcbot
Copy link
Copy Markdown

emcbot commented Mar 22, 2022

Automated Pull Request Testing Results:
Machine: orion

Start: Tue Mar 22 15:15:14 CDT 2022 on Orion-login-1.HPC.MsState.Edu
Build:                          *SUCCESS*
Build: Completed at Tue Mar 22 16:11:19 CDT 2022
---------------------------------------------------
Tests:                          *Failed*
Tests: Failed at Tue Mar 22 16:52:14 CDT 2022
Tests:         93% tests passed, 96 tests failed out of 1383
Tests: see output at /work2/noaa/stmp/cmartin/CI/GDASApp/PR/12/GDASApp/build/log.ctest

@emcbot emcbot added orion-RT-Failed Automated testing failed on Orion and removed orion-RT-Running Automated testing running on Orion labels Mar 22, 2022
@CoryMartin-NOAA CoryMartin-NOAA added orion-RT Queue for automated testing on Orion and removed orion-RT-Failed Automated testing failed on Orion labels Mar 23, 2022
Comment thread ci/run_ci.sh
fi
# ==============================================================================
# run ctests
cd $repodir/build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CoryMartin-NOAA , why not limit the testing to this repo only and ignore the test status of the jedi components? It might sounds silly right now, but in the next few pr's we will have specific tests for the "prep" "run" and "post" steps, which will be making use of the various jedi components. I think it's a good enough "canary".
I vote for ctest -R gdasapp or something of that effect.
Or maybe 2 reports? One for the jedi components and one for the gdasapp tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you also suggest not building the JEDI apps (at least for now) also?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, we might as well do the build now. We're going to start adding tests using the jedi apps soon enough.
That's currently what I'm working on, just empty stubs right now but I'm hoping to have a basic jedi/soca var application by the end of the day:

build$ ctest -R gdasapp
Test project /home/gvernier/sandboxes/GDASApp/build
    Start 1448: test_gdasapp_soca_obsdb
1/4 Test #1448: test_gdasapp_soca_obsdb ..........   Passed    0.27 sec
    Start 1449: test_gdasapp_soca_ana_prep
2/4 Test #1449: test_gdasapp_soca_ana_prep .......   Passed    0.01 sec
    Start 1450: test_gdasapp_soca_ana_run
3/4 Test #1450: test_gdasapp_soca_ana_run ........   Passed    0.00 sec
    Start 1451: test_gdasapp_soca_ana_post
4/4 Test #1451: test_gdasapp_soca_ana_post .......   Passed    0.00 sec

100% tests passed, 0 tests failed out of 4

Label Time Summary:
gdasapp    =   0.29 sec*proc (4 tests)
script     =   0.29 sec*proc (4 tests)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to remember adding gdasapp (or something) to the one test we currently have. It's now called test_check_yaml_keys so something like test_gdasapp_check_yaml_keys, or whatever consensus we decide on.

Copy link
Copy Markdown
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good mostly, just a few minor comments and clarification.

Comment thread ci/run_ci.sh
@@ -0,0 +1,75 @@
#!/bin/bash
#set -eu
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you intend to leave this commented out?

Comment thread ci/run_ci.sh
# run build script
cd $repodir
module purge
./build.sh -t $TARGET &>> log.build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you want to capture stderr as well? 2>&1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this do that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, but I may be wrong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>> out is stdout but &>> adds the stderr I thought.

Comment thread ci/run_ci.sh Outdated
module use $GDAS_MODULE_USE
module load GDAS/$TARGET
echo "---------------------------------------------------" >> $outfile
ctest --output-on-failure &>> log.ctest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this why set -e was commented up?
If so, you can wrap the ctest line around set +e and set -e.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The set -e comes from conda when you do module load, it is something in the pyproj init shell script. I could probably manually fix this in the conda env if you think that is okay?

Comment thread ci/run_ci.sh
Comment thread modulefiles/GDAS/orion.lua Outdated
Comment on lines +44 to +46
load("hpc")
load("miniconda3")
load("gdasapp")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try and list the explicit versions instead of relying on defaults

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion.

Comment thread ci/orion.sh
Comment thread ci/orion.sh
aerorahul
aerorahul previously approved these changes Mar 23, 2022
Copy link
Copy Markdown
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor Author

@guillaumevernieres none of the tests ran with this newest commit on Hera... need to figure out why.

@CoryMartin-NOAA
Copy link
Copy Markdown
Contributor Author

@guillaumevernieres none of the tests ran with this newest commit on Hera... need to figure out why.

Oh duh, it ran the test with the old test names... all should be good here I think.

Copy link
Copy Markdown
Contributor

@guillaumevernieres guillaumevernieres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CoryMartin-NOAA CoryMartin-NOAA merged commit 9c489ce into develop Mar 23, 2022
@CoryMartin-NOAA CoryMartin-NOAA deleted the feature/orion_cron_rt branch March 23, 2022 17:09
guillaumevernieres added a commit that referenced this pull request May 28, 2024
**What was done:**
- reorganization/code tidy to facilitate the addition of a GFSv17
prototype ctest
- exclude the new ctest by default, the user will have to run ```cmake
-DRUNGWCI=ON .``` on an old build to configure the new ctest

He're the current list:

```
 Test project /scratch1/NCEPDEV/stmp2/Guillaume.Vernieres/runs/prs/global-workflow/sorc/gdas.cd/build/gdas/test/gw-ci
  Test  #1: WCDA-3DVAR-C48mx500
  Test  #2: WCDA-3DVAR-C48mx500_gdasfcst_202103241200
  Test  #3: WCDA-3DVAR-C48mx500_gdasprepoceanobs_202103241800
  Test  #4: WCDA-3DVAR-C48mx500_gdasocnanalprep_202103241800
  Test  #5: WCDA-3DVAR-C48mx500_gdasocnanalbmat_202103241800
  Test  #6: WCDA-3DVAR-C48mx500_gdasocnanalrun_202103241800
  Test  #7: WCDA-3DVAR-C48mx500_gdasocnanalchkpt_202103241800
  Test  #8: WCDA-3DVAR-C48mx500_gdasocnanalpost_202103241800
  Test  #9: Aero-Snow-3DVAR-C96
  Test #10: Aero-Snow-3DVAR-C96_gdasfcst_202112201200
  Test #11: Atm-hyb-C96C48
  Test #12: Atm-hyb-C96C48_gdasfcst_202402231800
  Test #13: GFSv17-3DVAR-C384mx025
  Test #14: GFSv17-3DVAR-C384mx025_gdasfcst_202106300000
  Test #15: GFSv17-3DVAR-C384mx025_gdasprepoceanobs_202106300600
  Test #16: GFSv17-3DVAR-C384mx025_gdasocnanalprep_202106300600
  Test #17: GFSv17-3DVAR-C384mx025_gdasocnanalbmat_202106300600
  Test #18: GFSv17-3DVAR-C384mx025_gdasocnanalrun_202106300600
  Test #19: GFSv17-3DVAR-C384mx025_gdasocnanalchkpt_202106300600
  Test #20: GFSv17-3DVAR-C384mx025_gdasocnanalpost_202106300600
  Test #21: GFSv17-3DVAR-C384mx025_gdasocnanalvrfy_202106300600
  Test #22: GFSv17-3DVAR-C384mx025_gdasprep_202106300600
  Test #23: GFSv17-3DVAR-C384mx025_gdasanal_202106300600

Total Tests: 23
```

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
DavidNew-NOAA pushed a commit that referenced this pull request Jan 16, 2026
DavidNew-NOAA pushed a commit that referenced this pull request Jan 16, 2026
**What was done:**
- reorganization/code tidy to facilitate the addition of a GFSv17
prototype ctest
- exclude the new ctest by default, the user will have to run ```cmake
-DRUNGWCI=ON .``` on an old build to configure the new ctest

He're the current list:

```
 Test project /scratch1/NCEPDEV/stmp2/Guillaume.Vernieres/runs/prs/global-workflow/sorc/gdas.cd/build/gdas/test/gw-ci
  Test  #1: WCDA-3DVAR-C48mx500
  Test  #2: WCDA-3DVAR-C48mx500_gdasfcst_202103241200
  Test  #3: WCDA-3DVAR-C48mx500_gdasprepoceanobs_202103241800
  Test  #4: WCDA-3DVAR-C48mx500_gdasocnanalprep_202103241800
  Test  #5: WCDA-3DVAR-C48mx500_gdasocnanalbmat_202103241800
  Test  #6: WCDA-3DVAR-C48mx500_gdasocnanalrun_202103241800
  Test  #7: WCDA-3DVAR-C48mx500_gdasocnanalchkpt_202103241800
  Test  #8: WCDA-3DVAR-C48mx500_gdasocnanalpost_202103241800
  Test  #9: Aero-Snow-3DVAR-C96
  Test #10: Aero-Snow-3DVAR-C96_gdasfcst_202112201200
  Test #11: Atm-hyb-C96C48
  Test #12: Atm-hyb-C96C48_gdasfcst_202402231800
  Test #13: GFSv17-3DVAR-C384mx025
  Test #14: GFSv17-3DVAR-C384mx025_gdasfcst_202106300000
  Test #15: GFSv17-3DVAR-C384mx025_gdasprepoceanobs_202106300600
  Test #16: GFSv17-3DVAR-C384mx025_gdasocnanalprep_202106300600
  Test #17: GFSv17-3DVAR-C384mx025_gdasocnanalbmat_202106300600
  Test #18: GFSv17-3DVAR-C384mx025_gdasocnanalrun_202106300600
  Test #19: GFSv17-3DVAR-C384mx025_gdasocnanalchkpt_202106300600
  Test #20: GFSv17-3DVAR-C384mx025_gdasocnanalpost_202106300600
  Test #21: GFSv17-3DVAR-C384mx025_gdasocnanalvrfy_202106300600
  Test #22: GFSv17-3DVAR-C384mx025_gdasprep_202106300600
  Test #23: GFSv17-3DVAR-C384mx025_gdasanal_202106300600

Total Tests: 23
```

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

orion-RT Queue for automated testing on Orion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI testing on Orion

4 participants