Arunodoy18 opened a new pull request, #59848: URL: https://github.com/apache/airflow/pull/59848
I've successfully implemented the fix for the [last_automated_run](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) issue! Here's what was done: Problem Identified The [calculate_dagrun_date_fields()](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) method had a parameter called [last_automated_run](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) that was misleading - it wasn't always the latest run. The scheduler sometimes passed whatever run it was currently processing, which could cause [next_dagrun](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) fields to be set back in time in distributed systems. Solution Implemented Renamed the parameter in [dag.py:693](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html): last_automated_dag_run → [last_automated_data_interval](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) Updated docstring to clarify expectations Removed redundant variable assignment Added helper method in [scheduler_job_runner.py:1721](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html): [_get_latest_automated_dagrun_data_interval()](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) - queries database for actual latest automated run Returns the data interval to use for next_dagrun calculation Updated all 3 call sites to query for latest run before calculating: [_create_dag_runs()](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) at line 1819 _handle_timeouts() at line 2159 [_schedule_dag_run()](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) at line 2223 Changes Made ✅ Modified [dag.py](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) ✅ Modified [scheduler_job_runner.py](vscode-file://vscode-app/c:/Users/aruno/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) ✅ All code compiles successfully ✅ Committed with detailed message following Apache guidelines ✅ Pushed to branch fix/last-automated-run-parameter ✅ Created PR description document Closes: Issue No. 59618 -- 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]
