You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/06/29 07:13:42 UTC
[airflow] branch v1-10-test updated: fixup! [AIRFLOW-5413] Allow
K8S worker pod to be configured from JSON/YAML file (#6230)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v1-10-test by this push:
new e079659 fixup! [AIRFLOW-5413] Allow K8S worker pod to be configured from JSON/YAML file (#6230)
e079659 is described below
commit e079659a7c0c37a8e35b1c7face8b5765db0b457
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon Jun 29 09:12:48 2020 +0200
fixup! [AIRFLOW-5413] Allow K8S worker pod to be configured from JSON/YAML file (#6230)
---
airflow/kubernetes/pod_generator.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/airflow/kubernetes/pod_generator.py b/airflow/kubernetes/pod_generator.py
index f8e4d6a..d79134a 100644
--- a/airflow/kubernetes/pod_generator.py
+++ b/airflow/kubernetes/pod_generator.py
@@ -24,7 +24,11 @@ is supported and no serialization need be written.
import copy
import hashlib
import re
-import inspect
+try:
+ from inspect import signature
+except ImportError:
+ # Python 2.7
+ from funcsigs import signature # type: ignore
import os
import uuid
from functools import reduce
@@ -516,7 +520,7 @@ class PodGenerator:
Validate that if `pod` or `pod_template_file` are set that the user is not attempting
to configure the pod with the other arguments.
"""
- pod_args = list(inspect.signature(PodGenerator).parameters.items())
+ pod_args = list(signature(PodGenerator).parameters.items())
def predicate(k, v):
"""