namanjain24-sudo opened a new pull request, #75423:
URL: https://github.com/apache/airflow/pull/75423

   A task with `start_from_trigger=True` never starts in a worker, so nothing 
sends its rendered fields to
   the API server and the Rendered Templates tab stays empty for the whole run.
   
   The triggerer already builds a `RuntimeTaskInstance` and a template context 
for such a task so it can
   render the trigger's own fields, so this records the task's fields from the 
same place, over the channel
   the runner already uses for Variables, XComs and the asset state store. 
`SetRenderedFields` joins
   `ToTriggerSupervisor`, and the supervisor forwards it for the task instance 
whose trigger it was handling,
   resolved through the same `_handling_trigger_ti_id` the existing XCom 
requests use.
   
   Rendering is best effort: a task whose fields cannot be rendered is logged 
and still has a trigger to run.
   
   `_serialize_rendered_fields` is reused rather than reimplemented so core 
cannot drift from the redaction
   the worker applies; it is marked `# noqa: SDK001` as a single deliberate 
import.
   
   closes: #75399
   
   ### Testing
   
   - `breeze run pytest airflow-core/tests/unit/jobs/test_triggerer_job.py` — 
137 passed, 1 skipped
     (the skip needs a postgres backend), including two new tests covering the 
recorded fields and the
     rendering-failure path.
   - `breeze run mypy airflow-core/src/airflow/jobs/triggerer_job_runner.py` — 
clean.
   - `prek run --files <the two changed files>` for both the `pre-commit` and 
`manual` stages — clean.
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Opus 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