You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recommend dropping pyinotify as a dependency #3934
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.
and logshipper is only a dependency because of the file_watch_sensor in the contrib/linux/sensors directory. Are there any plans to move that out of this core repo?
@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.
This is the only dep that I could find
Are there any plans to move that out of this core repo?
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.
I emailed the author directly a few days ago inquiring if he is still interested in maintaining it and haven't gotten a response. Their blog hasn't been updated since 2014.
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.
A different PyInotify project looks promising - maybe we can migrate logshipper to that instead? That library also doesn't have anything in its setup.py that prevents it from being installed on OS X.
Activity
LindsayHill commentedon Jan 8, 2018
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.
tonybaloney commentedon Jan 8, 2018
and logshipper is only a dependency because of the
file_watch_sensorin thecontrib/linux/sensorsdirectory. Are there any plans to move that out of this core repo?tonybaloney commentedon Jan 8, 2018
@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.
This is the only dep that I could find
LindsayHill commentedon Jan 8, 2018
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?
LindsayHill commentedon Jan 12, 2018
@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.
Kami commentedon Feb 7, 2018
@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...
Kami commentedon Feb 7, 2018
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.
blag commentedon May 25, 2018
The issue with relying on pyinotify is (in decreasing order of severity):
setup.py: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.
Kami commentedon May 28, 2018
@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.
arm4b commentedon May 29, 2018
The proposed solution by @Kami sounds good to me too, keeping in mind concerns described in #3942 (comment)
blag commentedon May 29, 2018
A different
PyInotifyproject looks promising - maybe we can migrate logshipper to that instead? That library also doesn't have anything in itssetup.pythat prevents it from being installed on OS X.bigmstone commentedon May 29, 2018
I'd be fine w/ removing/replacing the
logshipperdep too. It brings in nice nuggets like thestatsdcollision I hit in the metrics PR.blag commentedon Jun 6, 2018
I have created PR #4191 - implement our own tailing function based on the one from
logshipper.My version uses the maintained PyInotify package (
inotifyon PyPI) instead.Please take a look at that and let me know what you think.