This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b5da2134d Update Dag trigger API and command docs (#32696)
8b5da2134d is described below

commit 8b5da2134d287abbe6b9e733e3613339e5f37b1f
Author: Pankaj Singh <[email protected]>
AuthorDate: Thu Jul 20 19:45:21 2023 +0530

    Update Dag trigger API and command docs (#32696)
    
    trigger dagrun API and CLI command does not execute task if dag is paused.
    document the same in API docs and CLI command docs
    
    
    Co-authored-by: Wei Lee <[email protected]>
---
 airflow/api_connexion/openapi/v1.yaml        | 5 ++++-
 airflow/cli/cli_config.py                    | 5 ++++-
 airflow/www/static/js/types/api-generated.ts | 2 ++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/airflow/api_connexion/openapi/v1.yaml 
b/airflow/api_connexion/openapi/v1.yaml
index 8c2b4b1912..d69bbf0b9c 100644
--- a/airflow/api_connexion/openapi/v1.yaml
+++ b/airflow/api_connexion/openapi/v1.yaml
@@ -735,7 +735,10 @@ paths:
           $ref: '#/components/responses/Unauthenticated'
 
     post:
-      summary: Trigger a new DAG run
+      summary: Trigger a new DAG run.
+      description: >
+        This will initiate a dagrun.
+        If DAG is paused then dagrun state will remain queued, and the task 
won't run.
       x-openapi-router-controller: 
airflow.api_connexion.endpoints.dag_run_endpoint
       operationId: post_dag_run
       tags: [DAGRun]
diff --git a/airflow/cli/cli_config.py b/airflow/cli/cli_config.py
index 79327a4701..b661f9361a 100644
--- a/airflow/cli/cli_config.py
+++ b/airflow/cli/cli_config.py
@@ -1236,7 +1236,10 @@ DAGS_COMMANDS = (
     ),
     ActionCommand(
         name="trigger",
-        help="Trigger a DAG run",
+        help=(
+            "Trigger a new DAG run. If DAG is paused then dagrun state will 
remain queued, "
+            "and the task won't run."
+        ),
         func=lazy_load_command("airflow.cli.commands.dag_command.dag_trigger"),
         args=(
             ARG_DAG_ID,
diff --git a/airflow/www/static/js/types/api-generated.ts 
b/airflow/www/static/js/types/api-generated.ts
index 9d60b6de8f..5387da0cc1 100644
--- a/airflow/www/static/js/types/api-generated.ts
+++ b/airflow/www/static/js/types/api-generated.ts
@@ -143,6 +143,7 @@ export interface paths {
   "/dags/{dag_id}/dagRuns": {
     /** This endpoint allows specifying `~` as the dag_id to retrieve DAG runs 
for all DAGs. */
     get: operations["get_dag_runs"];
+    /** This will initiate a dagrun. If DAG is paused then dagrun state will 
remain queued, and the task won't run. */
     post: operations["post_dag_run"];
     parameters: {
       path: {
@@ -2931,6 +2932,7 @@ export interface operations {
       401: components["responses"]["Unauthenticated"];
     };
   };
+  /** This will initiate a dagrun. If DAG is paused then dagrun state will 
remain queued, and the task won't run. */
   post_dag_run: {
     parameters: {
       path: {

Reply via email to