Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: write log shipper in python [MLG-993]
Instead of orchestrating multiple processes with bash and confusing/complex process substitution, with all the trapping of signals and `printf x > ...` nonsense, just write a wrapper process in a real programming language. This reduces the complexity of our logging solution, and prevents the out-of-order bugs inherent in having two separate log shippers, one for stdout and one for stderr. The new ship_logs.py has the following features: - it launches and monitors a child command - it shares a log buffer for shipping stdout and stderr - it has the same log parsing regexes as enrich_logging.py - it converts carriage returns to newlines - it forwards signals to its child process - it exits after a maximum of DET_LOG_WAIT_TIME or 30 seconds - it depends on the python interpreter, but only the interpreter (all imports are from the standard library) - in the special case that the child process can't be started, it ships an explanation of what happened to the master and exits with standard bash exit codes
- Loading branch information