sensu-plugins / sensu-plugin

A framework for writing Sensu plugins & handlers with Ruby.
http://sensuapp.org
MIT License
126 stars 117 forks source link

Dependencies causing frozen string literal issues #224

Open wakemaster39 opened 4 years ago

wakemaster39 commented 4 years ago

I am running into an issue trying to use some sensu plugins with sensu-go due to the age of certain dependencies causing Check failed to run: can't modify frozen String to be the output of my checks.

The error and a possible work around can be found here: https://github.com/sensu-plugins/sensu-plugins-rabbitmq/issues/86

The issue with this work around is with bonsai assests I need to go into every box that uses them, and modify the file for the check to work. Every time I upgrade an asset in the future, I need to redo that change.

Digging around, I found that the issue is related to mixlib-cli and the problem was fixed in version 1.7.1. The issue is that this version was never released to rubygems and as such isn't being found when packages are building. https://github.com/chef/mixlib-cli/issues/57

I am not a ruby programmer, so my knowledge of the ecosystem is minimal, but I see that the minimal dependency for mixlib-cli is set at ~> 1.5 . Based on the mixlib-cli ticket listed about, support for ruby 2.4 was added back to the package in version 2.0.3.

The issue there is that the current sensu-plugin supports ruby 2.3, which puts me in a world of hurt with no good way to solve the problem. With the deprecation of sensu 1.x, and with bonsai distributing sensu 2.4, is it possible to upgrade this package to have a new minimum supported version of ruby of 2.4 and upgrade the dependencies accordingly?

I do not know the impact or scale of the ask here, just trying to figure out how I can work through the problem given the current constraints.