bugraoz93 opened a new issue, #66172:
URL: https://github.com/apache/airflow/issues/66172

   ### Body
   
   ## Summary
   
   Add `airflowctl dags next-execution --dag-id <dag_id>` command to airflowctl.
   Prerequisite for the `dags next-execution` wiring PR under issue 
#<dags-issue>.
   
   ## Background
   
   `airflow dags next-execution <dag_id>` prints the next scheduled run time 
for a DAG.
   The data is already returned by GET /api/v2/dags/{dag_id} in the fields:
   - next_dagrun_logical_date
   - next_dagrun_data_interval_start
   - next_dagrun_data_interval_end
   - next_dagrun_run_after
   
   No new API endpoint is needed.
   
   ## Work
   
   - Add a next_execution method to DagsOperations in 
airflowctl/api/operations.py
     calling GET /api/v2/dags/{dag_id} and returning the next-run fields.
   - Wire as `airflowctl dags next-execution --dag-id <id>` in the CLI as 
custom command
   - Print a clear "no upcoming run" message for paused or schedule-less DAGs.
   
   ## Acceptance criteria
   
   - `airflowctl dags next-execution --dag-id my_dag` prints the next execution 
time.
   - Returns a clear message when no upcoming run is scheduled, similar to 
Airflow CLI
   
   ### Committer
   
   - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow 
project.


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