fix: avoid stale informer cache in RevisionMetadata handler (#27392)

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
This commit is contained in:
Soumya Ghosh Dastidar 2026-04-17 01:04:21 +05:30 committed by GitHub
parent 8fbb72d1eb
commit 21615be541
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1626,7 +1626,8 @@ func (s *Server) WatchResourceTree(q *application.ResourcesQuery, ws application
}
func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMetadataQuery) (*v1alpha1.RevisionMetadata, error) {
a, proj, err := s.getApplicationEnforceRBACInformer(ctx, rbac.ActionGet, q.GetProject(), q.GetAppNamespace(), q.GetName())
// Read via the client instead of the informer cache to avoid "revision history not found" errors due to stale informer cache
a, proj, err := s.getApplicationEnforceRBACClient(ctx, rbac.ActionGet, q.GetProject(), q.GetAppNamespace(), q.GetName(), "")
if err != nil {
return nil, err
}