dstandish commented on code in PR #37176:
URL: https://github.com/apache/airflow/pull/37176#discussion_r1481861065


##########
airflow/api_connexion/openapi/v1.yaml:
##########
@@ -986,6 +986,163 @@ paths:
         "404":
           $ref: "#/components/responses/NotFound"
 
+  /dags/{dag_id}/datasets/eventQueue/{uri}:
+    parameters:
+      - $ref: "#/components/parameters/DAGID"
+      - $ref: "#/components/parameters/DatasetURI"
+
+    get:
+      summary: Get a queued Dataset event for a DAG
+      description: |
+        Get a queued Dataset event for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: get_dag_dataset_queue_event
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "200":
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatasetDagRunQueue"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+    delete:
+      summary: Delete a queued Dataset event for a DAG.
+      description: |
+        Delete a queued Dataset event for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: delete_dag_dataset_queue_event
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "204":
+          description: Success.
+        "400":
+          $ref: "#/components/responses/BadRequest"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+  /dags/{dag_id}/datasets/eventQueue:
+    parameters:
+      - $ref: "#/components/parameters/DAGID"
+
+    get:
+      summary: Get queued Dataset events for a DAG.
+      description: |
+        Get queued Dataset events for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: get_dag_dataset_queue_events
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "200":
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatasetDagRunQueueCollection"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+    delete:
+      summary: Delete queued Dataset events for a DAG.
+      description: |
+        Delete queued Dataset events for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: delete_dag_dataset_queue_events
+      parameters:

Review Comment:
   ok so this is w.r.t. the DELETE method at endpoint 
`/dags/{dag_id}/datasets/eventQueue` right?
   Perhaps `uri` should also be an optional parameter?  So you can delete the 
event queue record specific to a (uri, dag) combination?



##########
airflow/api_connexion/openapi/v1.yaml:
##########
@@ -986,6 +986,163 @@ paths:
         "404":
           $ref: "#/components/responses/NotFound"
 
+  /dags/{dag_id}/datasets/eventQueue/{uri}:
+    parameters:
+      - $ref: "#/components/parameters/DAGID"
+      - $ref: "#/components/parameters/DatasetURI"
+
+    get:
+      summary: Get a queued Dataset event for a DAG
+      description: |
+        Get a queued Dataset event for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: get_dag_dataset_queue_event
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "200":
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatasetDagRunQueue"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+    delete:
+      summary: Delete a queued Dataset event for a DAG.
+      description: |
+        Delete a queued Dataset event for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: delete_dag_dataset_queue_event
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "204":
+          description: Success.
+        "400":
+          $ref: "#/components/responses/BadRequest"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+  /dags/{dag_id}/datasets/eventQueue:
+    parameters:
+      - $ref: "#/components/parameters/DAGID"
+
+    get:
+      summary: Get queued Dataset events for a DAG.
+      description: |
+        Get queued Dataset events for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: get_dag_dataset_queue_events
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "200":
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatasetDagRunQueueCollection"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+    delete:
+      summary: Delete queued Dataset events for a DAG.
+      description: |
+        Delete queued Dataset events for a DAG.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: delete_dag_dataset_queue_events
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "204":
+          description: Success.
+        "400":
+          $ref: "#/components/responses/BadRequest"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+  /datasets/eventQueue/{uri}:
+    parameters:
+      - $ref: "#/components/parameters/DatasetURI"
+
+    get:
+      summary: Get queued Dataset events for a Dataset.
+      description: |
+        Get queued Dataset events for a Dataset
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: get_dataset_queue_events
+      parameters:
+        - $ref: "#/components/parameters/Before"
+      tags: [Dataset]
+      responses:
+        "200":
+          description: Success.
+          content:
+            application/json:
+              schema:
+                $ref: "#/components/schemas/DatasetDagRunQueueCollection"
+        "401":
+          $ref: "#/components/responses/Unauthenticated"
+        "403":
+          $ref: "#/components/responses/PermissionDenied"
+        "404":
+          $ref: "#/components/responses/NotFound"
+
+    delete:
+      summary: Delete queued Dataset events for a Dataset.
+      description: |
+        Delete queued Dataset events for a Dataset.
+
+        *New in version 2.9.0*
+      x-openapi-router-controller: 
airflow.api_connexion.endpoints.dataset_endpoint
+      operationId: delete_dataset_queue_events
+      parameters:

Review Comment:
   somehow, whether here or above, we probably want to be able to filter by dag 
also.  it's somewhat "dangerous"  to just delete all queue records for a 
dataset because, multiple dags may depend on that, so you may clear out more 
queue records than you think (if you're just trying to clear the state for a 
particular dag).
   
   
   



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to