fix: do not retire an image that another app uses as its source image

Image retirement removes images by id, so a queued image could be deleted even though another app had since started using it as its git:from-image source image. Skip such images at retire time and drop them from the retire list.

The git_4 test images are also given a per-app label so they no longer share a cached image id, which let a retire entry left by one test delete the next test's source image.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-10-14 10:00:51 -04:00
1 parent 02f0466cac
commit e71dffb1a7
3 files changed
+71 -1

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ build_python_image() {
cp "$TMP_IMAGE_DIR/$PROCFILE" "$TMP_IMAGE_DIR/Procfile"
fi
docker image build -t "dokku-test/$TEST_APP:$TAG" -f "$TMP_IMAGE_DIR/alt.Dockerfile" "$TMP_IMAGE_DIR" || exit_code="$?"
docker image build --label "com.dokku.test-app=$TEST_APP" -t "dokku-test/$TEST_APP:$TAG" -f "$TMP_IMAGE_DIR/alt.Dockerfile" "$TMP_IMAGE_DIR" || exit_code="$?"
rm -rf "$TMP_IMAGE_DIR"
return "$exit_code"
}