Skip to content

Conversation

@arnoldmr01
Copy link
Contributor

Was generative AI tooling used to co-author this PR?

  • Yes (please specify the tool below)
  • ChatGPT

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

state=DagRunState.QUEUED,
session=session,
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be

Suggested change
if note:
dag_run.note = note

@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-note branch from 18bb27d to 44bd79a Compare January 13, 2026 01:23
@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-note branch from 44bd79a to 791fa6a Compare January 13, 2026 06:09
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this? And verified that the triggered dagrun had the appropriate note?

After the exception is raised with the additional note field, we need to update the sdk code to have that handled. (mostly, supervisor.py).

That PR seems completely off (not tested, not double checked, not complying with our "contributing with AI" guidelines, closing feel free to re-open if I misunderstood something.

Comment on lines +321 to +324
if self.note:
dag_run = session.merge(dag_run)
dag_run.note = self.note
session.flush()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that on the _trigger_dag_af_2 ? TriggerDagRunOperator note will not be handled anyway, do we need that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far, note information can be passed via UI and API, but TriggerDagRunOperator doesn't allow to pass note information. I put this part here in order to store the note information.

Comment on lines +48 to +54
# [START howto_operator_trigger_dagrun_with_note]
trigger_with_note = TriggerDagRunOperator(
task_id="trigger_with_note",
trigger_dag_id="example_trigger_target_dag",
note="Triggered with a note!",
)
# [END howto_operator_trigger_dagrun_with_note]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example section probably need to be added to the corresponding doc file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants