ephraimbuddy commented on a change in pull request #18724:
URL: https://github.com/apache/airflow/pull/18724#discussion_r763389068
##########
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:
I deprecated the functions inside the module and created another module
where I used `run_id`. I had to use `deprecated` lib because I'm thinking maybe
someone uses the API externally. Let me know what you think about the whole
thing.
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]