gregatm commented on issue #73892: URL: https://github.com/apache/airflow/issues/73892#issuecomment-6345575011
I started implementing showing the watcher logs in the UI https://github.com/gregatm/airflow/commit/143accbcc1cedfd039da692c96813b0577a19653 It is certainly in a WIP state. Notable things I did are: ### triggerer_job_runner.py * A separate logger is attached to watchers, previously, none was attached and the normal process logger was used * Added a separate WatcherLoggingFactory complementing the existing TriggerLoggingFactory. It has a Trigger property instead of the TaskInstance. * Logging to file is optional and currently disabled by default. For it to work you have to set the new config `AIRFLOW__TRIGGER__LOG_TO_FILE` to `True` (subject to change) ### ui/AssetWatcher * Added a detail page for AssetWatchers * Shows the triggerer the watcher is runnning on * Shows last heartbeat of the triggerer * Shows the log associated to the trigger * Is accessible through Assets->AssetDetail->Watchers->WatcherPopOver ### fastapi/core_api/routes/ui/assetwatcher.py * New endpoint for retrieving a single assetwatcher * New endpoint for retrieving logs ### log_reader.py/WatcherLogReader * Complements TaskLogReader * Used in endpoint to retrieve logs ### file_watcher_handler.py * Complements file_task_handler.py for triggers/assetwatchers I tried to keep the changes out of existing code, and leave it as untouched as possible. But obviously it can also be coupled more tightly. Also the commit diff is kinda messed up, sth might have gone wrong during rebasing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
