kacpermuda commented on code in PR #39513: URL: https://github.com/apache/airflow/pull/39513#discussion_r1596848421
########## tests/providers/openlineage/plugins/test_listener.py: ########## @@ -33,10 +33,20 @@ from airflow.providers.openlineage.plugins.listener import OpenLineageListener from airflow.providers.openlineage.utils.selective_enable import disable_lineage, enable_lineage from airflow.utils.state import State +from tests.test_utils.compat import AIRFLOW_V_2_10_PLUS from tests.test_utils.config import conf_vars pytestmark = pytest.mark.db_test +EXPECTED_TRY_NUMBER_1 = 1 if AIRFLOW_V_2_10_PLUS else 0 Review Comment: Sorry for the late response, a lot going on today. > does it not mean that open-lineage integration for Airlfow 2.10 is heavily impacted by the try_num change? Yes, but that was already taken car of in this [PR](https://github.com/apache/airflow/pull/39336/files#diff-776b432a685e8cc2a2ec0432aab9d9b22ca4e79a247debf0967a0a5802af09f2R49) i think. > is it ok to keep it this way? @mobuchowski @JDarDagran wdyt? I think some tests will not be necessary and some new are needed if the try_num will remain unchanged during the entire execution. I can prepare a separate PR for it on Monday, that will update the OL tests. I'm not sure yet how i could recreate in tests the entire flow of the taskinstance and be sure that the try_num is not changing, but I'll figure something out. More info: In OpenLineage we are generating a unique identifier for each task run using dag_id, task_id, execution_date and try_number. We needed to make sure that those run_id are deterministic and constant across the OL run (so that all listener methods receive task_instance with specific try_num), and that's what these tests are supposed to do. As I could not fully mock and recreate the task execution flow together with the exact moment when the try_num is increased, i did my best to simply test whether or not the OL code responds well to current hard-coded moment when the try_num was increased. -- 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]
