The GitHub Actions job "Tests" on airflow.git has succeeded. Run started by GitHub user duke8585 (triggered by potiuk).
Head commit for run: 904027bf180d3699ff177aa6e06fbe2a91fbc579 / max rieger <[email protected]> Fixing get_task_instances_before method and adding a unit test With this new fix, the determination of the min_date is done on a set of execution_date values - via querying - limited by `num`and taking the last element of it. the fallback value if none are found is simply the base_date. this way, the invoked get_task_instances cannot default to 30 days prior to the current time. Furthermore, the query itself is no longer confined to non-manual runs, but includes all DAGRun types. More context: During writing the tests, it became evident that the current implementation of the get_task_instances_before method has two problems: 1) With the implementation of a limit + offset determination of the min_date, no results can occur: * Either due to less DAGRuns in the DB than `num` or * Because of the constraining to non-manual runs (see more below). Consequently, the fallback in the invoked get_task_instances is then a -30d from datetime.now(), so an entirely different time dimension than the one selected in the UI (execution_date). 2) With the explicit omission of manual runs in the query, in case of n manual runs and 1 scheduled one before the base_date (e.g. S-M-M-...-M-M-BD), the scheduled one + n manual runs are returned. in the case of mainly triggered/manual DAGRuns, this leads to more results displayed than expected. in case of solely manual DAGRuns, the method will return no results and hence default to the above mentioned fallback, which operates on a different timeline. prior tp this fix, there was even a fallback to the start of the current epochal period, i.e. showing all DAGRuns in the DB. With the previously suggested non-breaking fix, it was not possible to avoid this scenario, with any scheduled run found, the fallback was never reached. The suggested changes may be considered breaking. the changes are confined to the scope of the get_task_instances_before method and usage is only in the views.py for the duration, tries and landing times, so where the changes meant to fix the existing behavior. Report URL: https://github.com/apache/airflow/actions/runs/4191708795 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
