zabbixapi icon indicating copy to clipboard operation
zabbixapi copied to clipboard

Support for Zabbix 5.x

Open jameskirsop opened this issue 5 years ago • 22 comments

5.0 is now out and should be supported!

jameskirsop avatar Jun 03 '20 00:06 jameskirsop

@Splyth @snehitgajjar Is there anything i can do to help this along? I'm currently using 4.1.2 on Zabbix 5.0.3. (Through puppet-zabbix) with no issues. What are the prereqs you'd like, to get zabbix 5.x officially supported with this gem?

4.2.0 seems to break this gem on any unsupported zabbix version, when previous versions only warned. Making 5.x support even more important now imo. https://github.com/express42/zabbixapi/commit/add21b692b34acaa4ddb568fa13b27a52adf2856#diff-e4c256e6a91f4de6d474565ff8c53dc9R65

aclarkee avatar Sep 11 '20 00:09 aclarkee

Sorry I'm swamped six ways from Sunday.

Honestly what needs to happen is this in my view:

  • Bump Version
  • Make Changes
  • Add/Update Tests

Tests are currently passing and we're trying to keep them that way going forward.

If you have any specific question I'll try to answer. It's going to be a long while before I can get to it.

Splyth avatar Sep 12 '20 16:09 Splyth

@aclarkee I'm willing to help as well - this library is too important to just let die like this.

svdasein avatar Nov 03 '20 21:11 svdasein

I haven't been able to give this gem the time and attention it deserves and the way things are looking I won't be able to. @aclarkee @svdasein if you'd like I'm more than happy to turn it over to either one of you.

Splyth avatar Nov 04 '20 01:11 Splyth

@Splyth I'm willing to get involved. I'm going to confess up front that I have much to learn vis a vis the CI stuff, but I am willing to learn it. Am I right in thinking that the path forward here is to upgrade the docker test environment to a 5.x and then hammer at the code 'til all the tests pass (and then add new stuff + tests if required)?

svdasein avatar Nov 04 '20 03:11 svdasein

@svdasein that's about the long and short of it yeah. You can find my email on my profile and I can work on getting stuff transferred over to you.

Splyth avatar Nov 05 '20 02:11 Splyth

I'm also willing to help but I'm in the same camp as @svdasein and not up to speed on all the CI hotness.

jameskirsop avatar Nov 05 '20 04:11 jameskirsop

@jameskirsop I'm a contributor now - just starting. Def. could use some help. Where can I find your email addr? [edit nevermind - found it]

svdasein avatar Nov 07 '20 02:11 svdasein

initial support for Zabbix 5.x (tested with 5.2.2): https://github.com/anapsix/zabbixapi/tree/zabbix-5

anapsix avatar Dec 29 '20 18:12 anapsix

@anapsix do you know how to work all the ci stuff in this project? There aren't any dox for it and I'm really kind of out of my element. If you'd like I can see if I can get you added here.

svdasein avatar Dec 29 '20 19:12 svdasein

@svdasein do you mean Rspec, or Travis CI stuff? Travis recently made it harder for OSS projects to get credits, so it might be worth considering move to Github Actions.. Either way, I'm familiar enough with Travis CI and Github Actions to update CI job with Zabbix 5.x or recreate the entire thing in Gitlab Actions. Though, I'd switch to using Zabbix Docker images, rather than installing Zabbix packages on Ubuntu.

anapsix avatar Dec 30 '20 09:12 anapsix

@anapsix ok - I need to get you added as a contributor - you actually know how to work this stuff. Lemme see if I can figure out who to ping here (I'm pretty new myself).

svdasein avatar Dec 30 '20 11:12 svdasein

alrighty..

  • made a Gitlab Action based CI: https://github.com/anapsix/zabbixapi/actions?query=workflow%3ACI
  • here's the workflow definition file: https://github.com/anapsix/zabbixapi/blob/zabbix-5/.github/workflows/main.yml

anapsix avatar Dec 30 '20 12:12 anapsix

Now that I've got access to the repo, I've pushed zabbix5.2-alpha1 branch here. Since folks are eager to use zabbixapi gem with latest version of Zabbix, how about we publish a pre-release version 5.2.0-alpha1 to RubyGems based on zabbix5.2-alpha1?

There is still plenty of work to be done, including updating documentation, adding support for previously unsupported API objects (such as problem), etc.. But at very least, folks can start using previously supported API.

anapsix avatar Jan 28 '21 10:01 anapsix

Nice! We definitely need this gem for puppet-zabbix so pushing it to RubyGems could help us.

@Splyth (sorry for the ping 😄 ) could you possibly add as maintainer @anapsix so they can push to RubyGems? Thank you!

root-expert avatar Jan 28 '21 11:01 root-expert

Alternatively, as @root-expert suggested, we could setup a Github Action to push to Rubygems based on tag pattern v5.2**. Couple of pre-made actions are available for that:

  • https://github.com/marketplace/actions/publish-to-rubygems
  • https://github.com/marketplace/actions/publish-gem

anapsix avatar Jan 28 '21 11:01 anapsix

UPDATE: I got access to RubyGems for zabbixapi.. will hook up the Github Action job to push based on branch / tag soon

anapsix avatar Jan 30 '21 21:01 anapsix

Nice!

root-expert avatar Jan 30 '21 21:01 root-expert

I do not have enough permissions on this repo to add secrets for CI job.. .. and exposing a personal API token in public project's repo might not be as good of an idea

I've pushed zabbixapi 5.0.0-alpha1 to Rubygems maually: https://rubygems.org/gems/zabbixapi/versions/5.0.0.pre.alpha1

Install it via

gem install zabbixapi -v 5.0.0-alpha1
# or
gem install zabbixapi -v 5.0.0.pre.alpha1

Or in Gemfile

gem 'zabbixapi', '~> 5.0.0-alpha1
# or
gem 'zabbixapi', '~> 5.0.0.pre.alpha1

anapsix avatar Jan 31 '21 12:01 anapsix

It seems that 5.0.0-alpha1 only supports API versions 5.0 and 5.2. Are there breaking changes in later versions, such as 5.4?

andreobrown avatar Aug 23 '21 22:08 andreobrown

You can use ignore_version to get this gem working on 5.4. Works fine for my purposes.

Backward incompatible changes here (Only thing that affected me was the inability to read PSK values) https://www.zabbix.com/documentation/current/manual/api/changes_5.2_-_5.4

aclarkee avatar Aug 23 '21 23:08 aclarkee

What's left to do before the official 5.x release can be published?

leedm777 avatar Nov 09 '21 15:11 leedm777