pierrejeambrun opened a new pull request, #70294: URL: https://github.com/apache/airflow/pull/70294
When a task fails, the frame that actually raised is almost always in the user's DAG code, but in the log traceback it looks identical to the surrounding framework frames from installed packages — so you have to scan every `File "..."` line to find where your code is. This colors traceback frames by origin: frames in **user code** (DAG bundle, plugins, local files) stay prominent (`fg.info`, bold), while frames in installed packages (`site-packages` / `dist-packages`) are muted (`fg.muted`). The failing user frame now stands out at a glance. Classification is a single rule — a frame is user code unless its path is under a `site-packages`/`dist-packages` directory — which is robust across bundle layouts (local folder, git, `/tmp/airflow/dag_bundles/...`) without hardcoding a bundle path. A `data-frame-source` attribute (`user`/`library`) is set on each frame for testability and as a styling hook. Before / after: - Before (all frames same color): _screenshot placeholder_ - After (user-code frame highlighted, site-packages muted): _screenshot placeholder_ --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
