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

Resolv.rb allow configurable timeout in 1.9 mode #2411

Closed
wiibaa opened this issue Jan 2, 2015 · 6 comments
Closed

Resolv.rb allow configurable timeout in 1.9 mode #2411

wiibaa opened this issue Jan 2, 2015 · 6 comments
Assignees
Milestone

Comments

@wiibaa
Copy link

wiibaa commented Jan 2, 2015

Resolv.rb allows configurable timeouts only for ruby 2.0.0 and plus as you can see in jruby master https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/resolv.rb#L354

Do you think it could easily be backported into 1.9 mode too ?
I'm asking here because jruby is my target platform.
Thanks you in advance for your advice.

@headius
Copy link
Member

headius commented Jan 8, 2015

This starts to push the boundaries a bit...

The resolv.rb library in particular is a bit of a challenge because the differences from 1.9 to 2.0+ are substantial: https://gist.github.com/5742f26a702354379af8

This is further complicated by the fact that MRI (from which we get this library) no longer supports 1.9.3 except for security fixes, and those will end in a bit over a month.

JRuby 9000 (the next major JRuby, being developed on master) supports Ruby 2.2-level compatibility, but it is not yet released (though we hope to do so very soon).

So I'm not sure what's best for JRuby users. Updating resolv.rb could introduce incompatibilities for existing users that depend on it being the same as 1.9.3, or it may be a transparent upgrade. The only way to know may be to have someone familiar with DNS and/or this library go over that diff and decide if the changes are benign enough.

@headius
Copy link
Member

headius commented Jan 8, 2015

Actually after looking at the bug you linked, that patch does apply cleanly to a 1.9.3 resolv.rb. I had initially thought we'd need to pull in the entirety of changes to get this one. Those more extensive changes must have happened after this patch was created.

That lessens the impact considerably. The only concern that remains for me would be the peripheral impacts of such a change: code in the wild that runs on JRuby's "1.9.3" but not MRI's, code that patches or extends this class in a similar way that would start to break.

What do you think, @enebo?

@enebo
Copy link
Member

enebo commented Jan 8, 2015

Can this just be a separate library? Or does this depend on how other libraries load resolv? I would even think perhaps require 'resolve-timeout' after 'resolv' which minimally changes the timeout aspect (that gist appears to have other significant changes like changing the base error class). Granted, that is a monkey patch.

I do not think many/any people extend resolv but if they did this would cause a mismatch. In my mind, I would prefer people work-around 1.9.3 being frozen and not have us potentially piss off other users by breaking their code. With that said, most gems need to be forward-compat so libraries will have to deal with these changes in 2.0 if they want to continue also working in 1.9. That is not to say they will work if we change this, but it does say they already acknowledged that they have had to make changes to their libs for resolv changes. I am not really sure on this one. I usually use the rule, when in doubt leave it out?

@jordansissel
Copy link
Contributor

+1 on keeping 1.9.3 in frozen/alignment with MRI 1.9.3 since it keeps a solid expectation of what "1.9.3" behaves like. A separate library to workaround this is fine with me. For context, I've done work in the past to workaround Resolv api changes between 1.8.x and 1.9.x, so continuing this work seems like not a serious burden on me.

@jordansissel
Copy link
Contributor

(This might be a task worth including in https://github.com/marcandre/backports)

@headius
Copy link
Member

headius commented Jan 12, 2015

Closing since the prevailing opinion seems to be that it's not a good idea to change this in 1.9 mode.

If we have 2.0 resolv.rb in 2.0 mode, that would be an option for you (and if we don't, it would make a good PR).

@headius headius closed this as completed Jan 12, 2015
@headius headius added this to the Won't Fix milestone Jan 12, 2015
@headius headius self-assigned this Jan 12, 2015
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