Unified Storage: Pass ns, group, resource to GetResourceStats instead of just namespace (#114050)

* passes nsr to GetResourceStats instead of just namespace

* removes ns check

* fixes failing tests

* make update-workspace

* pass group and resource from rebuild request when getting resource stats
This commit is contained in:
owensmallwood
2025-11-18 13:05:21 -06:00
committed by GitHub
parent bf3de07147
commit 8dddff3ce4
12 changed files with 57 additions and 26 deletions
@@ -1223,8 +1223,8 @@ func (k *kvStorageBackend) WatchWriteEvents(ctx context.Context) (<-chan *Writte
}
// GetResourceStats returns resource stats within the storage backend.
func (k *kvStorageBackend) GetResourceStats(ctx context.Context, namespace string, minCount int) ([]ResourceStats, error) {
return k.dataStore.GetResourceStats(ctx, namespace, minCount)
func (k *kvStorageBackend) GetResourceStats(ctx context.Context, nsr NamespacedResource, minCount int) ([]ResourceStats, error) {
return k.dataStore.GetResourceStats(ctx, nsr.Namespace, minCount)
}
func (k *kvStorageBackend) GetResourceLastImportTimes(ctx context.Context) iter.Seq2[ResourceLastImportTime, error] {