From 56b5f14b344cdc739f14164c03cd76b94a348fe2 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Thu, 9 May 2024 10:08:13 +0300 Subject: [PATCH] Prevent snapshot drift when upgrading to API v2 Signed-off-by: Stefan Prodan --- internal/release/digest_test.go | 2 +- internal/release/observation.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/release/digest_test.go b/internal/release/digest_test.go index 3aca5b8eb..c340ca965 100644 --- a/internal/release/digest_test.go +++ b/internal/release/digest_test.go @@ -37,7 +37,7 @@ func TestDigest(t *testing.T) { rel: Observation{ Name: "foo", }, - exp: "sha256:ca8901e499a79368647134cc4f1c2118f8e7ec64c8a4703b281d17fb01acfbed", + exp: "sha256:91b6773f7696d3eb405708a07e2daedc6e69664dabac8e10af7d570d09f947d5", }, } for _, tt := range tests { diff --git a/internal/release/observation.go b/internal/release/observation.go index 48a5bb56d..71ec18613 100644 --- a/internal/release/observation.go +++ b/internal/release/observation.go @@ -80,7 +80,7 @@ type Observation struct { // Namespace is the Kubernetes namespace of the release. Namespace string `json:"namespace"` // OCIDigest is the digest of the OCI artifact that was used to - OCIDigest string `json:"ociDigest"` + OCIDigest string `json:"ociDigest,omitempty"` } // Targets returns if the release matches the given name, namespace and