-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Fix failing KubeExecutor tests due to #44710 #44931
Conversation
providers/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py
Show resolved
Hide resolved
Lets also please amment the commit message and change the title as this is a fix that we will note in the change log so users needs to know what this is about. |
Somehow that fix (while necessaryf for now) seems to be just workaround cc: @o-nikolas -> was it deliberate change or side-effect ? |
And good job @amoghrajesh on quick-fixing. |
Thanks! Yeah i didnt get enough time to actually debug what went wrong. So, workaround for now |
This was a deliberate change. Until now we've had the executor name/module path and optionally an alias. If it is a custom executor (provided as a module path) the str repr is FWIW if it was a custom module path executor, with an alias and a team it would be I could go back and remove this update, but I really do like that the "core executors" are moving closer inline with other executors. The problem comes with how the code here is fetching an executor name (not the executor itself) and comparing it to the Does that make sense? I know it's kind of nuanced and complicated. What do folks think? I can look on Monday at updating this code, or what a long term fix might look like. |
yeah. makes perfect sense. I think we should not compare it to the name but determine the class name from the "default_executor" and compare it with K8SExecutor class. |
(and later when team_id is served when team_id is set for executor, it should only query for tasks with the team_id of course). |
Thanks @o-nikolas! Yeah that makes good sense.
Yea as Jarek mentioned, we should just try to compare the class names or the |
Okay, sounds good, @potiuk @amoghrajesh I'll take a look at a more permanent change today. Also note, that I updated me previous comment with more code-formatted text, since it was hiding some of the text! It should be even more clear to read now. Sorry for that extra confusion 😅 |
Recent changes brought in by #44710 leads to KubeExecutor tests failing.
The reason is because for some reason, the
default_executor
ends up being:':KubernetesExecutor:'
. This might not be the best fix for it and would require internally debugging things, but it will unblock main CI for now.^ 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.