manugarri opened a new issue, #29178: URL: https://github.com/apache/airflow/issues/29178
### Description I have noticed that for some commands, there is an option to get the output in json or yaml (as described in this PR from 2020 https://github.com/apache/airflow/issues/12699). However, there are still some commands that do not support the `--output` argument, most notable one is the `dags trigger`. When triggering a dag, it is crucial to get the run_id that has been triggered, so the triggered dag run can be monitored by the calling party. However, the output from this command is hard to parse without resorting to (gasp!) regex: ``` [2023-01-26 11:03:41,038] {{__init__.py:42}} INFO - Loaded API auth backend: airflow.api.auth.backend.session Created <DagRun sample_dag @ 2023-01-26T11:03:41+00:00: manual__2023-01-26T11:03:41+00:00, state:queued, queued_at: 2023-01-26 11:03:41.412394+00:00. externally triggered: True> ``` As you can see, extracting the run_id `manual__2023-01-26T11:03:41+00:00` is not easy from the above output. ### Use case/motivation At my company we want to be able to trigger dags from another airflow environment (mwaa) and be able to wait for its completion before proceeding with the calling DAG. ### Related issues _No response_ ### Are you willing to submit a PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
