Skip to content
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

Compatibility with Ruby 1.8 broken #92

Closed
miknight opened this issue Apr 20, 2016 · 6 comments
Closed

Compatibility with Ruby 1.8 broken #92

miknight opened this issue Apr 20, 2016 · 6 comments

Comments

@miknight
Copy link
Contributor

There seems to have been unnecessary use of Ruby 1.9's "symbol: value" syntax in a recent change that has broken compatibility with Ruby 1.8:

Could not autoload puppet/reports/datadog_reports: /usr/lib/ruby/gems/1.8/gems/dogapi-1.22.0/lib/dogapi/v1/metric.rb:17: syntax error, unexpected ':', expecting tASSOC
            from: from.to_i,
                 ^
/usr/lib/ruby/gems/1.8/gems/dogapi-1.22.0/lib/dogapi/v1/metric.rb:18: syntax error, unexpected ':', expecting '='
            to: to.to_i,
               ^
/usr/lib/ruby/gems/1.8/gems/dogapi-1.22.0/lib/dogapi/v1/metric.rb:19: syntax error, unexpected ':', expecting '='
            query: query
                  ^
Could not autoload puppet/reports/datadog_reports: /usr/lib/ruby/gems/1.8/gems/dogapi-1.22.0/lib/dogapi/v1/metric.rb:17: syntax error, unexpected ':', expecting tASSOC
            from: from.to_i,
                 ^
/usr/lib/ruby/gems/1.8/gems/dogapi-1.22.0/lib/dogapi/v1/metric.rb:18: syntax error, unexpected ':', expecting '='
            to: to.to_i,
               ^
/usr/lib/ruby/gems/1.8/gems/dogapi-1.22.0/lib/dogapi/v1/metric.rb:19: syntax error, unexpected ':', expecting '='
            query: query
                  ^
@miketheman
Copy link
Contributor

Ruby 1.8 is long EOL and no longer receives any security patches.

@miknight
Copy link
Contributor Author

Yes, and I generally agree with your implication that it's not worth extra effort to maintain compatibility.

In this case (see #93) it's really just a typo fix on a few lines that would restore compatibility, making me think it's worthwhile in this instance. An alternative motivation is to just have the file formatted consistently.

@cryptographrix
Copy link

cryptographrix commented Jun 16, 2016

+1 - this basically excludes anyone running CentOS 6 with puppet from integrating with datadog and is a razor-thin hair to be splitting to break compatibility.

@degemer
Copy link
Member

degemer commented Jul 25, 2016

Hey @miknight & @cryptographrix !
Sorry for the wait, I hope you found a workaround for this.

We won't bring back ruby 1.8 compatibility. As Mike said it, it is long EOL (as are 1.9 and 2.0). On the contrary, we're likely going to update the code to use the "new" Ruby style.

I think your issue is only with Puppet though, and could be solved by using an older version of dogapi (1.21.0): I opened a PR on our Puppet repository to allow that - DataDog/puppet-datadog-agent#210.

I'll close this issue and the associated PR, but let me know what you think about this (especially if you think there is another solution!).

@degemer degemer closed this as completed Jul 25, 2016
@cryptographrix
Copy link

I think that switching to a "new" style of assigning variables values for the sake of switching to a new style (which - as far as I can tell - is the only thing gained by doing so) is a pretty big cost that alienates a percentage of your users.

I'd advocate for the change if I could see a functional benefit (such as if the breaking change was to be able to use named capture groups), but by closing this PR (especially with your comment above) it seems like you're just aiming to alienate this percentage of your users for no reason other than to get them to upgrade their ruby version - or opt out of future upgrades of your product.

@degemer
Copy link
Member

degemer commented Aug 3, 2016

Thank you for your feedback here. We want to make sure we are addressing your needs, while also continuing to move the project forward.

Indeed, a "new" style is not a reason to remove support for Ruby 1.8.. The main reason is that we're not running tests anymore with Ruby 1.8, and so it could break at any moment (even if we applied this patch): most of the libraries we depend on to test require Ruby >= 1.9.3. Moreover, Ruby 1.8.7 EOL and hasn't received any patch in 3 years (https://www.ruby-lang.org/en/news/2013/06/30/we-retire-1-8-7/).

I think this issue was mainly about the Puppet integration, and we're trying to find a more stable solution for this (which wouldn't break in the future) with DataDog/puppet-datadog-agent#210. We hope to get your feedback there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants