Skip to content

Modern Docker Management, Designed for Everyone

fix: report never-pulled image refs as a distinct 'not pulled' state instead of failing the update check (#3631)

Kyle Mendell3685a623540e
diff --git a/Justfile b/Justfile
index f3a877b63..d29e13a66 100644
--- a/Justfile
+++ b/Justfile
@@ -407,7 +407,6 @@ snyk target="scan":
_deps-install-viteplus:
vp migrate
-
_deps-install-frontend:
vp install
diff --git a/backend/internal/imageupdate/image_update.go b/backend/internal/imageupdate/image_update.go
index ada2d2822..6f44443a8 100644
--- a/backend/internal/imageupdate/image_update.go
+++ b/backend/internal/imageupdate/image_update.go
@@ -14,6 +14,7 @@ import (
"emperror.dev/emperror"
"emperror.dev/errors"
+ cerrdefs "github.com/containerd/errdefs"
ref "github.com/distribution/reference"
"github.com/getarcaneapp/arcane/backend/v2/internal/activity"
"github.com/getarcaneapp/arcane/backend/v2/internal/database"
@@ -396,6 +397,11 @@ func (s *ImageUpdateService) checkDigestUpdateWithSnapshotInternal(ctx context.C
if err == nil && snapshot.IsLocalBuild {
return localBuildImageUpdateResultInternal(snapshot, int(time.Since(start).Milliseconds())), snapshot, nil
}
+ if err != nil && cerrdefs.IsNotFound(err) {
+ if _, isComposeBuild := composeBuildRefs[refs.NormalizeImageUpdateRef(imageRef)]; isComposeBuild {
+ return missingLocalBuildImageUpdateResultInternal(parts.Tag, int(time.Since(start).Milliseconds())), nil, nil
+ }
+ }
registryCtx, registryCancel := s.registryContextInternal(ctx)
digestResult, err := s.registryService.InspectImageDigest(registryCtx, imageRef, nil)
@@ -420,6 +426,21 @@ func (s *ImageUpdateService) checkDigestUpdateWithSnapshotInternal(ctx context.C
if snapshot == nil {
snapshot, err = s.inspectLocalImageSnapshotInternal(ctx, imageRef, composeBuildRefs)
if err != nil {
+ if cerrdefs.IsNotFound(err) {
+ // The ref resolved remotely but was never pulled locally: there is
+ // nothing local to compare, so report a distinct not-pulled state
+ // rather than a failed check or an available update.
+ return &imageupdate.Response{
+ UpdateType: models.UpdateTypeNotPulled,
+ LatestDigest: digestResult.Digest,
+ CheckTime: time.Now(),
+ ResponseTimeMs: int(elapsed.Milliseconds()),
+ AuthMethod: digestResult.AuthMethod,
+ AuthUsername: digestResult.AuthUsername,
+ AuthRegistry: digestResult.AuthRegistry,
+ UsedCredential: digestResult.UsedCredential,
+ }, nil, nil
+ }
return nil, nil, errors.WrapIf(err, "failed to get local digest")
}
}
@@ -466,6 +487,19 @@ func localBuildImageUpdateResultInternal(snapshot *localImageSnapshot, responseT
}
}
+// missingLocalBuildImageUpdateResultInternal reports a compose build ref whose
+// image is not present locally: there is no registry to check against, so the
+// registry lookup is skipped entirely.
+func missingLocalBuildImageUpdateResultInternal(tag string, responseTimeMs int) *imageupdate.Response {
+ return &imageupdate.Response{
+ HasUpdate: false,
+ UpdateType: models.UpdateTypeLocal,
+ CurrentVersion: tag,
+ CheckTime: time.Now(),
+ ResponseTimeMs: responseTimeMs,
+ }
+}
+
func (s *ImageUpdateService) parseImageReference(imageRef string) *ImageParts {
// Use the official Docker reference parser to handle all edge cases
named, err := ref.ParseNormalizedNamed(imageRef)
@@ -907,6 +941,9 @@ func imageCheckResultMessageInternal(imageRef string, res *imageupdate.Response)
if res.UpdateType == models.UpdateTypeLocal {
return models.ActivityMessageLevelInfo, imageRef + " — local build, registry check skipped"
}
+ if res.UpdateType == models.UpdateTypeNotPulled {
+ return models.ActivityMessageLevelInfo, imageRef + " — not pulled locally, no local digest to compare"
+ }
if res.HasUpdate {
return models.ActivityMessageLevelSuccess, imageRef + " — update available"
}
@@ -1256,6 +1293,11 @@ func (s *ImageUpdateService) checkSingleImageInBatchInternal(ctx context.Context
if ldErr == nil && snapshot.IsLocalBuild {
return localBuildImageUpdateResultInternal(snapshot, int(time.Since(start).Milliseconds())), snapshot
}
+ if ldErr != nil && cerrdefs.IsNotFound(ldErr) {
+ if _, isComposeBuild := composeBuildRefs[refs.NormalizeImageUpdateRef(imageRef)]; isComposeBuild {
+ return missingLocalBuildImageUpdateResultInternal(parts.Tag, int(time.Since(start).Milliseconds())), nil
+ }
+ }
registryCtx, registryCancel := s.registryContextInternal(ctx)
digestResult, digestErr := s.registryService.InspectImageDigest(registryCtx, imageRef, externalCreds)
@@ -1278,6 +1320,22 @@ func (s *ImageUpdateService) checkSingleImageInBatchInternal(ctx context.Context
if ldErr != nil {
snapshot, ldErr = s.inspectLocalImageSnapshotInternal(ctx, imageRef, composeBuildRefs)
if ldErr != nil {
+ if cerrdefs.IsNotFound(ldErr) {
+ // The ref resolved remotely but was never pulled locally (e.g. a
+ // stopped project whose compose pin changed): there is nothing
+ // local to compare, so report a distinct not-pulled state rather
+ // than a failed check or an available update.
+ return &imageupdate.Response{
+ UpdateType: models.UpdateTypeNotPulled,
+ LatestDigest: digestResult.Digest,
+ CheckTime: time.Now(),
+ ResponseTimeMs: int(time.Since(start).Milliseconds()),
+ AuthMethod: digestResult.AuthMethod,
+ AuthUsername: digestResult.AuthUsername,
+ AuthRegistry: digestResult.AuthRegistry,
+ UsedCredential: digestResult.UsedCredential,
+ }, nil
+ }
return &imageupdate.Response{
Error: ldErr.Error(),
CheckTime: time.Now(),
diff --git a/backend/internal/imageupdate/service_test.go b/backend/internal/imageupdate/service_test.go
index c782b5b87..5bc97a6ff 100644
--- a/backend/internal/imageupdate/service_test.go
+++ b/backend/internal/imageupdate/service_test.go
@@ -493,6 +493,44 @@ func TestImageUpdateService_CheckMultipleImages_ComposeBuildSkipsRegistryWithRep
assert.Zero(t, registryCalls.Load())
}
+func TestImageUpdateService_CheckMultipleImages_ComposeBuildMissingLocallySkipsRegistry(t *testing.T) {
+ db := setupImageUpdateTestDB(t)
+ buildRefsJSON := `["test2:latest"]`
+ require.NoError(t, db.Create(&models.Project{
+ BaseModel: models.BaseModel{ID: "compose-build-missing-project"},
+ Name: "compose-build-missing-project",
+ BuildImageRefsJSON: &buildRefsJSON,
+ }).Error)
+
+ dockerServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ http.Error(w, "No such image", http.StatusNotFound)
+ }))
+ t.Cleanup(dockerServer.Close)
+
+ var registryCalls atomic.Int32
+ registryService := registry.NewContainerRegistryService(db, func(context.Context) (registry.RegistryDaemonClient, error) {
+ return &fakeRegistryDaemonClient{
+ distributionInspectFn: func(context.Context, string, client.DistributionInspectOptions) (client.DistributionInspectResult, error) {
+ registryCalls.Add(1)
+ return client.DistributionInspectResult{}, nil
+ },
+ }, nil
+ }, nil)
+
+ dockerService := &docker.DockerClientService{Client: newImageUpdateTestDockerClientInternal(t, dockerServer)}
+ eventService := event.NewEventService(db, nil, nil)
+ svc := NewImageUpdateService(db, nil, registryService, dockerService, eventService, nil, nil)
+
+ results, err := svc.CheckMultipleImages(context.Background(), []string{"test2:latest"}, nil)
+ require.NoError(t, err)
+ result := results["test2:latest"]
+ require.NotNil(t, result)
+ assert.Empty(t, result.Error)
+ assert.False(t, result.HasUpdate)
+ assert.Equal(t, models.UpdateTypeLocal, result.UpdateType)
+ assert.Zero(t, registryCalls.Load())
+}
+
func TestImageUpdateService_InspectLocalImageSnapshot_NoRepoDigestsRemainsLocal(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if strings.Contains(r.URL.Path, "/images/") && strings.HasSuffix(r.URL.Path, "/json") {
@@ -1056,7 +1094,7 @@ func TestImageUpdateService_CheckMultipleImages_UsesDockerHubCredentialsOnFirstA
assert.True(t, result.UsedCredential)
}
-func TestImageUpdateService_CheckMultipleImages_PersistsRefScopedErrorsWhenLocalImageMissing(t *testing.T) {
+func TestImageUpdateService_CheckMultipleImages_ReportsNotPulledWhenLocalImageMissing(t *testing.T) {
db := setupImageUpdateTestDB(t)
remoteDigest := digest.FromString("registry-only-remote").String()
@@ -1083,15 +1121,19 @@ func TestImageUpdateService_CheckMultipleImages_PersistsRefScopedErrorsWhenLocal
require.NoError(t, err)
require.Contains(t, results, imageRef)
require.NotNil(t, results[imageRef])
- assert.Contains(t, results[imageRef].Error, "failed to inspect image")
+ assert.Empty(t, results[imageRef].Error)
+ assert.False(t, results[imageRef].HasUpdate)
+ assert.Equal(t, models.UpdateTypeNotPulled, results[imageRef].UpdateType)
+ assert.Equal(t, remoteDigest, results[imageRef].LatestDigest)
var saved models.ImageUpdateRecord
repository := fmt.Sprintf("%s/library/nginx", serverURL.Host)
require.NoError(t, db.WithContext(context.Background()).Where("id = ?", fmt.Sprintf("ref::%s@alpine", strings.ToLower(strings.TrimSpace(repository)))).First(&saved).Error)
assert.Equal(t, repository, saved.Repository)
assert.Equal(t, "alpine", saved.Tag)
- require.NotNil(t, saved.LastError)
- assert.Contains(t, *saved.LastError, "failed to inspect image")
+ assert.False(t, saved.HasUpdate)
+ assert.Equal(t, models.UpdateTypeNotPulled, saved.UpdateType)
+ assert.Nil(t, saved.LastError)
}
func TestImageUpdateService_SaveUpdateResultWithSnapshotInternal_PersistsRegistryOnlySuccessWithSyntheticID(t *testing.T) {
diff --git a/backend/internal/models/image_update.go b/backend/internal/models/image_update.go
index 81eda8210..015a01282 100644
--- a/backend/internal/models/image_update.go
+++ b/backend/internal/models/image_update.go
@@ -39,9 +39,10 @@ type ImageUpdate struct {
}
const (
- UpdateTypeDigest = "digest"
- UpdateTypeTag = "tag"
- UpdateTypeLocal = "local"
+ UpdateTypeDigest = "digest"
+ UpdateTypeTag = "tag"
+ UpdateTypeLocal = "local"
+ UpdateTypeNotPulled = "not_pulled"
)
func (i *ImageUpdateRecord) NeedsUpdate() bool {
diff --git a/backend/internal/project/project_details.go b/backend/internal/project/project_details.go
index ced4589fb..0b73e2496 100644
--- a/backend/internal/project/project_details.go
+++ b/backend/internal/project/project_details.go
@@ -468,11 +468,19 @@ func buildProjectUpdateInfoSummaryInternal(
}
summary.CheckedImageCount++
+ if summary.UpdateInfoByRef == nil {
+ summary.UpdateInfoByRef = make(map[string]imagetypes.UpdateInfo)
+ }
+ summary.UpdateInfoByRef[imageRef] = *info
if info.HasUpdate {
summary.HasUpdate = true
summary.ImagesWithUpdates++
summary.UpdatedImageRefs = append(summary.UpdatedImageRefs, imageRef)
}
+ if info.UpdateType == models.UpdateTypeNotPulled {
+ summary.ImagesNotPulled++
+ summary.NotPulledImageRefs = append(summary.NotPulledImageRefs, imageRef)
+ }
if strings.TrimSpace(info.Error) != "" {
summary.ErrorCount++
if summary.ErrorMessage == nil {
@@ -491,6 +499,8 @@ func buildProjectUpdateInfoSummaryInternal(
summary.Status = "has_update"
case summary.ErrorCount > 0:
summary.Status = "error"
+ case summary.ImagesNotPulled > 0:
+ summary.Status = "not_pulled"
case summary.CheckedImageCount == imageCount:
summary.Status = "up_to_date"
default:
diff --git a/backend/internal/project/service_test.go b/backend/internal/project/service_test.go
index 310a59fda..993aa5f2b 100644
--- a/backend/internal/project/service_test.go
+++ b/backend/internal/project/service_test.go
@@ -3311,6 +3311,19 @@ func TestBuildProjectUpdateInfoSummaryInternal(t *testing.T) {
wantErrors: 0,
wantUpdates: 0,
},
+ {
+ name: "not pulled when an image is missing locally and nothing else needs attention",
+ imageRefs: []string{"nginx:latest", "redis:7"},
+ updates: map[string]*imagetypes.UpdateInfo{
+ "nginx:latest": {HasUpdate: false, UpdateType: models.UpdateTypeNotPulled, CheckTime: now},
+ "redis:7": {HasUpdate: false, CheckTime: now.Add(-time.Minute)},
+ },
+ wantStatus: "not_pulled",
+ wantCount: 2,
+ wantChecked: 2,
+ wantErrors: 0,
+ wantUpdates: 0,
+ },
}
for _, tt := range tests {
diff --git a/frontend/messages/en.json b/frontend/messages/en.json
index 14f91f14e..ae18f498f 100644
--- a/frontend/messages/en.json
+++ b/frontend/messages/en.json
@@ -579,6 +579,7 @@
"dashboard_view_cards": "Card view",
"dashboard_view_table": "Table view",
"images_updates_count": "{updated} of {total} images have updates",
+ "images_not_pulled_count": "{notPulled} of {total} images not pulled",
"containers_update_confirm_message": "This will pull the latest image and apply the appropriate update for \"{name}\". Do you want to continue?",
"containers_update_pulling_image": "Pulling latest image...",
"containers_update_success": "Container \"{name}\" updated successfully",
@@ -2149,6 +2150,8 @@
"image_update_querying_registry": "Querying registry for latest version…",
"image_update_local_title": "Local build",
"image_update_local_desc": "This image was built locally and has no registry to check against.",
+ "image_update_not_pulled_title": "Not Pulled",
+ "image_update_not_pulled_desc": "This tag is not present locally and will be pulled on the next deploy",
"image_update_status_unknown": "Status Unknown",
"image_update_click_to_check": "Click to check for updates from registry.",
"image_update_unable_check_tags": "Unable to check updates for images without proper tags.",
diff --git a/frontend/package.json b/frontend/package.json
index d2860ad5b..1510775e5 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,91 +1,91 @@
{
- "name": "arcane-frontend",
- "private": true,
- "version": "2.8.0",
- "type": "module",
- "imports": {
- "#lib/*": "./src/lib/*"
- },
- "scripts": {
- "dev": "vp dev --port 3000 --host",
- "build": "vp build",
- "preview": "vp preview --port 3000",
- "check": "pnpm paraglide:compile && svelte-kit sync && svelte-check-rs --tsconfig ./tsconfig.json",
- "format": "vp fmt ./src",
- "format:check": "vp fmt --check ./src",
- "check:watch": "pnpm paraglide:compile && svelte-kit sync && svelte-check-rs --tsconfig ./tsconfig.json --watch",
- "paraglide:compile": "paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide --strategy cookie preferredLanguage baseLocale --silent",
- "fallow": "fallow"
- },
- "dependencies": {
- "@codemirror/autocomplete": "^6.20.3",
- "@codemirror/lang-javascript": "^6.2.5",
- "@codemirror/lang-json": "^6.0.2",
- "@codemirror/lang-markdown": "^6.5.2",
- "@codemirror/lang-yaml": "^6.1.3",
- "@codemirror/language": "^6.12.3",
- "@codemirror/legacy-modes": "^6.5.3",
- "@codemirror/lint": "^6.9.6",
- "@codemirror/merge": "^6.12.2",
- "@codemirror/state": "^6.6.0",
- "@codemirror/view": "^6.43.8",
- "@fontsource-variable/geist-mono": "^5.3.0",
- "@fontsource-variable/montserrat": "^5.3.0",
- "@internationalized/date": "^3.12.3",
- "@lezer/highlight": "^1.2.3",
- "@simplewebauthn/browser": "^13.3.0",
- "@sveltejs/kit": "3.0.0-next.19",
- "@tanstack/svelte-query": "^6.1.38",
- "@tanstack/svelte-table": "^9.1.2",
- "@tanstack/table-core": "9.1.2",
- "@tanstack/virtual-core": "^3.17.7",
- "@uiw/codemirror-themes": "^4.25.11",
- "@xterm/addon-fit": "^0.11.0",
- "@xterm/xterm": "^6.0.0",
- "@xyflow/svelte": "^1.6.2",
- "ajv": "^8.20.0",
- "ansi-to-html": "^0.7.2",
- "bits-ui": "^2.18.1",
- "clsx": "^2.1.1",
- "date-fns": "^4.4.0",
- "embla-carousel-svelte": "^8.6.0",
- "formsnap": "^2.0.1",
- "ky": "^2.0.2",
- "marked": "^18.0.9",
- "mode-watcher": "^1.1.0",
- "runed": "^0.37.1",
- "svelte": "^5.56.8",
- "svelte-codemirror-editor": "^2.1.0",
- "svelte-easy-crop": "^5.0.1",
- "svelte-sonner": "^1.1.1",
- "tailwind-merge": "^3.6.0",
- "tailwind-variants": "^3.3.1",
- "vaul-svelte": "1.0.0-next.7",
- "yaml": "^2.9.0",
- "zod": "^4.4.3"
- },
- "devDependencies": {
- "@iconify/json": "^2.2.513",
- "@inlang/paraglide-js": "2.23.2",
- "@sveltejs/adapter-static": "^4.0.0-next.4",
- "@sveltejs/vite-plugin-svelte": "^7.3.0",
- "@tailwindcss/vite": "^4.3.3",
- "@tanstack/svelte-query-devtools": "^6.1.38",
- "@types/node": "^26.2.0",
- "@typescript/native-preview": "7.0.0-dev.20260707.2",
- "fallow": "^3.14.0",
- "isomorphic-dompurify": "^3.22.0",
- "paneforge": "^1.0.2",
- "shadcn-svelte": "^1.5.0",
- "svelte-check-rs": "^0.11.0",
- "svelte-toolbelt": "^0.10.6",
- "sveltekit-superforms": "^2.30.2",
- "tailwindcss": "^4.3.3",
- "tsx": "^4.23.12",
- "tw-animate-css": "^1.4.0",
- "typescript": "npm:@typescript/typescript6@^6.0.2",
- "unplugin-icons": "^23.0.1",
- "vite": "catalog:",
- "vite-plus": "catalog:"
- }
+ "name": "arcane-frontend",
+ "private": true,
+ "version": "2.8.0",
+ "type": "module",
+ "imports": {
+ "#lib/*": "./src/lib/*"
+ },
+ "scripts": {
+ "dev": "vp dev --port 3000 --host",
+ "build": "vp build",
+ "preview": "vp preview --port 3000",
+ "check": "pnpm paraglide:compile && svelte-kit sync && svelte-check-rs --tsconfig ./tsconfig.json",
+ "format": "vp fmt ./src",
+ "format:check": "vp fmt --check ./src",
+ "check:watch": "pnpm paraglide:compile && svelte-kit sync && svelte-check-rs --tsconfig ./tsconfig.json --watch",
+ "paraglide:compile": "paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide --strategy cookie preferredLanguage baseLocale --silent",
+ "fallow": "fallow"
+ },
+ "dependencies": {
+ "@codemirror/autocomplete": "^6.20.3",
+ "@codemirror/lang-javascript": "^6.2.5",
+ "@codemirror/lang-json": "^6.0.2",
+ "@codemirror/lang-markdown": "^6.5.2",
+ "@codemirror/lang-yaml": "^6.1.3",
+ "@codemirror/language": "^6.12.3",
+ "@codemirror/legacy-modes": "^6.5.3",
+ "@codemirror/lint": "^6.9.6",
+ "@codemirror/merge": "^6.12.2",
+ "@codemirror/state": "^6.6.0",
+ "@codemirror/view": "^6.43.8",
+ "@fontsource-variable/geist-mono": "^5.3.0",
+ "@fontsource-variable/montserrat": "^5.3.0",
+ "@internationalized/date": "^3.12.3",
+ "@lezer/highlight": "^1.2.3",
+ "@simplewebauthn/browser": "^13.3.0",
+ "@sveltejs/kit": "3.0.0-next.19",
+ "@tanstack/svelte-query": "^6.1.38",
+ "@tanstack/svelte-table": "^9.1.2",
+ "@tanstack/table-core": "9.1.2",
+ "@tanstack/virtual-core": "^3.17.7",
+ "@uiw/codemirror-themes": "^4.25.11",
+ "@xterm/addon-fit": "^0.11.0",
+ "@xterm/xterm": "^6.0.0",
+ "@xyflow/svelte": "^1.6.2",
+ "ajv": "^8.20.0",
+ "ansi-to-html": "^0.7.2",
+ "bits-ui": "^2.18.1",
+ "clsx": "^2.1.1",
+ "date-fns": "^4.4.0",
+ "embla-carousel-svelte": "^8.6.0",
+ "formsnap": "^2.0.1",
+ "ky": "^2.0.2",
+ "marked": "^18.0.9",
+ "mode-watcher": "^1.1.0",
+ "runed": "^0.37.1",
+ "svelte": "^5.56.8",
+ "svelte-codemirror-editor": "^2.1.0",
+ "svelte-easy-crop": "^5.0.1",
+ "svelte-sonner": "^1.1.1",
+ "tailwind-merge": "^3.6.0",
+ "tailwind-variants": "^3.3.1",
+ "vaul-svelte": "1.0.0-next.7",
+ "yaml": "^2.9.0",
+ "zod": "^4.4.3"
+ },
+ "devDependencies": {
+ "@iconify/json": "^2.2.513",
+ "@inlang/paraglide-js": "2.23.2",
+ "@sveltejs/adapter-static": "^4.0.0-next.4",
+ "@sveltejs/vite-plugin-svelte": "^7.3.0",
+ "@tailwindcss/vite": "^4.3.3",
+ "@tanstack/svelte-query-devtools": "^6.1.38",
+ "@types/node": "^26.2.0",
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
+ "fallow": "^3.14.0",
+ "isomorphic-dompurify": "^3.22.0",
+ "paneforge": "^1.0.2",
+ "shadcn-svelte": "^1.5.0",
+ "svelte-check-rs": "^0.11.0",
+ "svelte-toolbelt": "^0.10.6",
+ "sveltekit-superforms": "^2.30.2",
+ "tailwindcss": "^4.3.3",
+ "tsx": "^4.23.12",
+ "tw-animate-css": "^1.4.0",
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
+ "unplugin-icons": "^23.0.1",
+ "vite": "catalog:",
+ "vite-plus": "catalog:"
+ }
}
diff --git a/frontend/src/lib/components/image-update-item.svelte b/frontend/src/lib/components/image-update-item.svelte
index 28942a0cc..c15296ce0 100644
--- a/frontend/src/lib/components/image-update-item.svelte
+++ b/frontend/src/lib/components/image-update-item.svelte
@@ -8,7 +8,16 @@
import { queryKeys } from '#lib/query/query-keys';
import { environmentStore } from '#lib/stores/environment.store.svelte';
import type { Component } from 'svelte';
- import { ArrowRightIcon, RefreshIcon, AlertIcon, VerifiedCheckIcon, ApiKeyIcon, CircleArrowUpIcon, BoxIcon } from '#lib/icons';
+ import {
+ ArrowRightIcon,
+ RefreshIcon,
+ AlertIcon,
+ VerifiedCheckIcon,
+ ApiKeyIcon,
+ CircleArrowUpIcon,
+ BoxIcon,
+ DownloadIcon
+ } from '#lib/icons';
import { createQuery } from '@tanstack/svelte-query';
import UpdateStatusPopover from '#lib/components/update-status-popover.svelte';
import UpdateStatusBanner from '#lib/components/update-status-banner.svelte';
@@ -19,7 +28,9 @@
interface Props {
updateInfo?: ImageUpdateData;
isLoadingInBackground?: boolean;
- imageId: string;
+ imageId?: string;
+ /** Image reference for ref-scoped checks when no local image ID exists (e.g. not-pulled refs) */
+ imageRef?: string;
repo?: string;
tag?: string;
isLocal?: boolean;
@@ -34,6 +45,7 @@
updateInfo,
isLoadingInBackground = false,
imageId,
+ imageRef,
repo,
tag,
isLocal = false,
@@ -49,8 +61,14 @@
}
const imageUpdateQuery = createQuery<ImageUpdateData>(() => ({
- queryKey: queryKeys.images.updateCheck(environmentStore.selected?.id || '0', imageId),
- queryFn: () => imageService.checkImageUpdateByID(imageId),
+ queryKey: queryKeys.images.updateCheck(environmentStore.selected?.id || '0', imageId || imageRef || ''),
+ queryFn: async () => {
+ if (imageId) return imageService.checkImageUpdateByID(imageId);
+ const results = await imageService.checkMultipleImages([imageRef ?? '']);
+ const result = results[imageRef ?? ''];
+ if (!result) throw new Error(m.images_update_check_failed());
+ return result;
+ },
enabled: false,
retry: false
}));
@@ -93,7 +111,9 @@
let isOpen = $state(false);
const isLocalImage = $derived(!!isLocal || effectiveUpdateInfo?.updateType === 'local');
- const canCheckUpdate = $derived(!!(repo && tag && repo !== '<none>' && tag !== '<none>') && !isLocalImage);
+ const canCheckUpdate = $derived(
+ !!(repo && tag && repo !== '<none>' && tag !== '<none>') && !!(imageId || imageRef) && !isLocalImage
+ );
const hasError = $derived(!!effectiveUpdateInfo?.error && effectiveUpdateInfo.error.trim() !== '');
type AuthBadge = { label: string; variant: BadgeVariant };
@@ -135,7 +155,10 @@
if (effectiveUpdateInfo?.latestVersion && effectiveUpdateInfo.latestVersion.trim() !== '') {
return effectiveUpdateInfo.latestVersion;
}
- if (effectiveUpdateInfo?.updateType === 'digest' && effectiveUpdateInfo?.latestDigest) {
+ if (
+ (effectiveUpdateInfo?.updateType === 'digest' || effectiveUpdateInfo?.updateType === 'not_pulled') &&
+ effectiveUpdateInfo?.latestDigest
+ ) {
return effectiveUpdateInfo.latestDigest.slice(7, 19) + '...';
}
return null;
@@ -205,6 +228,12 @@
return { level: 'Error', color: 'text-red-500', description: m.image_update_could_not_query_registry() };
if (effectiveUpdateInfo.updateType === 'local')
return { level: m.image_update_local_title(), color: 'text-slate-500', description: m.image_update_local_desc() };
+ if (effectiveUpdateInfo.updateType === 'not_pulled')
+ return {
+ level: m.image_update_not_pulled_title(),
+ color: 'text-blue-500',
+ description: m.image_update_not_pulled_desc()
+ };
if (!effectiveUpdateInfo.hasUpdate)
return { level: 'None', color: 'text-green-500', description: m.image_update_up_to_date_desc() };
if (effectiveUpdateInfo.updateType === 'digest')
@@ -383,6 +412,27 @@
{@render recheckButton()}
{/snippet}
+{#snippet notPulledState()}
+ <div class="bg-linear-to-br from-blue-50 to-cyan-50/30 p-4 dark:from-blue-950/20 dark:to-cyan-950/10">
+ <div class="flex items-start gap-3">
+ {@render iconCircle(DownloadIcon, 'from-blue-500', 'to-cyan-500', 'shadow-blue-500/25')}
+ <div class="flex-1">
+ <div class="text-sm font-semibold text-blue-950 dark:text-blue-100">{m.image_update_not_pulled_title()}</div>
+ <div class="text-xs text-blue-900/80 dark:text-blue-300/80">{m.image_update_not_pulled_desc()}</div>
+ {@render authBadgeDisplay()}
+ </div>
+ </div>
+ </div>
+ {@render updateDetails(
+ m.image_update_latest_digest_label(),
+ 'bg-blue-100 dark:bg-blue-900/30',
+ 'text-blue-800 dark:text-blue-300',
+ 'bg-blue-50 dark:bg-blue-950/30',
+ 'text-blue-800 dark:text-blue-300'
+ )}
+ {@render recheckButton()}
+{/snippet}
+
{#snippet versionUpdateState()}
<div class="bg-linear-to-br from-amber-50 to-yellow-50/30 p-4 dark:from-amber-950/20 dark:to-yellow-950/10">
<div class="flex items-start gap-3">
@@ -476,6 +526,8 @@
>
{#if hasError}
<AlertIcon class="size-4 text-red-500" />
+ {:else if effectiveUpdateInfo?.updateType === 'not_pulled'}
+ <DownloadIcon class="size-4 text-blue-500" />
{:else if !effectiveUpdateInfo?.hasUpdate}
<VerifiedCheckIcon class="size-4 text-green-500" />
{:else if effectiveUpdateInfo?.updateType === 'digest'}
@@ -490,6 +542,8 @@
<div class="overflow-hidden rounded-xl">
{#if hasError}
{@render errorState()}
+ {:else if effectiveUpdateInfo?.updateType === 'not_pulled'}
+ {@render notPulledState()}
{:else if !effectiveUpdateInfo?.hasUpdate}
{@render successState()}
{:else if effectiveUpdateInfo?.updateType === 'digest'}
diff --git a/frontend/src/lib/components/project-update-item.svelte b/frontend/src/lib/components/project-update-item.svelte
index 472f37499..ed629075d 100644
--- a/frontend/src/lib/components/project-update-item.svelte
+++ b/frontend/src/lib/components/project-update-item.svelte
@@ -1,11 +1,12 @@
<script lang="ts">
import type { ProjectUpdateInfo } from '#lib/types/swarm';
- import { getProjectUpdateStatus, getProjectUpdateText } from '#lib/utils/docker';
+ import { getProjectUpdateStatus, getProjectUpdateText, parseImageRef } from '#lib/utils/docker';
import { m } from '#lib/paraglide/messages';
import UpdateStatusPopover from '#lib/components/update-status-popover.svelte';
import UpdateStatusBanner from '#lib/components/update-status-banner.svelte';
+ import ImageUpdateItem from '#lib/components/image-update-item.svelte';
import { Spinner } from '#lib/components/ui/spinner/index.js';
- import { AlertIcon, CircleArrowUpIcon, ClockIcon, ImagesIcon, RefreshIcon, VerifiedCheckIcon } from '#lib/icons';
+ import { AlertIcon, CircleArrowUpIcon, ClockIcon, DownloadIcon, ImagesIcon, RefreshIcon, VerifiedCheckIcon } from '#lib/icons';
import type { Component } from 'svelte';
import { formatDateTimeShort } from '#lib/utils/formatting';
import UncheckedRingIcon from '#lib/components/unchecked-ring-icon.svelte';
@@ -30,6 +31,8 @@
const errorMessage = $derived(updateInfo?.errorMessage?.trim() || '');
const imageRefs = $derived(updateInfo?.imageRefs ?? []);
const updatedImageRefs = $derived(updateInfo?.updatedImageRefs ?? []);
+ const notPulledImageRefs = $derived(updateInfo?.notPulledImageRefs ?? []);
+ const updateInfoByRef = $derived(updateInfo?.updateInfoByRef ?? {});
const canCheck = $derived(!!onCheck && !disabled && imageRefs.length > 0);
const directCheckFromTrigger = $derived(canCheck && (status === 'unknown' || status === 'error'));
@@ -43,6 +46,11 @@
return m.images_updates_count({ updated: updatedImageRefs.length, total: imageCount });
});
+ const notPulledSummaryText = $derived.by(() => {
+ if (imageCount <= 0) return null;
+ return m.images_not_pulled_count({ notPulled: notPulledImageRefs.length, total: imageCount });
+ });
+
const lastCheckedAtLabel = $derived.by(() => {
if (!updateInfo?.lastCheckedAt) return null;
const parsed = new Date(updateInfo.lastCheckedAt);
@@ -75,6 +83,18 @@
title: m.images_has_updates(),
description: updatedSummaryText ?? m.images_has_updates()
};
+ case 'not_pulled':
+ return {
+ icon: DownloadIcon,
+ gradientFrom: 'from-blue-500',
+ gradientTo: 'to-cyan-500',
+ shadowColor: 'shadow-blue-500/25',
+ headerClass: 'bg-linear-to-br from-blue-50 to-cyan-50/30 dark:from-blue-950/20 dark:to-cyan-950/10',
+ titleClass: 'text-blue-950 dark:text-blue-100',
+ descriptionClass: 'text-blue-900/80 dark:text-blue-300/80',
+ title: m.image_update_not_pulled_title(),
+ description: notPulledSummaryText ?? m.image_update_not_pulled_desc()
+ };
case 'up_to_date':
return {
icon: VerifiedCheckIcon,
@@ -135,6 +155,14 @@
</div>
{/snippet}
+{#snippet refRow(imageRef: string)}
+ {@const parsed = parseImageRef(imageRef)}
+ <div class="flex items-center rounded-md bg-muted px-2 py-1">
+ <ImageUpdateItem updateInfo={updateInfoByRef[imageRef]} {imageRef} repo={parsed.repo} tag={parsed.tag} />
+ <span class="min-w-0 flex-1 font-mono text-xs break-all text-foreground">{imageRef}</span>
+ </div>
+{/snippet}
+
{#snippet recheckButton()}
{#if canCheck}
<div class="border-t border-border/50 bg-muted/50 p-3">
@@ -204,6 +232,8 @@
<VerifiedCheckIcon class="size-4 text-green-500" />
{:else if status === 'has_update'}
<CircleArrowUpIcon class="size-4 text-blue-500" />
+ {:else if status === 'not_pulled'}
+ <DownloadIcon class="size-4 text-blue-500" />
{:else}
<div class="flex size-4 items-center justify-center text-gray-400 opacity-60">
<UncheckedRingIcon />
@@ -251,14 +281,14 @@
<div class="text-[11px] font-medium tracking-wide text-foreground uppercase">{m.images_has_updates()}</div>
<div class="max-h-40 space-y-1 overflow-auto">
{#each updatedImageRefs as imageRef (imageRef)}
- <div class="rounded-md bg-muted px-2 py-1 font-mono text-xs break-all text-foreground">
- {imageRef}
- </div>
+ {@render refRow(imageRef)}
{/each}
</div>
</div>
{:else if status === 'up_to_date'}
<div class="text-xs leading-relaxed text-muted-foreground">{m.image_update_up_to_date_desc()}</div>
+ {:else if status === 'not_pulled'}
+ <div class="text-xs leading-relaxed text-muted-foreground">{m.image_update_not_pulled_desc()}</div>
{:else if status === 'error'}
<div class="text-xs leading-relaxed text-muted-foreground">
{errorMessage || m.image_update_could_not_query_registry()}
@@ -273,6 +303,19 @@
</div>
{/if}
+ {#if notPulledImageRefs.length > 0 && (status === 'not_pulled' || status === 'has_update')}
+ <div class="space-y-2">
+ <div class="text-[11px] font-medium tracking-wide text-foreground uppercase">
+ {m.image_update_not_pulled_title()}
+ </div>
+ <div class="max-h-40 space-y-1 overflow-auto">
+ {#each notPulledImageRefs as imageRef (imageRef)}
+ {@render refRow(imageRef)}
+ {/each}
+ </div>
+ </div>
+ {/if}
+
{#if errorCount > 0 && status !== 'error'}
<div class="flex items-center gap-2 text-xs text-muted-foreground">
<AlertIcon class="size-3.5 text-red-500" />
diff --git a/frontend/src/lib/types/swarm.ts b/frontend/src/lib/types/swarm.ts
index 693ff99cc..575fd4970 100644
--- a/frontend/src/lib/types/swarm.ts
+++ b/frontend/src/lib/types/swarm.ts
@@ -1,3 +1,5 @@
+import type { ImageUpdateData } from './docker';
+
// --- Swarm services, ports, mounts ---
export interface SwarmServicePort {
@@ -570,15 +572,18 @@ export interface RuntimeService {
}
export interface ProjectUpdateInfo {
- status: 'has_update' | 'up_to_date' | 'unknown' | 'error';
+ status: 'has_update' | 'up_to_date' | 'not_pulled' | 'unknown' | 'error';
hasUpdate: boolean;
imageCount: number;
checkedImageCount: number;
imagesWithUpdates: number;
+ imagesNotPulled: number;
errorCount: number;
errorMessage?: string;
imageRefs?: string[];
updatedImageRefs?: string[];
+ notPulledImageRefs?: string[];
+ updateInfoByRef?: Record<string, ImageUpdateData>;
lastCheckedAt?: string;
}
diff --git a/frontend/src/lib/utils/docker.ts b/frontend/src/lib/utils/docker.ts
index 5cb791d87..98f2b25b1 100644
--- a/frontend/src/lib/utils/docker.ts
+++ b/frontend/src/lib/utils/docker.ts
@@ -105,6 +105,21 @@ export function isSwarmServiceModeScalable(mode: string): boolean {
return mode === 'replicated' || mode === 'replicated-job';
}
+export function parseImageRef(imageRef: string): { repo: string; tag: string } {
+ // Handle images like "nginx:latest", "library/nginx:1.0", "ghcr.io/org/image:tag"
+ const lastColon = imageRef.lastIndexOf(':');
+ // Check if colon is part of a tag (not a port in registry URL)
+ const hasTag = lastColon > 0 && !imageRef.substring(lastColon).includes('/');
+
+ if (hasTag) {
+ return {
+ repo: imageRef.substring(0, lastColon),
+ tag: imageRef.substring(lastColon + 1)
+ };
+ }
+ return { repo: imageRef, tag: 'latest' };
+}
+
// --- Project update status display ---
type ProjectUpdateStatus = ProjectUpdateInfo['status'];
@@ -120,6 +135,8 @@ export function getProjectUpdateText(updateInfo?: ProjectUpdateInfo): string {
return m.images_has_updates();
case 'up_to_date':
return m.image_update_up_to_date_title();
+ case 'not_pulled':
+ return m.image_update_not_pulled_title();
case 'error':
return m.common_error();
default:
@@ -133,6 +150,8 @@ export function getProjectUpdateVariant(updateInfo?: ProjectUpdateInfo): Project
return 'blue';
case 'up_to_date':
return 'green';
+ case 'not_pulled':
+ return 'blue';
case 'error':
return 'red';
default:
@@ -142,6 +161,8 @@ export function getProjectUpdateVariant(updateInfo?: ProjectUpdateInfo): Project
export function getProjectUpdateTooltip(updateInfo?: ProjectUpdateInfo): string | undefined {
switch (getProjectUpdateStatus(updateInfo)) {
+ case 'not_pulled':
+ return m.image_update_not_pulled_desc();
case 'error':
return m.image_update_check_failed_title();
case 'unknown':
diff --git a/frontend/src/routes/(app)/containers/container-table.helpers.ts b/frontend/src/routes/(app)/containers/container-table.helpers.ts
index 28bc42695..96d7a244b 100644
--- a/frontend/src/routes/(app)/containers/container-table.helpers.ts
+++ b/frontend/src/routes/(app)/containers/container-table.helpers.ts
@@ -14,21 +14,6 @@ export type ActionStatus =
| '';
export type StateBadgeVariant = 'green' | 'red' | 'amber';
-export function parseImageRef(imageRef: string): { repo: string; tag: string } {
- // Handle images like "nginx:latest", "library/nginx:1.0", "ghcr.io/org/image:tag"
- const lastColon = imageRef.lastIndexOf(':');
- // Check if colon is part of a tag (not a port in registry URL)
- const hasTag = lastColon > 0 && !imageRef.substring(lastColon).includes('/');
-
- if (hasTag) {
- return {
- repo: imageRef.substring(0, lastColon),
- tag: imageRef.substring(lastColon + 1)
- };
- }
- return { repo: imageRef, tag: 'latest' };
-}
-
export function getContainerDisplayName(container: ContainerSummaryDto): string {
const first = container.names?.[0];
if (first) {
diff --git a/frontend/src/routes/(app)/containers/container-table.svelte b/frontend/src/routes/(app)/containers/container-table.svelte
index 484dac6b3..b9f13bce9 100644
--- a/frontend/src/routes/(app)/containers/container-table.svelte
+++ b/frontend/src/routes/(app)/containers/container-table.svelte
@@ -30,7 +30,7 @@
import { environmentStore } from '#lib/stores/environment.store.svelte';
import { hasPermission } from '#lib/utils/auth';
import IconImage from '#lib/components/icon-image.svelte';
- import { getContainerIpAddresses, getThemedIconUrl } from '#lib/utils/docker';
+ import { getContainerIpAddresses, getThemedIconUrl, parseImageRef } from '#lib/utils/docker';
import { hasAnyLoadingState } from '#lib/utils/bulk-actions';
import { createContainerActions } from './container-table.actions';
import {
@@ -38,7 +38,6 @@
getContainerDisplayName,
getProjectName,
getStateBadgeVariant,
- parseImageRef,
getContainerStatusLabel,
type ActionStatus
} from './container-table.helpers';
diff --git a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte b/frontend/src/routes/(app)/projects/[projectId]/+page.svelte
index 1313f668b..e10413b95 100644
--- a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte
+++ b/frontend/src/routes/(app)/projects/[projectId]/+page.svelte
@@ -1500,7 +1500,12 @@
persistStorage="local"
>
{#snippet first()}
- <ProjectServicesPanel services={project.runtimeServices} {projectId} onRefresh={() => refreshProjectDetails()} />
+ <ProjectServicesPanel
+ services={project.runtimeServices}
+ {projectId}
+ updateInfoByRef={project.updateInfo?.updateInfoByRef}
+ onRefresh={() => refreshProjectDetails()}
+ />
{/snippet}
{#snippet second()}
<div class="flex h-full min-h-0 flex-col overflow-hidden">
@@ -1515,7 +1520,12 @@
</div>
{:else}
<div class="flex h-full min-h-0 flex-col overflow-hidden rounded-lg border border-border bg-card">
- <ProjectServicesPanel services={project.runtimeServices} {projectId} onRefresh={() => refreshProjectDetails()} />
+ <ProjectServicesPanel
+ services={project.runtimeServices}
+ {projectId}
+ updateInfoByRef={project.updateInfo?.updateInfoByRef}
+ onRefresh={() => refreshProjectDetails()}
+ />
</div>
{/if}
</Tabs.Content>
diff --git a/frontend/src/routes/(app)/projects/components/ProjectServicesPanel.svelte b/frontend/src/routes/(app)/projects/components/ProjectServicesPanel.svelte
index 4a4344ac8..d455af55b 100644
--- a/frontend/src/routes/(app)/projects/components/ProjectServicesPanel.svelte
+++ b/frontend/src/routes/(app)/projects/components/ProjectServicesPanel.svelte
@@ -5,10 +5,12 @@
import RowActionsMenu from '#lib/components/arcane-table/row-actions-menu.svelte';
import ContainerActionMenuItem from '#lib/components/arcane-table/cells/container-action-menu-item.svelte';
import IconImage from '#lib/components/icon-image.svelte';
+ import ImageUpdateItem from '#lib/components/image-update-item.svelte';
import { PortBadge } from '#lib/components/badges/index.js';
import { mode } from 'mode-watcher';
- import { getThemedIconUrl } from '#lib/utils/docker';
+ import { getThemedIconUrl, parseImageRef } from '#lib/utils/docker';
import type { RuntimeService } from '#lib/types/swarm';
+ import type { ImageUpdateData } from '#lib/types/docker';
import { m } from '#lib/paraglide/messages';
import { projectService } from '#lib/services/project-service';
import { environmentStore } from '#lib/stores/environment.store.svelte';
@@ -23,10 +25,15 @@
interface Props {
services?: RuntimeService[];
projectId?: string;
+ updateInfoByRef?: Record<string, ImageUpdateData>;
onRefresh?: () => Promise<void>;
}
- let { services = [], projectId, onRefresh }: Props = $props();
+ let { services = [], projectId, updateInfoByRef = {}, onRefresh }: Props = $props();
+
+ function serviceImageRef(service: RuntimeService): string {
+ return service.serviceConfig?.image || service.image || '';
+ }
const currentEnvId = $derived(environmentStore.selected?.id || '0');
const canStartContainer = $derived(hasPermission('containers:start', currentEnvId));
@@ -168,6 +175,11 @@
{#if item.health}
<HealthIcon class={cn('size-3.5 shrink-0', healthClass(item.health))} />
{/if}
+ {#if serviceImageRef(item)}
+ {@const imageRef = serviceImageRef(item)}
+ {@const parsed = parseImageRef(imageRef)}
+ <ImageUpdateItem updateInfo={updateInfoByRef[imageRef]} {imageRef} repo={parsed.repo} tag={parsed.tag} />
+ {/if}
{#if item.containerId}
<RowActionsMenu triggerClass="size-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100">
<DropdownMenu.Item onclick={() => goto(getContainerUrl(item))} disabled={isAnyLoading}>
diff --git a/types/project/project.go b/types/project/project.go
index af0564a21..28d262841 100644
--- a/types/project/project.go
+++ b/types/project/project.go
@@ -5,6 +5,7 @@ import (
composetypes "github.com/compose-spec/compose-go/v2/types"
"github.com/getarcaneapp/arcane/types/v2/containerregistry"
+ imagetypes "github.com/getarcaneapp/arcane/types/v2/image"
)
// IncludeFile represents an included file within a project.
@@ -222,7 +223,7 @@ type RuntimeService struct {
type UpdateInfo struct {
// Status is the aggregate update status for the project.
//
- // Values: has_update | up_to_date | unknown | error
+ // Values: has_update | up_to_date | not_pulled | unknown | error
// Required: true
Status string `json:"status"`
@@ -246,6 +247,11 @@ type UpdateInfo struct {
// Required: true
ImagesWithUpdates int `json:"imagesWithUpdates"`
+ // ImagesNotPulled is the number of project image references not present locally.
+ //
+ // Required: true
+ ImagesNotPulled int `json:"imagesNotPulled"`
+
// ErrorCount is the number of project image references whose latest check failed.
//
// Required: true
@@ -266,6 +272,16 @@ type UpdateInfo struct {
// Required: false
UpdatedImageRefs []string `json:"updatedImageRefs,omitempty"`
+ // NotPulledImageRefs is the subset of project image references not present locally.
+ //
+ // Required: false
+ NotPulledImageRefs []string `json:"notPulledImageRefs,omitempty"`
+
+ // UpdateInfoByRef contains the latest persisted per-image update result keyed by image reference.
+ //
+ // Required: false
+ UpdateInfoByRef map[string]imagetypes.UpdateInfo `json:"updateInfoByRef,omitempty"`
+
// LastCheckedAt is the latest successful or failed image update check time for this project.
//
// Required: false