Repository navigation
Unit test for celery change_state wrapper - #40035
Conversation
|
@o-nikolas I'm very unfamiliar with the airflow test case suite (I'm new to airflow in general), so I doubt I'll get much further in terms of writing a test without a significant time sink. Similarly, I wasn't sure if there were any cases where If |
It looks like @potiuk has merged it anyway so problem solved 😆 I'll rebase this PR, because it still adds a test case, which we can merge or not, let's see what the community thinks. |
A unit test which triggers the scenario of a current Celery executor with the new signature of change_state run against an older version of Airflow with the old signature of change_state on the BaseExecutor class. related apache#40011 related apache#39980 related apache#40012
3646ac0 to
9075846
Compare
|
@o-nikolas I think adding the test case is definitely worth it. Also, would be great to get feedback on whether that exception should be except TypeError:or except (AttributeError, TypeError):If it's the former, we should merge what you have in. |
A unit test which triggers the scenario of a current Celery executor with the new signature of change_state run against an older version of Airflow with the old signature of change_state on the BaseExecutor class. related apache#40011 related apache#39980 related apache#40012
A unit test which triggers the scenario of a current Celery executor with the new signature of change_state run against an older version of Airflow with the old signature of change_state on the BaseExecutor class. related apache#40011 related apache#39980 related apache#40012
If an older version of main is being used BaseExecutor.change_state may have fewer parameters, catch the TypeError that is raised in this situation instead of the previously caught AttributeError.
Add a unit test to cover this scenario
fixes #40011
fixes #39980
related #40012 - This PR solves the same issue, but didn't include tests. I spent some time today noodling around with a test case and it turned out to be stubborn. So I'm opening this PR. It can either be merged or used as inspiration for #40012
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.