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

   <!--
   Thank you for contributing!
   
   Please provide above a brief description of the changes made in this pull 
request.
   Write a good git commit message following this guide: 
http://chris.beams.io/posts/git-commit/
   
   Please make sure that your code changes are covered with tests.
   And in case of new features or big changes remember to adjust the 
documentation.
   
   Feel free to ping (in general) for the review if you do not see reaction for 
a few days
   (72 Hours is the minimum reaction time you can expect from volunteers) - we 
sometimes miss notifications.
   
   In case of an existing issue, reference it using one of the following:
   
   * closes: #ISSUE
   * related: #ISSUE
   -->
   
   ## 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 
   
   
   Generated-by: ChatGPT following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   This PR adds support for passing a `note` to `TriggerDagRunOperator`, 
allowing users to attach contextual information when triggering DAG runs 
directly from the operator.
   
   ### What is changed
   - Added a new optional `note` parameter to `TriggerDagRunOperator`
   - Ensured the note is logged when a DAG is triggered
   - Maintained backward compatibility across Airflow versions:
     - **Airflow 3.x**: note is logged before raising `DagRunTriggerException`
     - **Airflow 2.x**: note is logged during normal execution
   - Added unit tests covering both Airflow 2 and Airflow 3 code paths
   - Updated the standard provider example DAG to demonstrate usage of the 
`note` parameter
   
   ### Why this is needed
   Currently, adding a note to a triggered DAG run is only possible via the 
API. This change enables users to pass notes directly from 
`TriggerDagRunOperator`, improving usability and reducing the need for 
additional API calls or custom logic.
   
   ### Tests
   - Added unit tests in:
     - `TestDagRunOperator` (Airflow 3)
     - `TestDagRunOperatorAF2` (Airflow 2)
   - Verified locally using `pytest` and Breeze
   
   ### Documentation
   - Updated example DAG in the Standard provider to show how to use the `note` 
parameter
   
   related: #56543
   


-- 
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