ashb commented on code in PR #25961:
URL: https://github.com/apache/airflow/pull/25961#discussion_r958661820


##########
airflow/www/static/js/types/api-generated.ts:
##########
@@ -1536,9 +1536,54 @@ export interface components {
       source_run_id?: string | null;
       /** @description The task map index that updated the dataset. */
       source_map_index?: number | null;
+      created_dagruns?: components["schemas"]["BasicDAGRun"][];
       /** @description The dataset event creation time */
       timestamp?: string;
     };
+    BasicDAGRun: {
+      /** @description Run ID. */
+      run_id?: string | null;
+      dag_id?: string;
+      /**
+       * Format: date-time
+       * @description The logical date (previously called execution date). 
This is the time or interval covered by
+       * this DAG run, according to the DAG definition.
+       *
+       * The value of this field can be set only when creating the object. If 
you try to modify the
+       * field of an existing object, the request fails with an BAD_REQUEST 
error.
+       *
+       * This together with DAG_ID are a unique key.
+       *
+       * *New in version 2.2.0*
+       */
+      logical_date?: string | null;
+      /**
+       * Format: date-time
+       * @deprecated
+       * @description The execution date. This is the same as logical_date, 
kept for backwards compatibility.
+       * If both this field and logical_date are provided but with different 
values, the request
+       * will fail with an BAD_REQUEST error.
+       *
+       * *Changed in version 2.2.0*: Field becomes nullable.
+       *
+       * *Deprecated since version 2.2.0*: Use 'logical_date' instead.
+       */
+      execution_date?: string | null;

Review Comment:
   Where's this coming from? I don't see it in the schema for BasicDag Run 



##########
airflow/www/static/js/types/api-generated.ts:
##########
@@ -1536,9 +1536,54 @@ export interface components {
       source_run_id?: string | null;
       /** @description The task map index that updated the dataset. */
       source_map_index?: number | null;
+      created_dagruns?: components["schemas"]["BasicDAGRun"][];
       /** @description The dataset event creation time */
       timestamp?: string;
     };
+    BasicDAGRun: {
+      /** @description Run ID. */
+      run_id?: string | null;
+      dag_id?: string;
+      /**
+       * Format: date-time
+       * @description The logical date (previously called execution date). 
This is the time or interval covered by
+       * this DAG run, according to the DAG definition.
+       *
+       * The value of this field can be set only when creating the object. If 
you try to modify the
+       * field of an existing object, the request fails with an BAD_REQUEST 
error.
+       *
+       * This together with DAG_ID are a unique key.
+       *
+       * *New in version 2.2.0*
+       */
+      logical_date?: string | null;

Review Comment:
   None of these should be nullable.



##########
airflow/api_connexion/schemas/dataset_schema.py:
##########
@@ -91,6 +92,25 @@ class DatasetCollectionSchema(Schema):
 dataset_collection_schema = DatasetCollectionSchema()
 
 
+class BasicDAGRunSchema(SQLAlchemySchema):
+    """Basic Schema for DAGRun"""
+
+    class Meta:
+        """Meta"""
+
+        model = DagRun
+        dateformat = "iso"
+
+    run_id = auto_field(data_key='dag_run_id')
+    dag_id = auto_field(dump_only=True)
+    execution_date = auto_field(data_key="logical_date", dump_only=True)

Review Comment:
   execution_date is only included for compat reasons, let's not include it in 
a new API.
   
   ```suggestion
       logical_date = auto_field(dump_only=True)
   ```



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