Skip to content
Draft
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6a8dc6d
Refactor FileWatchSensor to use watchdog instead of our logshipper fork
blag Nov 29, 2020
0a2f6ae
Remove logshipper and pyinotify from requirements files
blag Nov 29, 2020
2f71b2f
Import eventlet since we use it
blag Dec 12, 2020
3f0abb2
Use self.logger instead of self._logger
blag Dec 12, 2020
d175507
Use self.trigger instead of self._trigger
blag Dec 12, 2020
ce6e8ef
Merge branch 'master' into remove-logshipper
blag Dec 15, 2020
6657a25
Merge branch 'master' into remove-logshipper
blag Dec 18, 2020
8add2cc
Refactor for testability and test coverage
blag Dec 22, 2020
169cc5a
Add tests for FileWatchSensor components
blag Dec 22, 2020
fa68bef
Linting
blag Dec 23, 2020
1493656
Merge branch 'master' into remove-logshipper
blag Dec 23, 2020
e932ffe
Add class docstrings
blag Jan 17, 2021
5a22c27
Add logging
blag Jan 17, 2021
490595d
No need for eventlet.sleep() when time.sleep() should do just fine
blag Jan 17, 2021
05603f6
Refactor TailManageer.run() to use time.sleep()
blag Jan 20, 2021
8a05c36
Refactor calculating parent_dir
blag Jan 20, 2021
847d830
Refactor SingleFileTail.close() to keep parent watch open
blag Jan 20, 2021
914b3f5
Refactor follow logic
blag Jan 20, 2021
5caa459
Refactor TailManager.start() to make it idempotent
blag Jan 20, 2021
e6d3911
Refactor FileWatchSensor.run() to use TailManager.run()
blag Jan 20, 2021
456daba
Break out tests into multiple modules
blag Jan 20, 2021
a19eac6
Merge branch 'master' into remove-logshipper
blag Apr 8, 2021
4279986
Add .vagrant/ to .gitignore
blag Apr 8, 2021
d915752
Merge branch 'master' into remove-logshipper
blag Apr 12, 2021
5601743
Ignore a few more virtualenv directories
blag Apr 12, 2021
0c10559
Make pylint happy
blag Apr 12, 2021
f8a3056
Run all tests when run directly
blag Apr 12, 2021
5f3cf9a
Make black happy
blag Apr 12, 2021
1e5e389
Make flake8 happy
blag Apr 12, 2021
5e0b7e6
Make pylint happy
blag Apr 12, 2021
d90be9c
Make black happy
blag Apr 12, 2021
87d32aa
Don't use threading.Thread() after all
blag Apr 12, 2021
e64e547
Do whatever it takes to make all of the linters happy
blag Apr 12, 2021
ec856da
Merge branch 'master' into remove-logshipper
cognifloyd Oct 5, 2021
dca3e4f
Merge branch 'master' into remove-logshipper
cognifloyd Oct 6, 2021
3055413
add changelog entry
cognifloyd Oct 7, 2021
9631524
Merge branch 'master' into remove-logshipper
cognifloyd Jan 20, 2024
83fa1ec
Fix borked merge
cognifloyd Jan 20, 2024
bab2952
pin transitive dep in test-requirements.txt
cognifloyd Jan 20, 2024
f8d1f50
Merge branch 'master' into remove-logshipper
cognifloyd Jan 29, 2024
5b38106
regen st2 lockfile to switch logshipper -> watchdog
cognifloyd Jan 29, 2024
ed32348
linux pack: Drop out-of-date README notes about pack config
cognifloyd Jan 30, 2024
465a8f4
update the linux pack README to explain how to use FileWatchSensor
cognifloyd Jan 30, 2024
36bacae
linux pack: add LinuxFileWatchSensor.update_trigger
cognifloyd Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ conf/st2.travis.conf
# generated GitHub Actions conf
conf/st2.githubactions.conf

# Vagrant
.vagrant/

# Installer logs
pip-log.txt

Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ Changed
* Silence pylint about dev/debugging utility (tools/direct_queue_publisher.py) that uses pika because kombu
doesn't support what it does. If anyone uses that utility, they have to install pika manually. #5380

* The FileWatchSensor in the linux pack uses `watchdog` now instead of `logshipper` (`logshipper` and its requirement `pyinotify` are unmaintained).
The `watchdog` project is actively maintained, and has wide support for Linux, MacOS, BSD, Windows, and a polling fallback implementation.
Dropping `pyinotify` has a side benefit of allowing MacOS users to more easily hack on StackStorm's code, since `pyinotify` cannot install on MacOS.

The FileWatchSensor is now an excellent example of how to write a sensor following this refactor. It breaks up the code into well structured classes
that all have a single focus. You can also run the sensor Python script itself, which makes development and testing much easier. #5096

Contributed by @blag

Fixed
~~~~~

Expand Down
4 changes: 1 addition & 3 deletions contrib/linux/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# used by file watcher sensor
pyinotify>=0.9.5,<=0.10
-e git+https://github.com/StackStorm/logshipper.git@stackstorm_patched#egg=logshipper
watchdog
Loading