Skip to content
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

Remove pslot dir from local archive folder on CI case completion #2961

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

TerrenceMcGuinness-NOAA
Copy link
Collaborator

Description

This PR adds an cleanup_experiment function in the BASH utils to clean up after a CI case is ran.
This consolidates these actions and also adds the feature to clean the local archive folder specified by $HOMEDIR/archive/$PSLOT.

Resolves #2954

-->

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO (If YES, please add a link to any PRs that are pending.)
    • EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added
  • I have made corresponding changes to the system documentation if necessary

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA added the CI/CD Issue related to CI/CD label Sep 25, 2024
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA added the CI-Hera-Ready **CM use only** PR is ready for CI testing on Hera label Sep 25, 2024
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
@emcbot emcbot added CI-Hera-Building **Bot use only** CI testing is cloning/building on Hera CI-Hera-Running **Bot use only** CI testing on Hera for this PR is in-progress CI-Hera-Failed **Bot use only** CI testing on Hera for this PR has failed and removed CI-Hera-Ready **CM use only** PR is ready for CI testing on Hera CI-Hera-Building **Bot use only** CI testing is cloning/building on Hera CI-Hera-Running **Bot use only** CI testing on Hera for this PR is in-progress labels Sep 25, 2024
@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C48mx500_3DVarAOWCDA FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C48mx500_3DVarAOWCDA_b5113675

@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C48_S2SW FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C48_S2SW_b5113675

@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C48_ATM FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C48_ATM_b5113675

@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C48_S2SWA_gefs FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C48_S2SWA_gefs_b5113675

@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C96_atm3DVar FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C96_atm3DVar_b5113675

@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C96C48_hybatmDA FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C96C48_hybatmDA_b5113675

@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C96C48_ufs_hybatmDA FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C96C48_ufs_hybatmDA_b5113675

@emcbot
Copy link

emcbot commented Sep 26, 2024

Experiment C96C48_hybatmaerosnowDA FAILED on Hera in Build# 1 in
/scratch1/NCEPDEV/global/CI/2961/RUNTESTS/EXPDIR/C96C48_hybatmaerosnowDA_b5113675

@emcbot emcbot added CI-Hera-Failed **Bot use only** CI testing on Hera for this PR has failed and removed CI-Hera-Failed **Bot use only** CI testing on Hera for this PR has failed labels Sep 26, 2024
@emcbot
Copy link

emcbot commented Sep 26, 2024

CI Failed on Hera in Build# 1
Built and ran in directory /scratch1/NCEPDEV/global/CI/2961


Experiment C48mx500_3DVarAOWCDA_b5113675 Completed 2 Cycles: *SUCCESS* at Thu Sep 26 09:53:40 UTC 2024
Experiment C48_S2SW_b5113675 Completed 1 Cycles: *SUCCESS* at Thu Sep 26 11:55:53 UTC 2024
Experiment C48_ATM_b5113675 Completed 1 Cycles: *SUCCESS* at Thu Sep 26 12:01:25 UTC 2024
Experiment C48_S2SWA_gefs_b5113675 Completed 1 Cycles: *SUCCESS* at Thu Sep 26 12:01:26 UTC 2024
Experiment C96_atm3DVar_b5113675 Completed 3 Cycles: *SUCCESS* at Thu Sep 26 13:15:02 UTC 2024
Experiment C96C48_hybatmDA_b5113675 Completed 3 Cycles: *SUCCESS* at Thu Sep 26 13:39:45 UTC 2024
Experiment C96C48_ufs_hybatmDA_b5113675 Completed 2 Cycles: *SUCCESS* at Thu Sep 26 13:46:23 UTC 2024
Experiment C96C48_hybatmaerosnowDA_b5113675 Completed 3 Cycles: *SUCCESS* at Thu Sep 26 14:29:00 UTC 2024

ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
ci/scripts/utils/ci_utils.sh Fixed Show fixed Hide fixed
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA added CI-Hera-Ready **CM use only** PR is ready for CI testing on Hera and removed CI-Hera-Failed **Bot use only** CI testing on Hera for this PR has failed labels Sep 26, 2024
@emcbot emcbot added CI-Hera-Building **Bot use only** CI testing is cloning/building on Hera and removed CI-Hera-Ready **CM use only** PR is ready for CI testing on Hera labels Sep 26, 2024
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA changed the title Remove pslot dir from local archive folder on case completion Remove pslot dir from local archive folder on CI case completion Sep 26, 2024
@emcbot emcbot added CI-Hera-Running **Bot use only** CI testing on Hera for this PR is in-progress CI-Hera-Passed **Bot use only** CI testing on Hera for this PR has completed successfully and removed CI-Hera-Building **Bot use only** CI testing is cloning/building on Hera CI-Hera-Running **Bot use only** CI testing on Hera for this PR is in-progress labels Sep 26, 2024
@emcbot
Copy link

