Skip to content

Releases: Intsights/sergeant

v0.21.0

09 Mar 18:14
Compare
Choose a tag to compare
  • Introduced a new logging handler called BufferedLogstashHandler to control the number of connections and log messages the logger creates.

v0.20.2

03 Mar 17:23
Compare
Choose a tag to compare
  • Fix some slave edge cases where throwing exception propagated to the supervisor and caused it to exit abnormally

v0.20.1

22 Feb 15:36
Compare
Choose a tag to compare
  • Remove tests and cache from the source distribution
  • Mypy fixes

v0.20.0

16 Feb 11:46
Compare
Choose a tag to compare

Changelist

  • We've been experiencing production issues for a while regarding stalled workers. After a rigorous investigation, we saw there were background threads that kept running. The issue with such threads is that sometimes they were non-daemonic threads, meaning that the Python's interpreter will not exit unless these threads will finish their execution. These threads were stuck in a deadlock and would have never been finished. We've added a background threads protection at the end of the Slave's execution. The protection consists of two phases. The first tries to stop the threads mildly by raising a SystemExit exception in the threads using an internal Python API, then joining the threads for 2 seconds waiting for the thread to finish. If there are unkillable threads left, and slave would kill itself with a SIGKILL resulting in a non-interruptable exit.
  • Tests coverage has increased
  • Slave logic has been refactored resulting in a clearer more debuggable version
  • Supervisor code changes to reflect the Slave's logic change

v0.19.0

09 Feb 14:34
Compare
Choose a tag to compare
  • Fix stop logic to stop workers in progress while one of the slaves asked to stop
  • Improved code coverage and added more tests
  • Removed unnecessary exception catching to propagate exceptions while they happen
  • Worker now has a logger once it gets created.

v0.18.4

26 Jan 13:22
Compare
Choose a tag to compare
  • Once one of the slaves asks to stop, all the others would not be respawned by the supervisor.

v0.18.3

21 Jan 12:26
Compare
Choose a tag to compare

Changelist:

  • added killer shutdown call on worker's exit to make sure the worker is able to shutdown properly, and if not, it will get killed by the killer
  • replace printing a stacktrace when logstash is not responding with just a one line error message
  • call init_logger before calling init_broker to allow logging the failure of initializing the broker

Breaking Changes:

  • Replace emitter["filename"] with emitter["pathname"]. logstash handler now sends a different key name, pathname instead of filename.

v0.18.2

17 Jan 16:56
Compare
Choose a tag to compare
  • The supervisor now waits for all its children that became zombies. This behavior happens when the process killer kills its watched worker with SIGKILL which replaces its parent to the supervisor. The supervisor didn't know it before, so no one would call to wait on its pid. I added a zombie cleaning method to run on each supervising iteration to call wait for all the zombies.

v0.18.1

14 Jan 17:22
Compare
Choose a tag to compare
  • process killer now kills and waits for child processes that were spawned by the process to kill

v0.18.0

13 Jan 11:05
Compare
Choose a tag to compare

Change list

  • Timeouts mechanism overhaul:
    • Removed soft_timeout/hard_timeout configurations in favor of just timeout
    • Removed critical_timeout in favor of a defaulted grace_period. The rationale was that nobody understood what is the meaning of "critical" timeout. The idea of the critical timeout was to allow the last resort option of killing the worker in cases where SIGTERM did not succeed. I find grace_period to be more convenient and intuitive.

Breaking Changes:

  • Sergeant Timeouts config does not provide soft_timeout, hard_timeout and critical_timeout anymore. They were replaced with timeout and grace_period