You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/06/26 08:35:00 UTC
[GitHub] [airflow] ashb commented on a change in pull request #5481:
[AIRLFOW-4851] preliminary refactor
ashb commented on a change in pull request #5481: [AIRLFOW-4851] preliminary refactor
URL: https://github.com/apache/airflow/pull/5481#discussion_r297544454
##########
File path: airflow/kubernetes/kubernetes_request_factory/pod_request_factory.py
##########
@@ -15,12 +15,47 @@
# specific language governing permissions and limitations
# under the License.
-from typing import Dict
import yaml
-from airflow.kubernetes.pod import Pod
-from airflow.kubernetes.kubernetes_request_factory.kubernetes_request_factory \
- import KubernetesRequestFactory
+from abc import ABCMeta
+from kubernetes.client import ApiClient
+import kubernetes.client.models as k8s
+from typing import Dict
+
+
+def merge_dicts(pod_dict: Dict, base_dict: Dict) -> Dict:
Review comment:
Not quite - this does it "deeply" where as dict.update doesn't.
If we want to handle lists too then it may be worth bringing in https://github.com/toumorokoshi/deepmerge
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services