aristanetworks / goarista

Fairly general building blocks used in Arista Go code and open-sourced for the benefit of all.
Apache License 2.0
213 stars 68 forks source link

cmd/ocprometheus: handle interface updates with null values #46

Closed ginoledesma closed 4 years ago

ginoledesma commented 4 years ago

When handling interface updates with null values, return an empty string instead of panicking.

ginoledesma commented 4 years ago

Observed in EOS 4.20.11M-10590868.42011M. Running the branch at commit 873d404c7f4049e56829d74937303c5e20bd132b would cause ocprometheus to panic when receiving interface updates whose value was nil.

aaronbee commented 4 years ago

Thanks for the pull request. We have resolved the issue by skipping handling for arrays in commit 5d8d36c240c9af0ccde364594dd5fae756790b63. They were being skipped anyway, because of the return value of false.