Skip to content

Commit

Permalink
Fix 120758 - prevent cache Load on uninitialized spec
Browse files Browse the repository at this point in the history
Kubernetes-commit: d35a00e218ca6795d7d66a2f7515e9b15b23166c
  • Loading branch information
Jefftree authored and k8s-publishing-bot committed Sep 25, 2023
1 parent 1283b9c commit 0ca3c32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controllers/openapi/aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ func (s *specAggregator) AddUpdateAPIService(apiService *v1.APIService, handler
apiService: *apiService,
downloader: decorateError(apiService.Name, NewCacheableDownloader(s.downloader, handler)),
}
s.specByAPIServiceName[apiService.Name].spec.Store(cached.Result[*spec.Swagger]{Err: fmt.Errorf("spec for apiservice %s is not yet available", apiService.Name)})
s.openAPIVersionedService.UpdateSpecLazy(s.buildMergeSpecLocked())
}

Expand Down

0 comments on commit 0ca3c32

Please sign in to comment.