-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Ensure deps is set, convert BaseSensorOperator to classvar #21815
Conversation
This gets me pass the error, but hits another one:
I guess we do need a class-level |
1c5905f
to
b01eb5b
Compare
This fixes the current issue, but may break/not work with customer operators if someone sets deps on an instance level :( |
We're going to hit this sort of error more and more with other operators. We might need to rethink how we validate the args |
Maybe we can detect that (easy enough, simply check the attribute is actually a set/collection on the class level and not a descriptor), and raise an error saying the operator needs to be fixed? This can likely be done on DAG-parsing time. |
👍 I think it's unlikely enough to affect many people, so if we put a note in updating about this it should be good enough @evgenyshulman I remember on the multi-tenancy call that you do this. Would this cause problems for you? |
b01eb5b
to
9d00d5f
Compare
Check added. |
f47251d
to
8e61c57
Compare
This is the easiest way to get mapped operator's deps to work without jumping through too many hoops. This does introduce some potential backward incompatibility for peopel relying on the (internal?) dep class mechanism, but I _think_ it is acceptable.
8e61c57
to
9132d7a
Compare
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Fix #21807?
This is the easiest way to get mapped operator's deps to work without jumping through too many hoops. This does introduce some potential backward incompatibility for peopel relying on the (internal?) dep class mechanism, but I think it is acceptable.