From 0c8e32a10320ba935940eb6a1ddff902a23a2812 Mon Sep 17 00:00:00 2001 From: Petra Jaros Date: Mon, 4 May 2026 16:12:21 -0400 Subject: [PATCH] feat: `MustNewStack` tracks image env vars Co-authored-by: Copilot --- pkg/stack/stack.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/stack/stack.go b/pkg/stack/stack.go index b643119..e06fb60 100644 --- a/pkg/stack/stack.go +++ b/pkg/stack/stack.go @@ -267,6 +267,18 @@ func NewStack(ctx context.Context, t *testing.T, opts ...Option) (*Stack, error) // MustNewStack creates and starts a network, calling t.Fatal on error. func MustNewStack(t *testing.T, opts ...Option) *Stack { t.Helper() + + // These are all read by Docker Compose files. Read them here so that the test + // runner pays attention to them when caching results. + _ = os.Getenv("PIRI_IMAGE") + _ = os.Getenv("GUPPY_IMAGE") + _ = os.Getenv("DELEGATOR_IMAGE") + _ = os.Getenv("INDEXER_IMAGE") + _ = os.Getenv("IPNI_IMAGE") + _ = os.Getenv("SIGNER_IMAGE") + _ = os.Getenv("UPLOAD_IMAGE") + _ = os.Getenv("BLOCKCHAIN_IMAGE") + stack, err := NewStack(context.Background(), t, opts...) if err != nil { t.Fatalf("smeltery: failed to create stack: %v", err)