Description of problem:
When running the oc-mirror command to pull containers, specifying a channel and min/maxVersion that doesn't exist, the command succeeds despite the release not existing. No
Version-Release number of selected component (if applicable):
4.18.0
How reproducible:
100% with mirror.platform.channel.min/maxVersion and additionalImages is not empty.
Steps to Reproduce:
1. Create an imagesetconfiguration like below
2. Run the ./oc-mirror --v2 --config isc-4.18.4-v2.yaml file://mirror2 --dry-run --v2
command
Actual results:
2025/03/11 11:52:34 [INFO] : 👋 Hello, welcome to oc-mirror 2025/03/11 11:52:34 [INFO] : ⚙️ setting up the environment for you... 2025/03/11 11:52:34 [INFO] : 🔀 workflow mode: mirrorToDisk 2025/03/11 11:52:34 [INFO] : 🕵 going to discover the necessary images... 2025/03/11 11:52:34 [INFO] : 🔍 collecting release images... 2025/03/11 11:52:35 [INFO] : 🔍 collecting operator images... 2025/03/11 11:52:35 [INFO] : 🔍 collecting additional images... 2025/03/11 11:52:35 [INFO] : 🔍 collecting helm images... 2025/03/11 11:52:35 [INFO] : 📄 list of all images for mirroring in : mirror2/working-dir/dry-run/mapping.txt 2025/03/11 11:52:35 [INFO] : mirror time : 560.890675ms 2025/03/11 11:52:35 [INFO] : 👋 Goodbye, thank you for using oc-mirror
Expected results:
2025/03/11 11:52:34 [ERROR] : No version 4.x.z in channel stable-4.x
Additional info:
clientVersion: buildDate: "2025-03-05T14:38:14Z" compiler: gc gitCommit: 22b273d3f5bfa4870aeb84acca14dfda7faaa981 gitTreeState: clean gitVersion: 4.18.0-202503051333.p0.g22b273d.assembly.stream.el9-22b273d goVersion: go1.22.9 (Red Hat 1.22.9-1.module+el8.10.0+22500+aee717ef) X:strictfipsruntime major: "" minor: "" platform: linux/amd64