Skip to content

Commit

Permalink
Issue #657 - return error from retried PackageRev metadata update
Browse files Browse the repository at this point in the history
- extra return in crdMetadataStore.Delete() is case of retry exhaustion
  and an error from the RetryOnConflict block

nephio-project/nephio#657
  • Loading branch information
JamesMcDermott committed Oct 10, 2024
1 parent 08d2bab commit 5fee3d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/meta/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,13 @@ func (c *crdMetadataStore) Delete(ctx context.Context, namespacedName types.Name
}
return nil
})
if retriedErr != nil {
return PackageRevisionMeta{}, retriedErr
}

klog.Infof("Deleting packagerev %s/%s", internalPkgRev.Namespace, internalPkgRev.Name)
if retriedErr = c.coreClient.Delete(ctx, &internalPkgRev); retriedErr != nil {
return PackageRevisionMeta{}, retriedErr
if err := c.coreClient.Delete(ctx, &internalPkgRev); err != nil {
return PackageRevisionMeta{}, err
}
return toPackageRevisionMeta(&internalPkgRev), nil
}
Expand Down

0 comments on commit 5fee3d1

Please sign in to comment.