-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
ECSOperator / pass context to self.xcom_pull as it was missing (when using reattach) #17141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool!
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, shows how easily mocking in tests can be fraught (i.e. in this case missing the assert that context was provided). I'm curious how this got past manual testing though.
this happened because in my manual testing I was using a previous version I had locally before a refactor :
I had to do this refactor to use mocking in the tests |
It's not very well understood concept but unit tests do not replace manual tests, not even are a proof that things are right. They are there mostly to make sure that behaviour have not changed and is the same as before (so prevent regression). And having unit tests written at all (whether they are correct or not) makes it simply easier to fix things and re-run tests after we find and fix problems (and fix test afterwards :)). |
Thanks 👏 @pmalafosse |
Totally agree, system/E2E tests are also key for catching these types of things (i.e. functional issues) rather than the quick regression testing that unit tests provide. |
FYI @darwinyip
This is to fix a bug I found with context not being passed to xcom_pull (used for the
reattach
feature)I updated the unit tests and ran that new code locally to make sure it was working as expected.
@o-nikolas @kaxil