This document outlines the test cases to verify the updated build_cluster.sh script handles dependencies, prompts, and build order correctly.
./parallel_works_scripts/build_cluster.sh --build-type=development nwm-cal-mgr ngen-
Auto-dependency inclusion: Script should auto-add
ngen-forcingwith message:Auto-adding dependency: ngen-forcing (required by ngen) -
Build order: Should build in this exact order:
- ngen-forcing (
:latesttag) - all 3 Dockerfiles - ngen (
:latesttag) - nwm-cal-mgr (
:latesttag)
- ngen-forcing (
-
Build arguments:
- ngen build should show:
Building ngen (development) Docker image with NGEN_FORCING_TAG=latest - nwm-cal-mgr build should show:
Building nwm-cal-mgr (development) Docker image with NGEN_IMAGE_TAG=latest
- ngen build should show:
-
No extra prompts: Should NOT see any prompts asking "Which ngen-forcing Docker image tag do you want ngen to use?"
- ngen-forcing auto-added to SELECTED_REPOS
- Build order: ngen-forcing → ngen → nwm-cal-mgr
- ngen uses NGEN_FORCING_TAG=latest
- nwm-cal-mgr uses NGEN_IMAGE_TAG=latest
- No redundant tag prompts
./parallel_works_scripts/build_cluster.sh --build-type=development nwm-fcst-mgr ngenSame as Test 1, but with nwm-fcst-mgr:
- Auto-add
ngen-forcing - Build order: ngen-forcing → ngen → nwm-fcst-mgr
- ngen uses
NGEN_FORCING_TAG=latest - nwm-fcst-mgr uses
NGEN_IMAGE_TAG=latest
- ngen-forcing auto-added to SELECTED_REPOS
- Build order: ngen-forcing → ngen → nwm-fcst-mgr
- ngen uses NGEN_FORCING_TAG=latest
- nwm-fcst-mgr uses NGEN_IMAGE_TAG=latest
- No redundant tag prompts
./parallel_works_scripts/build_cluster.sh --build-type=release nwm-cal-mgr ngen- "Enter ngen-forcing tag (shared for bmi/lumped/coastal):" → e.g.,
v1.0.0 - "Enter ngen tag:" → e.g.,
v2.0.0 - "Enter ngen-forcing tag (used by ngen):" → Should NOT appear (already set)
- "Enter ngen tag (used by nwm-cal-mgr/nwm-fcst-mgr):" → Should NOT appear (already set)
- "Enter nwm-cal-mgr tag:" → e.g.,
v3.0.0
- Auto-dependency inclusion: Script should auto-add
ngen-forcing - Build order: ngen-forcing (v1.0.0) → ngen (v2.0.0) → nwm-cal-mgr (v3.0.0)
- Build arguments:
- ngen:
Building ngen Docker image with NGEN_FORCING_TAG=v1.0.0 - nwm-cal-mgr:
Building nwm-cal-mgr Docker image with NGEN_IMAGE_TAG=v2.0.0
- ngen:
- ngen-forcing auto-added to SELECTED_REPOS
- Only prompted ONCE for each repo's tag
- No redundant "Which X tag do you want Y to use?" prompts
- Build order: ngen-forcing → ngen → nwm-cal-mgr
- ngen uses ngen-forcing's specified tag
- nwm-cal-mgr uses ngen's specified tag
./parallel_works_scripts/build_cluster.sh --build-type=release nwm-fcst-mgr ngenSame as Test 3, but with nwm-fcst-mgr instead of nwm-cal-mgr.
- ngen-forcing auto-added to SELECTED_REPOS
- Only prompted ONCE for each repo's tag
- No redundant prompts
- Build order: ngen-forcing → ngen → nwm-fcst-mgr
- ngen uses ngen-forcing's specified tag
- nwm-fcst-mgr uses ngen's specified tag
./parallel_works_scripts/build_cluster.sh --build-type=feature ngen- "Enter ngen branch:" → e.g.,
feature/new-functionality - "Enter ngen-forcing branch (used by ngen):" → e.g.,
feature/forcing-update - Should NOT see: "Image source for 'ngen' [build/pull]" prompt
- Should NOT see: Any default values like "(default: feature)"
- Auto-dependency inclusion: Script should auto-add
ngen-forcing - No pull prompts: Should NOT ask to pull any images
- Branch name validation: Should reject empty branch names with error
- Docker tags:
- ngen-forcing images tagged as:
feature-forcing-update(sanitized:/→-) - ngen image tagged as:
feature-new-functionality
- ngen-forcing images tagged as:
- Build arguments:
- ngen:
Building ngen (feature) Docker image with NGEN_FORCING_TAG=feature-forcing-update
- ngen:
- No SIF files:
ngenandngen-bmi-forcingare Docker-only — nongen-*.siforngen-bmi-forcing-*.sifshould be produced. The ngen binary and forcing engine are accessed vianwm-cal-mgr.sifat runtime.
- ngen-forcing auto-added to SELECTED_REPOS
- NO "Image source [build/pull]" prompts
- NO default branch values in prompts
- Branch name required (empty rejected)
- Docker tags use actual branch names (sanitized)
- NO
ngen-*.siforngen-bmi-forcing-*.sifcreated under/ngencerf-app/singularity - All images built locally (no pulling)
- ngen uses ngen-forcing's branch-based tag
./parallel_works_scripts/build_cluster.sh --build-type=feature nwm-cal-mgr- "Enter nwm-cal-mgr branch:" → e.g.,
feature/calibration-improvements - "Enter ngen branch (used by nwm-cal-mgr/nwm-fcst-mgr):" → e.g.,
feature/ngen-updates - "Enter ngen-forcing branch (used by ngen):" → e.g.,
development
- Auto-dependency inclusion: Should auto-add BOTH
ngenANDngen-forcing:Auto-adding dependency: ngen (required by nwm-cal-mgr) Auto-adding dependency: ngen-forcing (required by ngen) - Build order: ngen-forcing → ngen → nwm-cal-mgr
- Docker tags use branch names:
- ngen-forcing:
development - ngen:
feature-ngen-updates - nwm-cal-mgr:
feature-calibration-improvements
- ngen-forcing:
- Build arguments:
- ngen:
NGEN_FORCING_TAG=development - nwm-cal-mgr:
NGEN_IMAGE_TAG=feature-ngen-updates
- ngen:
- Both ngen and ngen-forcing auto-added
- NO pull prompts
- NO default branch values
- Build order: ngen-forcing → ngen → nwm-cal-mgr
- All Docker tags use actual branch names
- SIF files use actual branch names
- All built locally
./parallel_works_scripts/build_cluster.sh --build-type=feature nwm-verf- "Enter nwm-verf branch:" → e.g.,
feature/verification-tool - "Enter nwm-eval-mgr branch (used by nwm-verf):" → e.g.,
development
- No auto-dependencies: nwm-verf doesn't depend on ngen/ngen-forcing
- Build arguments:
NWM_EVAL_MGR_TAG=development - Docker tag:
feature-verification-tool - SIF file:
nwm-verf-feature-verification-tool-{timestamp}.sif
- NO pull prompts
- NO default branch values
- Docker tag uses actual branch name
- SIF file uses actual branch name
- Built locally
- "Which Docker image tag do you want to use?" prompt
- Default values like "(default: feature)" in feature build prompts
- Pull prompts for feature builds
- Generic ":feature" tag in any output
- Auto-dependency messages when dependencies added
- Clear logging showing which tags/branches are being used
- Proper build order (dependencies first)
# Development builds
./parallel_works_scripts/build_cluster.sh --build-type=development nwm-cal-mgr ngen
./parallel_works_scripts/build_cluster.sh --build-type=development nwm-fcst-mgr ngen
./parallel_works_scripts/build_cluster.sh --build-type=development all
# Release builds (interactive - will prompt for tags)
./parallel_works_scripts/build_cluster.sh --build-type=release ngen
./parallel_works_scripts/build_cluster.sh --build-type=release nwm-cal-mgr ngen
./parallel_works_scripts/build_cluster.sh --build-type=release nwm-fcst-mgr ngen
./parallel_works_scripts/build_cluster.sh --build-type=release nwm-verf
# Feature builds (interactive - will prompt for branches)
./parallel_works_scripts/build_cluster.sh --build-type=feature ngen
./parallel_works_scripts/build_cluster.sh --build-type=feature nwm-cal-mgr
./parallel_works_scripts/build_cluster.sh --build-type=feature nwm-verfIf something goes wrong, check:
- Auto-dependency inclusion: Look for "Auto-adding dependency:" messages
- Build order: Check the order of Docker build commands in output
- Tags/branches used: Look for "with NGEN_FORCING_TAG=" or "with NGEN_IMAGE_TAG=" in build output
- SIF file names: Check the actual .sif files created in the singularity directory
- Prompts: Count how many times you're asked for the same information
Use set -x at the top of the script temporarily to see detailed execution if needed.