-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Recommend dropping pyinotify as a dependency #3934
Comments
Linux pack is still sorta kinda part of this code base (https://github.com/StackStorm/st2/tree/master/contrib/linux). But I guess it has pynotify in its virtualenv, so it doesn't need to be in 'core'. As an aside, this would make my life a little easier when doing st2docs work on Mac. |
and logshipper is only a dependency because of the |
@LindsayHill you read my mind :-) it would make my life easier to be able to run the unit tests on my Mac and not have to sync the repo with a server for minor changes. |
Funnily enough that came up earlier today. No immediate plans to do so, but it probably should get done. I still want the core ST2 RPMs/Debs to include the Linux pack, but I think it should probably live in its own pack on exchange.stackstorm.org. Perhaps include it as a subtree? |
@Kami what's your thoughts about removing pyinotify from st2 requirements? I think it's a good idea. As an aside, I'm also wondering if we should switch to the pypi version of logshipper, since it now includes your changes. May be that we don't require logshipper in core st2 requirements either, only in the Linux pack. |
@LindsayHill Yeah, I wish we could switch to using official / upstream version, but not all the changes we use have been merged yet (ondergetekende/logshipper#11) and even though one of the PRs has been merged, new version hasn't been published to PyPi so we would still need to use version from git... |
As far as actual pyinotify issue goes - what's the actual root problem? Reliance on C extension and not supporting Python 3? If so, and the other inotify wrapper handles that better, we would need to modify logshipper to use that library. |
The issue with relying on pyinotify is (in decreasing order of severity):
I think at this point we either need to remove it as a dependency of ST2 itself (should be fine as a dependency of the Linux contrib/packs though), or to fork it and start merging in PRs and try to maintain a fork of it ourselves. I'm not super happy about maintaining a fork, but ¯\_(ツ)_/¯. I suspect other people in the community would appreciate somebody forking it even if they only merge in existing PRs. @Kami Let me know if you're okay with just dropping it or if you'd like me to fork it. I think I can take on maintaining it. |
@blag I'm fine with dropping it, but we need to find a solution for the file watch sensor in linux pack. Linux pack is included / bundled with the default StackStorm distribution so if we simply drop that dependency it will break file watch sensor (it won't work out of the box anymore). One solution is to move to a different library for file watching which is cross operating system compatible, but that means we will also need to update our logshipper fork so it uses that library, or ideally, we can find some other maintained replacement for logshipper which doesn't rely on pyinotify. |
The proposed solution by @Kami sounds good to me too, keeping in mind concerns described in #3942 (comment) |
I'd be fine w/ removing/replacing the |
I have created PR #4191 - implement our own tailing function based on the one from My version uses the maintained PyInotify package ( Please take a look at that and let me know what you think. |
st2 has a dependency on pyinotify, which is poorly maintained. Digging into it, it looks like no code in st2 references it, only the linux pack, which is no longer part of this code base.
Recommend moving to another, dropping it completely or using
https://github.com/chrisjbillington/inotify_simple
pyinotify is also a requirement in @Kami's custom build of logshipper git+https://github.com/Kami/logshipper.git@stackstorm_patched#egg=logshipper
The text was updated successfully, but these errors were encountered: