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

Remove hard requirement on sys-proctable #15

Closed
wants to merge 27 commits into from

Conversation

aemadrid
Copy link

sys/proctable is required to stop nsqadmin but sys/proctable does not run in JRuby and will not for the foreseable future [1]. This commit removes the hard requirement and produces warning while trying to require sys/proctable and raise an exception when trying to stop nsqadmin.

Added a test to make sure the exception is raised and modified other tests (4) that depend on being able to stop nsqadmin so they are skipped if sys/proctable is not available.

[1] djberg96/sys-proctable#18

… run in JRuby and will not for the foreseable future [1]. This commit removes the hard requirement and produces warning while trying to require sys/proctable and raise an exception when trying to stop nsqadmin.

Added a test to make sure the exception is raised and modified other tests (4) that depend on being able to stop nsqadmin so they are skipped if sys/proctable is not available.

[1] djberg96/sys-proctable#18
@bschwartz
Copy link
Member

Hi Adrian,

Thanks for the PR! I'm a bit confused about how this will work. Perhaps I'm missing something though.

Won't you also need to modify the nsq-cluster.gemspec to not include sys-proctable as a runtime dependency? And if you do that, then if someone uses nsq-cluster in another project, they will have to explicitly include sys-proctable if they want the ability to stop nsqadmin?

@freerobby You're a JRuby guy, any wise ideas how to solve this? See here for context: wistia/nsq-ruby#11

@freerobby
Copy link
Member

@bschwartz @aemadrid I think the best way to solve this problem is either (1) a drop-in replacement for sys-proctable that is MRI and JRuby-compatible, or (2) a code path fork based on Ruby version that uses an alternate JRuby-compatible library if JRuby is detected. I'm going to close this PR since it doesn't bring us closer to either of those options, but if you see a path that I don't, leave a comment and we'll re-examine.

For future PRs, please refrain from reformatting otherwise unmodified code -- it makes the diff harder to read, and also I'd hate to see a bunch of hard work get held up in a stylistic debate.

Thanks you for taking the time to put this together -- I'll definitely keep this feedback/use case in mind next time I'm in there!

@freerobby freerobby closed this Oct 5, 2016
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

Successfully merging this pull request may close these issues.

3 participants