Skip to content

Commit

Permalink
Merge pull request #4791 from caproven/fix-4790
Browse files Browse the repository at this point in the history
Performance fix for fetching previous resource IDs
  • Loading branch information
k8s-ci-robot authored Sep 12, 2022
2 parents 6c587c9 + ca71736 commit ce18530
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/internal/utils/makeResIds.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ func PrevIds(n *yaml.RNode) ([]resid.ResId, error) {
"number of previous namespaces, " +
"number of previous kinds not equal")
}
meta, err := n.GetMeta()
if err != nil {
return nil, fmt.Errorf("cannot parse resource metadata: %w", err)
}
group, version := resid.ParseGroupVersion(meta.APIVersion)
for i := range names {
meta, err := n.GetMeta()
if err != nil {
return nil, err
}
group, version := resid.ParseGroupVersion(meta.APIVersion)
gvk := resid.Gvk{
Group: group,
Version: version,
Expand Down

0 comments on commit ce18530

Please sign in to comment.