You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/05 16:45:11 UTC

[GitHub] [airflow] ephraimbuddy opened a new pull request, #22756: Add more fields to REST API dags/dag_id/details endpoint

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

   Added more fields to the DAG details endpoint, which is the endpoint for
   getting DAG `object` details
   


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


[GitHub] [airflow] ashb commented on a diff in pull request #22756: Add more fields to REST API dags/dag_id/details endpoint

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #22756:
URL: https://github.com/apache/airflow/pull/22756#discussion_r845168795


##########
airflow/api_connexion/openapi/v1.yaml:
##########
@@ -2912,7 +2912,49 @@ components:
                 User-specified DAG params.
 
                 *New in version 2.0.1*
+            end_date:
+              type: string
+              format: 'date-time'
+              readOnly: true
+              nullable: true
+              description: |
+                The DAG's end date.
+
+                *New in version 2.3.0*.
+            is_paused_upon_creation:
+              type: boolean
+              readOnly: true
+              nullable: true
+              description: |
+                Whether the DAG is paused upon creation.
+
+                *New in version 2.3.0*
+            last_loaded:

Review Comment:
   I wonder if this should be called last_parsed instead?



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


[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #22756: Add more fields to REST API dags/dag_id/details endpoint

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on code in PR #22756:
URL: https://github.com/apache/airflow/pull/22756#discussion_r845183091


##########
airflow/api_connexion/openapi/v1.yaml:
##########
@@ -2912,7 +2912,49 @@ components:
                 User-specified DAG params.
 
                 *New in version 2.0.1*
+            end_date:
+              type: string
+              format: 'date-time'
+              readOnly: true
+              nullable: true
+              description: |
+                The DAG's end date.
+
+                *New in version 2.3.0*.
+            is_paused_upon_creation:
+              type: boolean
+              readOnly: true
+              nullable: true
+              description: |
+                Whether the DAG is paused upon creation.
+
+                *New in version 2.3.0*
+            last_loaded:

Review Comment:
   +1. That's more in line with Airflow terms



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


[GitHub] [airflow] ashb merged pull request #22756: Add more fields to REST API dags/dag_id/details endpoint

Posted by GitBox <gi...@apache.org>.
ashb merged PR #22756:
URL: https://github.com/apache/airflow/pull/22756


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


[GitHub] [airflow] ephraimbuddy commented on pull request #22756: Add more fields to REST API dags/dag_id/details endpoint

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on PR #22756:
URL: https://github.com/apache/airflow/pull/22756#issuecomment-1091446319

   > Many of those properties are internal detail of how things are stored/implemented and I'm not sure it make senses to include them in the output.
   > 
   > Specifically:
   > 
   > * edge_info this feels out of place on the DAG details endpoint (and is just an implementation detail of how we store edge labels) but maybe this is the only place it makes sense to include. If we want to keep this here we should specify the type more tightly than just "object"
   > * partial will never be True on a dag returned by the API. Remove
   > * has_*_callback is an artefact of serialization. Remove?
   > * user_defined_* -- what value does this even have when those are set? What could an API consumer do with that info. Remove?
   > * default_args: is this relevant to anything?
   > * jinja_environment_kwargs: Remove?
   > * render_template_as_native_obj: Relevant? Remove?
   
   Looks like we don't really need to add more to what is already existing...


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


[GitHub] [airflow] ephraimbuddy commented on pull request #22756: Add more fields to REST API dags/dag_id/details endpoint

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on PR #22756:
URL: https://github.com/apache/airflow/pull/22756#issuecomment-1091542282

   `render_template_as_native_obj` as native object looks relevant.


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


[GitHub] [airflow] ashb commented on a diff in pull request #22756: Add more fields to REST API dags/dag_id/details endpoint

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #22756:
URL: https://github.com/apache/airflow/pull/22756#discussion_r844905000


##########
airflow/api_connexion/endpoints/dag_endpoint.py:
##########
@@ -56,6 +56,7 @@ def get_dag(*, dag_id: str, session: Session = NEW_SESSION) -> APIResponse:
 def get_dag_details(*, dag_id: str) -> APIResponse:
     """Get details of DAG."""
     dag: DAG = current_app.dag_bag.get_dag(dag_id)
+

Review Comment:
   ```suggestion
   ```
   
   (to avoid touching this file)



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