Copilot commented on code in PR #5228:
URL: https://github.com/apache/solr/pull/5228#discussion_r4373025921
##########
solr/packaging/test/test_rolling_upgrade.bats:
##########
@@ -30,8 +30,18 @@ setup() {
if ! command -v docker >/dev/null 2>&1 || ! docker info >/dev/null 2>&1; then
skip "Docker is not available"
fi
+ local solr_version major
+ solr_version="$(basename "$SOLR_TIP")"
+ solr_version="${solr_version#solr-}"
+ major="${solr_version%%.*}"
+ SOLR_BEGIN_IMAGE="${SOLR_BEGIN_IMAGE:-solr:$((major - 1))-slim}"
docker pull "$SOLR_BEGIN_IMAGE" || skip "Docker image $SOLR_BEGIN_IMAGE is
not available"
- docker pull "$SOLR_END_IMAGE" || skip "Docker image $SOLR_END_IMAGE is not
available"
+
+ # Default matches the tag applied by the Gradle dockerTag task
+ SOLR_END_IMAGE="${SOLR_END_IMAGE:-apache/solr:${solr_version}}"
+ docker image inspect "$SOLR_END_IMAGE" >/dev/null 2>&1 || docker pull
"$SOLR_END_IMAGE" ||
+ skip "Docker image $SOLR_END_IMAGE is not available; build it with:
./gradlew dockerTag"
Review Comment:
The default target is supposed to be the locally built image, but this
fallback accepts a remote image when the local tag is missing. If that version
tag exists on Docker Hub, the rolling-upgrade test can pass against an
unrelated published artifact without testing the checkout. Require a local
image for the computed default, and retain pulling only for an explicit
SOLR_END_IMAGE override.
--
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]