-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Local kubernetes executor #19729
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
Local kubernetes executor #19729
Conversation
…calExecutor and KubernetesExecutor
…calExecutor and KubernetesExecutor
|
Nice one. I think LocalK8S is quite a useful executor to have :). |
|
I'm a bit worried about the possible combinations that we run in to if we add this. Is it maybe time to resurrect your multi-executor @potiuk? |
I think the benefits of any common code for "multi" executor are not as big - I still think having a few dedicated, specialized executors that you can use straight away and they are well tested and supported by Helm Chart outweitght the "generic" solution. There are really few combinations that makes sense here - like you woudn't want to support Sequential + Kubernetes or Local + Celery, I think the only "reasonable" combination is The fact that nobody proposed it for about a year since we had CeleryKubernetes, makes it likely that we have about a year again when someoene wants another combination (if at all). I think it's not worth to do generic one in this case. |
To avoid this situation, what do you think of configuring multiple executors, and have an argument on the BaseOperator to select your executor of choice? The selection of executor with these "multi"-executors via the |
Yep. Might be a good idea to do it explicitly. |
@potiuk , Thoughts, does it make sense to continue with this, I wanted to add Helm charts. or if the direction is to work on the multiple executors(I could work there too), Please let me know. |
|
This one needs rebase! |
Please let me know if there is anything else outstanding for this PR. |
potiuk
left a comment
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.
This lookks good. Any other approval?
Can this be merged, it's all green now, thanks |
|
One comment - before merge (and @subkanthi - maybe you can take a closer look while you are adding it). There is a bug with CeleryKubernetesExecutor reported recently #21548 which might also affect LocalKubernetesExecutor. Would it be possible that you take a look @subkanthi - and maybe you will be able to fix it as general case ? And maybe also take a look if there are other places where we have "hard-coded" Executor names This was one thing that I was afraid of when we discussed "Generic Combined Excecutor" - seems that there might be at least this one place pointed out in #21548 where we implemented logic based on the type of executor configured and about the executor actually 'used" when the task was executed. I think that LocalKubernetesExecutor might suffer the same problem actually - because |
potiuk
left a comment
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.
Waiting for response from @subkanthi on the potential bug.
|
You will probably have the same issue as the one that I described here: #21225 (comment) It is causing a lot of pain on CeleryKubernetesExecutor, when for example tasks are waiting for celery to autoscale, because KubernetesExecutor is restarting all of the tasks that are in queued state to scheduled, not only those that has kubernetes qeueue assigned. |
Im actually stuck with another issue, Im pretty sure it used to work before, For some reason the k8s_object is str and it ends up in the else block |
The problem seems to be that for some reason |
Let me know when to re-review it :) |
|
@potiuk It could be either cloudwatch or s3, but I see |
|
I think we should be good to go for that one then. |
|
Hey, whats the timeline for this to be added to the helm chart, I'd like to test this out right away. |
Maybe you can try update it in the chart and provide it as a PR back? That would be great contribution back to the community for the free software and you can become one of the (almost) 2000 contributors then. |
Note that this executor will only berelease in 2.3.0 - development only, so this makes perfect sense to add it soon in main BTW. PR with it are most welcome |
|
I can work on this in a week from now. |
LocalKubernetesExecutor similar to CeleryKubernetesExecutor.
Tested by running webserver, scheduler and connecting to minikube k8s cluster.
Note: This PR does not update the helm charts.
closes: #16185
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.