-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Make sure xcoms work correctly in MSGraphAsyncOperator with concurrent workers #40297
Conversation
…t by taking the map_index into account
Is it possible to add unit test for that to avoid regressions ? |
That would mean a unit test using multiple threads as I need concurrency to reproduce it. Are there any examples of unit tests using multiple threads? |
When I search in |
Ok will also search then, I just asked because I know from experience that test with threads can something mess up the whole test pipeline |
The problem with Python is that the basic threading doesn't do real multithreading, so I don't know if I will be able to reproduce it as we did encounter the issues with multiple workers being deployed across multiple pods. So in order to test this correctly, I would be force to use the multiprocessing pyhton module. |
Yeah. If it's too much of a hassle and reproducibility is difficult, then yeah we can definitely skip tests |
…t by taking the map_index into account (apache#40297) Co-authored-by: David Blain <[email protected]>
This pull request makes sure xcoms work correctly in a multi-threaded environment (e.g. when applying dynamic task mapping with concurrent workers) by taking the map_index into account when pushing and pulling xcoms.
^ 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.rst
or{issue_number}.significant.rst
, in newsfragments.