potiuk commented on PR #39165:
URL: https://github.com/apache/airflow/pull/39165#issuecomment-2161594496

   ```
   
tests/providers/google/cloud/links/test_translate.py::TestTranslationLegacyDatasetLink::test_get_link
 - TypeError: create_dagrun() got an unexpected keyword argument 'triggered_by'
   ```
   
   
   The "create_dragrun" method in DAG model does not have the `triggered_by` 
argument - and  commons.sql and openlineage provider call that method, and this 
method does not have `triggered_by` argument for Airlfow 2.9, 2.8, 2.7. So the 
tests correctly caught that the change makes tests common.sql and openlineage 
not compatible with Airflow < 2.10.
   
   You need to implement the change in the way that it will also work when you 
have airflow 2.7 - 2.9 installed (i.e. dag model has no `triggered_by` 
attribute. This looks like test-only issue - looks like create_dagrun is 
executed in tests.  Simply tests for the provideers should take into account 
that you might run thet tests and have older versions of Airflow installed.
   
   Various ways how to deal with it and how to run the tests with Airflow 2.7 - 
2.9 are described here: 
   
   
https://github.com/apache/airflow/blob/main/contributing-docs/testing/unit_tests.rst#compatibility-provider-unit-tests-against-older-airflow-releases
   
   (and you can find a number of examples where test compatibility is 
implemented following those) 


-- 
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]

Reply via email to