Copilot commented on code in PR #860:
URL: https://github.com/apache/solr-operator/pull/860#discussion_r4366984254
##########
hack/release/smoke_test/test_cluster.sh:
##########
@@ -145,19 +164,28 @@ fi
echo "Create test Kubernetes ${KUBERNETES_VERSION} cluster in Kind. This will
allow us to test the CRDs, Helm chart and the Docker image."
kind create cluster --name "${CLUSTER_NAME}" --image
"kindest/node:${KUBERNETES_VERSION}"
-# Load the docker images into the cluster
-if (docker image inspect "${IMAGE}" &>/dev/null); then
- kind load docker-image --name "${CLUSTER_NAME}" "${IMAGE}"
- printf "\nUsing local version of Solr Operator image \"${IMAGE}\".\nIf you
want to use an updated version of this image, run \"docker pull ${SOLR_IMAGE}\"
before running the smoke test again.\n\n"
-else
- printf "\nUsing the remote Solr Operator image \"${IMAGE}\", since it was
not found in the local Docker image list.\n\n"
-fi
-if (docker image inspect "${SOLR_IMAGE}" &>/dev/null); then
- kind load docker-image --name "${CLUSTER_NAME}" "${SOLR_IMAGE}"
- printf "\nUsing local version of Solr image \"${SOLR_IMAGE}\".\nIf you want
to use an updated version of this image, run \"docker pull ${SOLR_IMAGE}\"
before running the smoke test again.\n\n"
+# Load the Solr Operator image into the cluster, but only when it is a local
build.
+# The Solr image is never loaded: it always comes from a registry, and the
Kind nodes pull it.
+if [[ "${LOAD_OPERATOR_IMAGE}" = true ]]; then
+ if ! (docker image inspect "${IMAGE}" &>/dev/null); then
+ echo "Solr Operator image \"${IMAGE}\" was not found locally. Build it, or
pass a registry image with -i." >&2
Review Comment:
Passing a registry image with `-i` does not resolve this error when
`LOCATION` is a local path: image loading and pull policy depend only on
`LOCATION`, so an uncached registry image produces the same error. The
diagnostic should recommend building the image locally before retrying rather
than suggesting an ineffective `-i` retry.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]