Skip to content

Commit

Permalink
Handle nil cache entries
Browse files Browse the repository at this point in the history
  • Loading branch information
jveski committed Dec 6, 2023
1 parent 9e755c9 commit a7378c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions internal/reconstitution/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions internal/reconstitution/reconstituter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a7378c3

Please sign in to comment.