Lee-W commented on code in PR #43678:
URL: https://github.com/apache/airflow/pull/43678#discussion_r1830581488
##########
airflow/models/dagrun.py:
##########
@@ -285,7 +285,7 @@ def stats_tags(self) -> dict[str, str]:
return prune_dict({"dag_id": self.dag_id, "run_type": self.run_type})
@property
- def logical_date(self) -> datetime:
+ def logical_date(self):
return self.execution_date
Review Comment:
I think this is going to be removed in another PR?
##########
airflow/api_connexion/endpoints/dag_run_endpoint.py:
##########
@@ -173,12 +173,12 @@ def _fetch_dag_runs(
query = query.where(DagRun.updated_at <= updated_at_lte)
total_entries = get_query_count(query, session=session)
- to_replace = {"dag_run_id": "run_id", "execution_date": "logical_date"}
+ to_replace = {"dag_run_id": "run_id", "logical_date": "logical_date"}
Review Comment:
Do we need to replace it?
##########
airflow/api_connexion/schemas/dag_run_schema.py:
##########
@@ -109,9 +101,9 @@ def autogenerate(self, data, **kwargs):
@post_dump
def autofill(self, data, **kwargs):
- """Populate execution_date from logical_date for compatibility."""
+ """Populate logical_date from logical_date for compatibility."""
ret_data = {}
- data["execution_date"] = data["logical_date"]
+ data["logical_date"] = data["logical_date"]
Review Comment:
```suggestion
```
I think we probably don't need this line?
##########
airflow/api_connexion/schemas/task_instance_schema.py:
##########
@@ -212,8 +212,8 @@ class SetTaskInstanceStateFormSchema(Schema):
@validates_schema
def validate_form(self, data, **kwargs):
"""Validate set task instance state form."""
- if not exactly_one(data.get("execution_date"), data.get("dag_run_id")):
- raise ValidationError("Exactly one of execution_date or dag_run_id
must be provided")
+ if not exactly_one(data.get("logical_date"), data.get("dag_run_id")):
Review Comment:
Is this still needed after the removal in
airflow/api_connexion/openapi/v1.yaml
--
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]