MaksYermak commented on code in PR #55110:
URL: https://github.com/apache/airflow/pull/55110#discussion_r2315186815
##########
providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:
##########
@@ -1285,10 +1292,18 @@ def generate_job_id(self, job_id, dag_id, task_id,
logical_date, configuration,
if job_id:
return f"{job_id}_{uniqueness_suffix}"
- exec_date = logical_date.isoformat()
+ exec_date = date.isoformat()
job_id = f"airflow_{dag_id}_{task_id}_{exec_date}_{uniqueness_suffix}"
return re.sub(r"[:\-+.]", "_", job_id)
+ def get_exec_date(self, context: Context) -> pendulum.DateTime:
+ date = context.get("logical_date", None)
+ if AIRFLOW_V_3_0_PLUS and date is None:
+ dag_run = context.get("dag_run")
+ if dag_run and hasattr(dag_run, "run_after"):
Review Comment:
@kaxil ok, now I got it. You mentioned `if dag_run and hasattr(dag_run,
"run_after")` block not the `if AIRFLOW_V_3_0_PLUS and date is None:` block. I
thought that you suggest to remove `if AIRFLOW_V_3_0_PLUS and date is None` and
it was a reason for my concerns about compatibility with AF2. Thank you for
yours clarification!
--
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]