ephraimbuddy commented on a change in pull request #18724:
URL: https://github.com/apache/airflow/pull/18724#discussion_r754398212
##########
File path: airflow/api/common/experimental/mark_tasks.py
##########
@@ -104,6 +120,16 @@ def set_state(
if dag is None:
raise ValueError("Received tasks with no DAG")
+ if run_id is not None:
+ dr = (
+ session.query(DagRun.execution_date)
+ .filter(DagRun.run_id == run_id, DagRun.dag_id == dag.dag_id)
+ .one_or_none()
+ )
+ if dr is None:
+ raise ValueError(f"Run id {run_id} not found")
+ execution_date = dr.execution_date
+
dates = get_execution_dates(dag, execution_date, future, past)
Review comment:
It looks like if we don't convert it here, we will eventually convert to
`execution_date ` in `get_execution_date` when we want to get the execution
dates for the DAG since we will need to get the `start_date` and `end_date` to
use in checking the execution dates if future or past is supplied.
I can't really figure how to get the execution dates without converting the
run_id to execution_date.
Working on it but will appreciate any clue
--
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]