You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2026/02/23 17:37:37 UTC

[PR] Update UI list deadlines endpoint [airflow]

pierrejeambrun opened a new pull request, #62374:
URL: https://github.com/apache/airflow/pull/62374

   Follow up of https://github.com/apache/airflow/pull/62189
   
   Handle pagination
   Format response to be consistent with other listing endpoints


-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "guan404ming (via GitHub)" <gi...@apache.org>.
guan404ming commented on code in PR #62374:
URL: https://github.com/apache/airflow/pull/62374#discussion_r2844988234


##########
airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts:
##########
@@ -3923,17 +3923,25 @@ export class DeadlinesService {
      * Get all deadlines for a specific DAG run.
      * @param data The data for the request.
      * @param data.dagId
-     * @param data.runId
-     * @returns DeadlineResponse Successful Response
+     * @param data.dagRunId
+     * @param data.limit
+     * @param data.offset
+     * @param data.orderBy Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, deadline_time, created_at, alert_name`
+     * @returns DealineCollectionResponse Successful Response
      * @throws ApiError
      */
     public static getDagRunDeadlines(data: GetDagRunDeadlinesData): CancelablePromise<GetDagRunDeadlinesResponse> {
         return __request(OpenAPI, {
             method: 'GET',
-            url: '/ui/deadlines/{dag_id}/{run_id}',
+            url: '/ui/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines',

Review Comment:
   Thanks for asking, this is a great question. My two cents: this version is mainly better in terms of semantic correctness and consistency with our existing REST patterns.
   
   In this case, deadlines are conceptually scoped under a specific dag run, so expressing the path as `/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines` makes that parent–child relationship explicit. It also aligns with how other resources are structured under dags and dagRuns, which makes the API more predictable and easier to reason about. The previous path works functionally, but it’s a bit less clear in terms of resource hierarchy and deviates from the conventions we’ve been following.



-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #62374:
URL: https://github.com/apache/airflow/pull/62374


-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #62374:
URL: https://github.com/apache/airflow/pull/62374#discussion_r2843685518


##########
airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts:
##########
@@ -3923,17 +3923,25 @@ export class DeadlinesService {
      * Get all deadlines for a specific DAG run.
      * @param data The data for the request.
      * @param data.dagId
-     * @param data.runId
-     * @returns DeadlineResponse Successful Response
+     * @param data.dagRunId
+     * @param data.limit
+     * @param data.offset
+     * @param data.orderBy Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, deadline_time, created_at, alert_name`
+     * @returns DealineCollectionResponse Successful Response
      * @throws ApiError
      */
     public static getDagRunDeadlines(data: GetDagRunDeadlinesData): CancelablePromise<GetDagRunDeadlinesResponse> {
         return __request(OpenAPI, {
             method: 'GET',
-            url: '/ui/deadlines/{dag_id}/{run_id}',
+            url: '/ui/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines',

Review Comment:
   Non-blocking question for my education.  I'm not arguing, I'm trying to learn.  What makes this path better than the one @imrichardwu used?  Why change it?
   
   The other changes make sense, I don't understand this one.



-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #62374:
URL: https://github.com/apache/airflow/pull/62374#discussion_r2848952640


##########
airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts:
##########
@@ -3923,17 +3923,25 @@ export class DeadlinesService {
      * Get all deadlines for a specific DAG run.
      * @param data The data for the request.
      * @param data.dagId
-     * @param data.runId
-     * @returns DeadlineResponse Successful Response
+     * @param data.dagRunId
+     * @param data.limit
+     * @param data.offset
+     * @param data.orderBy Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, deadline_time, created_at, alert_name`
+     * @returns DealineCollectionResponse Successful Response
      * @throws ApiError
      */
     public static getDagRunDeadlines(data: GetDagRunDeadlinesData): CancelablePromise<GetDagRunDeadlinesResponse> {
         return __request(OpenAPI, {
             method: 'GET',
-            url: '/ui/deadlines/{dag_id}/{run_id}',
+            url: '/ui/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines',

Review Comment:
   OK, I can see that.  Future plans include deadlines at other levels, such as per task.  So when those are added, the uri would be `/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/deadlines` ?
   
   And I guess when we add asset/dataset/event based deadline references, the deadline itself will still be attached to a dagrun, so all of those would reuse your path.  I think I get it.  Thanks.



-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #62374:
URL: https://github.com/apache/airflow/pull/62374#discussion_r2852655662


##########
airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts:
##########
@@ -3923,17 +3923,25 @@ export class DeadlinesService {
      * Get all deadlines for a specific DAG run.
      * @param data The data for the request.
      * @param data.dagId
-     * @param data.runId
-     * @returns DeadlineResponse Successful Response
+     * @param data.dagRunId
+     * @param data.limit
+     * @param data.offset
+     * @param data.orderBy Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, deadline_time, created_at, alert_name`
+     * @returns DealineCollectionResponse Successful Response
      * @throws ApiError
      */
     public static getDagRunDeadlines(data: GetDagRunDeadlinesData): CancelablePromise<GetDagRunDeadlinesResponse> {
         return __request(OpenAPI, {
             method: 'GET',
-            url: '/ui/deadlines/{dag_id}/{run_id}',
+            url: '/ui/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines',

Review Comment:
   `/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/deadlines` 
   
   Yes I think that will be the final url for all deadlines related to dag/runs/tasks. Just provide `~` for the parent items if you want all.
   
   For assets I guess it will be similarly nested under assets.
   
   Its good the endpoint is 'private' for now so we can keep iterating on the best structure before making it part of the public API.



-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #62374:
URL: https://github.com/apache/airflow/pull/62374#discussion_r2852655662


##########
airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts:
##########
@@ -3923,17 +3923,25 @@ export class DeadlinesService {
      * Get all deadlines for a specific DAG run.
      * @param data The data for the request.
      * @param data.dagId
-     * @param data.runId
-     * @returns DeadlineResponse Successful Response
+     * @param data.dagRunId
+     * @param data.limit
+     * @param data.offset
+     * @param data.orderBy Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, deadline_time, created_at, alert_name`
+     * @returns DealineCollectionResponse Successful Response
      * @throws ApiError
      */
     public static getDagRunDeadlines(data: GetDagRunDeadlinesData): CancelablePromise<GetDagRunDeadlinesResponse> {
         return __request(OpenAPI, {
             method: 'GET',
-            url: '/ui/deadlines/{dag_id}/{run_id}',
+            url: '/ui/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines',

Review Comment:
   `/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/deadlines` 
   
   Yes I think that will be the final url for all deadlines related to dag/runs/tasks. Just provide `~` for the parent items if you want all.
   
   For assets I guess it will be similarly nested under assets.



-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #62374:
URL: https://github.com/apache/airflow/pull/62374#issuecomment-3946299732

   We probably need additional filters, and be able to handle wildcard `~` dag_id/dag_run_id, but that can be done as follow up.
   
   We this is stabilized we can convert it into a public API.


-- 
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-unsubscribe@airflow.apache.org

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


Re: [PR] Update UI list deadlines endpoint [airflow]

Posted by "guan404ming (via GitHub)" <gi...@apache.org>.
guan404ming commented on code in PR #62374:
URL: https://github.com/apache/airflow/pull/62374#discussion_r2844988234


##########
airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts:
##########
@@ -3923,17 +3923,25 @@ export class DeadlinesService {
      * Get all deadlines for a specific DAG run.
      * @param data The data for the request.
      * @param data.dagId
-     * @param data.runId
-     * @returns DeadlineResponse Successful Response
+     * @param data.dagRunId
+     * @param data.limit
+     * @param data.offset
+     * @param data.orderBy Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, deadline_time, created_at, alert_name`
+     * @returns DealineCollectionResponse Successful Response
      * @throws ApiError
      */
     public static getDagRunDeadlines(data: GetDagRunDeadlinesData): CancelablePromise<GetDagRunDeadlinesResponse> {
         return __request(OpenAPI, {
             method: 'GET',
-            url: '/ui/deadlines/{dag_id}/{run_id}',
+            url: '/ui/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines',

Review Comment:
   My two cents: this version is mainly better in terms of semantic correctness and consistency with our existing REST patterns.
   
   In this case, deadlines are conceptually scoped under a specific dag run, so expressing the path as `/dags/{dag_id}/dagRuns/{dag_run_id}/deadlines` makes that parent–child relationship explicit. It also aligns with how other resources are structured under dags and dagRuns, which makes the API more predictable and easier to reason about. The previous path works functionally, but it’s a bit less clear in terms of resource hierarchy and deviates from the conventions we’ve been following.



-- 
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-unsubscribe@airflow.apache.org

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