-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-5282] Add default timeout on kubeclient & catch HTTPError #5880
Conversation
@andy-g14 I added the timeout configuration from your unit test as a default. This works at runtime, but tests are complaining about a KeyError. f70a6aa#diff-2fd5967071561042847ef71c5f8b7e8dR216 Did you ever see this work? I tried various changes, e.g. |
kube_client_request_args = | ||
# Note that if no _request_timeout is specified, the kubernetes client will wait indefinitely for kubernetes | ||
# api responses, which will cause the scheduler to hang. The timeout is specified as [connect timeout, read timeout] | ||
kube_client_request_args = {"_request_timeout" : [60,60] } |
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.
kube_client_request_args = {"_request_timeout" : [60,60] } | |
kube_client_request_args = {{"_request_timeout" : [60,60] }} |
The problem is this file isn't a plain config file, it's actually a giant python format string.
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.
Setting this in the ~/airflow/airflow.cfg
wouldn't have the same problem, it's just this default config template that is the problem.
@rolanddb , you will need to provide the value as json string, i.e enclosed in single quotes. it works for me this way |
The problem in the other PR seemed to be around putting a default value in our config template (which is actually a giant python format string so |
Ah, I was very confused why it didn't work! |
Nice! Note that this new default config won't change the value for any existing installs, so some people might have to update their configs to get this new change. |
…pache#5880) Catch urllib3 httperror in kube executor (cherry picked from commit 4636a30)
Make sure you have checked all steps below.
Jira
Description
This PR:
airflow/airflow/executors/kubernetes_executor.py
Lines 800 to 803 in 46885cc
json.loads
, which returns a dict. But in the code, .iteritems() is called on this dict, which cannot work. .items() should be used instead.Tests
Commits
Documentation
Code Quality
flake8