Skip to content

Don't crash on incomplete node data#599

Closed
daweim0 wants to merge 7 commits intoci_devfrom
david/malformed-node-fix
Closed

Don't crash on incomplete node data#599
daweim0 wants to merge 7 commits intoci_devfrom
david/malformed-node-fix

Conversation

@daweim0
Copy link
Contributor

@daweim0 daweim0 commented Jul 8, 2021

Adds some protection against the Kubernetes API server returning incomplete node data. Normally this won't happen, but it can if users manually update node objects.

The diff is hard to read, but this basically adds a begin & rescue around some telemetry code.

@daweim0 daweim0 requested a review from a team as a code owner July 8, 2021 23:35
end
ApplicationInsightsUtility.sendMetricTelemetry("NodeCoreCapacity", capacityInfo["cpu"], properties)
telemetrySent = true
rescue => errorStr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you test what happens if any code in the block got rescued and rest (partial) of the code (after rescue) runs after the rescue ? Also whats the advantage of this rescue block ? This isn't a crash, correct? There are global rescues in outer methods (enumerate & runperiodic).

@daweim0 daweim0 mentioned this pull request Aug 18, 2021
@github-actions
Copy link

This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

This PR was closed because it has been stalled for 12 days with no activity.

@github-actions github-actions bot closed this Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants