jroachgolf84 opened a new pull request, #77552:
URL: https://github.com/apache/airflow/pull/77552

   ## Description
   
   Dag code running at parse time can call `get_parsing_context()` to read 
`dag_id` and `task_id`, but it has no way to find out which Dag bundle it is 
being parsed from.
   
   This PR adds an optional `bundle_name` field to `AirflowParsingContext`, 
defaulting to `None` so existing positional uses keep working. The field is 
filled in both when the Dag processor parses a file and when a task re-parses 
its Dag file before running, and the previous value is restored once parsing is 
done.
   
   ## Testing
   
   These changes were tested via unit tests added to the following files. Each 
of these new unit tests were run via `breeze testing ...` commands:
   
   - `airflow-core/tests/unit/dag_processing/test_processor.py`
   - `task-sdk/tests/task_sdk/definitions/_internal/test_dag_parsing_context.py`
   - `task-sdk/tests/task_sdk/execution_time/test_task_runner.py`
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: [Claude Opus 5.5] 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]

Reply via email to