Airflow import errors suppressed after modifying HelperDcmWeb.py via codeserver; errors only appear after restarting Airflow pods
Steps to Reproduce
- In codeserver, open
HelperDcmWeb.py - Comment out or delete all code in the file; save the changes.
- Trigger any Airflow DAG that imports
HelperDcmWeb(e.g. service-process-incoming-dcm). - Observe the task logs and Airflow web-UI.
Expected Behaviour
- The DAG (and all tasks that rely on
HelperDcmWeb) should fail immediately with an explicit PythonImportError, clearly visible in the Airflow web-UI task logs and in task status.
Actual Behaviour
- No import error is surfaced in the Airflow web-UI; tasks appear to fail generically without a stack trace.
- Error message for the failed task:
*** Could not read served logs: Invalid URL 'http://:8793/log/dag_id=pancreas_segmentation/run_id=pancreas_segmentation-250507143649969663/task_id=get-input-data/attempt=3.log': No host supplied
- The actual error is only shown in the logs of airflow-scheduler.
- After executing a restart of all Airflow pods, the expected
ImportErrortraceback becomes visible in the web-ui.
Work-around
- Manually restart all Airflow pods after editing any shared Python helper module to force module reload and surface errors.
Edited by Stefan Denner