-
Notifications
You must be signed in to change notification settings - Fork 38
feat: add svc export trackability #1061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
c47b06c
5073c45
884776e
6b43ca2
72bbcc5
732108e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -270,11 +270,12 @@ func trackServiceExportAvailability(curObj *unstructured.Unstructured) (Manifest | |
| klog.V(2).InfoS("Still need to wait for ServiceExport to be valid", "serviceExport", svcExportObj, "validCondition", validCond) | ||
| return ManifestProcessingAvailabilityResultTypeNotYetAvailable, nil | ||
| } | ||
|
|
||
| // Validate annotation weight. Updating the annotation won't change the object generation, | ||
| // so the current status is not reliable and need to validate the annotation again here | ||
| weight, err := objectmeta.ExtractWeightFromServiceExport(&svcExport) | ||
britaniar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if err != nil { | ||
| klog.V(2).InfoS("ServiceExport has invalid weight", "serviceExport", svcExportObj, "error", err) | ||
| return ManifestProcessingAvailabilityResultTypeFailed, err | ||
| klog.Errorf(err.Error(), "ServiceExport has invalid weight", "serviceExport", svcExportObj) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. klog.Errorf(err, "ServiceExport has invalid weight", "serviceExport", svcExportObj) you don't need to call the err.Error(). the klog will print out the error message automatically. |
||
| return ManifestProcessingAvailabilityResultTypeNotYetAvailable, err | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should not return the error here. no need to retry. |
||
| } | ||
| if weight != 0 { | ||
| // Check conflict condition for non-zero weight | ||
|
|
@@ -283,8 +284,10 @@ func trackServiceExportAvailability(curObj *unstructured.Unstructured) (Manifest | |
| klog.V(2).InfoS("Still need to wait for ServiceExport to not have conflicts", "serviceExport", svcExportObj, "conflictCondition", conflictCond) | ||
| return ManifestProcessingAvailabilityResultTypeNotYetAvailable, nil | ||
| } | ||
| } else { | ||
| klog.V(2).InfoS("Skipping checking the conflict condition for the weight 0", "serviceExport", svcExportObj) | ||
| } | ||
britaniar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| klog.V(2).InfoS("Skipping checking the conflict condition for the weight 0", "serviceExport", svcExportObj) | ||
|
|
||
| klog.V(2).InfoS("ServiceExport is available", "serviceExport", svcExportObj) | ||
| return ManifestProcessingAvailabilityResultTypeAvailable, nil | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing period.