diff --git a/internal/reconstitution/cache.go b/internal/reconstitution/cache.go index d6de1e72..131ca253 100644 --- a/internal/reconstitution/cache.go +++ b/internal/reconstitution/cache.go @@ -45,6 +45,9 @@ func (c *cache) Get(ctx context.Context, ref *ResourceRef, gen int64) (*Resource resKey := resourceKey{Kind: ref.Kind, Namespace: ref.Namespace, Name: ref.Name} res, ok := resources[resKey] + if !ok { + return nil, false + } return &Resource{ Ref: ref, Manifest: res.Manifest, diff --git a/internal/reconstitution/reconstituter.go b/internal/reconstitution/reconstituter.go index 8f23ee76..5394c156 100644 --- a/internal/reconstitution/reconstituter.go +++ b/internal/reconstitution/reconstituter.go @@ -16,8 +16,6 @@ import ( "github.com/Azure/eno/internal/manager" ) -// TODO: This is fucked because we don't check both the comp/syn gen - only comp (I think) - // reconstituter reconstitutes individual resources from resource slices. // Similar to an informer but with extra logic to handle expanding the slice resources. type reconstituter struct {