emcbot commented Sep 27, 2024

CI Passed on Hera in Build# 2
Built and ran in directory /scratch1/NCEPDEV/global/CI/2961


Experiment C48mx500_3DVarAOWCDA_c8a10a9d Completed 2 Cycles: *SUCCESS* at Thu Sep 26 21:00:42 UTC 2024
Experiment C48_ATM_c8a10a9d Completed 1 Cycles: *SUCCESS* at Thu Sep 26 21:00:43 UTC 2024
Experiment C48_S2SW_c8a10a9d Completed 1 Cycles: *SUCCESS* at Thu Sep 26 21:19:12 UTC 2024
Experiment C48_S2SWA_gefs_c8a10a9d Completed 1 Cycles: *SUCCESS* at Thu Sep 26 22:27:02 UTC 2024
Experiment C96C48_ufs_hybatmDA_c8a10a9d Completed 2 Cycles: *SUCCESS* at Thu Sep 26 23:33:05 UTC 2024
Experiment C96_atm3DVar_c8a10a9d Completed 3 Cycles: *SUCCESS* at Thu Sep 26 23:39:07 UTC 2024
Experiment C96C48_hybatmDA_c8a10a9d Completed 3 Cycles: *SUCCESS* at Fri Sep 27 00:27:52 UTC 2024
Experiment C96C48_hybatmaerosnowDA_c8a10a9d Completed 3 Cycles: *SUCCESS* at Fri Sep 27 01:04:31 UTC 2024

Copy link
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA left a comment

Choose a reason for hiding this comment

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

Will still need to add removal of ATARDIR/LOCALDIR in a future PR.

@TerrenceMcGuinness-NOAA
Copy link
Collaborator Author

TerrenceMcGuinness-NOAA commented Sep 27, 2024

@WalterKolczynski-NOAA Please put the specifics to those in an Issue Task please.
Making this a draft PR until I can verify the results of the CI Pass.

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA marked this pull request as draft September 27, 2024 13:05
@TerrenceMcGuinness-NOAA
Copy link
Collaborator Author

OK, ready for merge.

PSLOT_PATH="$1"
pslot=$(basename "${PSLOT_PATH}")
HOMEDIR=$(grep 'export HOMEDIR=' "${PSLOT_PATH}/config.base" | cut -d'=' -f2 | tr -d '[:space:]"' || true) || true
eval HOMEDIR="${HOMEDIR}"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this eval doing? Isn't it already defined on the prior line? eval should be avoided if at all possible.

Copy link
Contributor

@DavidHuber-NOAA DavidHuber-NOAA Oct 2, 2024

Choose a reason for hiding this comment

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

There are a few other directories that contain data, though none are very large:

${ARCHIVEDIR}/metplus_data/by_VSDB/{grid2grid,grid2obs,precip}/*/*/${pslot}
${HOME}/.rocoto/<rocoto version>/${pslot}  # These are typically empty directories on success with just a log and .lock file otherwise

EDIT: changed ${HOMEDIR} to ${HOME} for the rocoto directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Issue related to CI/CD CI-Hera-Passed **Bot use only** CI testing on Hera for this PR has completed successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove on disk archive files in CI pipeline after running a test
5 participants