diff --git a/core/archipelago/src/container/image_versions.rs b/core/archipelago/src/container/image_versions.rs index 03b22866..23f4dc6a 100644 --- a/core/archipelago/src/container/image_versions.rs +++ b/core/archipelago/src/container/image_versions.rs @@ -1,8 +1,8 @@ //! Parser for image-versions.sh — single source of truth for pinned container images. //! -//! Reads the deployed file at /opt/archipelago/image-versions.sh (or the repo-local -//! scripts/image-versions.sh as fallback) and exposes lookup functions so the container -//! scanner can compare running images against pinned targets. +//! Reads the deployed file at /opt/archipelago/scripts/image-versions.sh (the canonical +//! location installed by the image-recipe) with fallbacks for older layouts and the +//! repo-local scripts/image-versions.sh for development runs from the repo root. use std::collections::HashMap; use std::path::Path; @@ -18,8 +18,13 @@ struct CacheEntry { images: HashMap, } -/// File search order — production path first, then repo-local for dev. +/// File search order — canonical production path first, older layout second, +/// repo-local for dev last. The canonical deployed path is +/// /opt/archipelago/scripts/image-versions.sh; earlier builds put it directly +/// in /opt/archipelago/, so that path is kept as a fallback for not-yet-updated +/// nodes. The repo-relative entry matches `cargo run` from the repo root. const PATHS: &[&str] = &[ + "/opt/archipelago/scripts/image-versions.sh", "/opt/archipelago/image-versions.sh", "scripts/image-versions.sh", ];