-
Notifications
You must be signed in to change notification settings - Fork 15
do not interrupt sync logic when non-fatal error occured #21
do not interrupt sync logic when non-fatal error occured #21
Conversation
@wawlian: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -153,8 +150,10 @@ func (ds *DeviceSyncer) findDiffDevice( | |||
ed := edgeDevices[i] | |||
edName := util.GetEdgeDeviceName(&ed, EdgeXObjectName) | |||
if _, exists := kubeDevices[edName]; !exists { | |||
klog.V(5).Infof("found redundant edge device %s", edName) |
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.
How about printing all redundantEdgeDeviceNames, redundantKubeDeviceNames or syncedDeviceNames as a list? In this way, relevant information can be displayed in three logs, reducing the number of redundant log entries.
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.
Printing all redundantEdgeDeviceNames, redundantKubeDeviceNames or syncedDeviceNames as list in one line will make this log entry very long, may be hard to read.
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.
look good to me.
redundantEdgeDevices[edName] = ds.completeCreateContent(&ed) | ||
} else { | ||
klog.V(5).Infof("found device %s to be synced", edName) |
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.
same as above.
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qclc, wawlian The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind enhancement
What this PR does / why we need it:
Which issue(s) this PR fixes:
Do not interrupt sync logic when non-fatal error occurs. For example, if syncing device from edge platform to k8s fails, sync logic can continue to execute to avoid interrupt updating device status from edge platform to k8s resource.
Special notes for your reviewer:
/assign @qclc
Does this PR introduce a user-facing change?
NONE