Skip to content

Commit

Permalink
fix status cache
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz committed Jul 5, 2024
1 parent 3e52525 commit 318f9ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/applier/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (cb *commonBuilder) finalize() (*commonBuilder, error) {
}
if cx.statusWatcher == nil {
cx.statusWatcher = watcher.NewDynamicStatusWatcher(cx.client, cx.mapper, watcher.Options{
RESTScopeStrategy: lo.ToPtr(kwatcher.RESTScopeRoot),
RESTScopeStrategy: lo.ToPtr(kwatcher.RESTScopeRoot),
Filters: &kwatcher.Filters{
Labels: common.ManagedByAgentLabelSelector(),
Fields: nil,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/resource_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (in *ResourceCache) deleteCacheEntry(r *event.ResourceStatus) {

func (in *ResourceCache) GetCacheStatus(key string) (*applyevent.StatusEvent, error) {
entry, exists := in.cache.Get(key)
if exists {
if exists && entry.status != nil {
return entry.status, nil
}
rk, err := ResourceKeyFromString(key)
Expand Down

0 comments on commit 318f9ac

Please sign in to comment.